Class LegendLabels
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.AbstractModel<Legend,IsDefaultLegendLabels>
-
- org.pepstock.charba.client.options.LegendLabels
-
- All Implemented Interfaces:
IsDefaultBoxHandler
,IsDefaultFontContainer
,IsDefaultLegendLabels
,IsDefaultPointStyleHandler
,HasFont
,HasPointStyle
public final class LegendLabels extends AbstractModel<Legend,IsDefaultLegendLabels> implements IsDefaultLegendLabels, HasPointStyle, HasFont
This is the labels configuration of the legend.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description org.pepstock.charba.client.options.BoxHandler
getBoxHandler()
default int
getBoxHeight()
Returns the height of colored box.default int
getBoxWidth()
Returns the width of colored box.FontContainer
getFontContainer()
Returns a font container instance to use in the default methods of this interface.int
getPadding()
Returns the padding to apply around labels.PointStyleHandler
getPointStyleHandler()
Returns a point style handler instance to use in the default methods of this interface.TextAlign
getTextAlign()
Returns the horizontal alignment of the label text.boolean
isUsePointStyle()
Returns if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).default void
setBoxHeight(int boxHeight)
Sets the height of colored box.default void
setBoxWidth(int boxWidth)
Sets the width of colored box.void
setPadding(int padding)
Sets the padding to apply around labels.void
setTextAlign(TextAlign align)
Sets the horizontal alignment of the label text.void
setUsePointStyle(boolean usePointStyle)
Sets if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.options.HasFont
getColor, getColorAsString, getFont, setColor, setColor
-
Methods inherited from interface org.pepstock.charba.client.options.HasPointStyle
getPointStyle, getPointStyleAsCanvas, getPointStyleAsImage, getPointStyleType, setPointStyle, setPointStyle, setPointStyle
-
-
-
-
Method Detail
-
getBoxHandler
public org.pepstock.charba.client.options.BoxHandler getBoxHandler()
-
getPointStyleHandler
public PointStyleHandler getPointStyleHandler()
Description copied from interface:HasPointStyle
Returns a point style handler instance to use in the default methods of this interface.- Specified by:
getPointStyleHandler
in interfaceHasPointStyle
- Returns:
- a point style handler instance
-
getFontContainer
public FontContainer getFontContainer()
Description copied from interface:HasFont
Returns a font container instance to use in the default methods of this interface.- Specified by:
getFontContainer
in interfaceHasFont
- Returns:
- a font container instance
-
setUsePointStyle
public void setUsePointStyle(boolean usePointStyle)
Sets if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).- Parameters:
usePointStyle
- if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).
-
isUsePointStyle
public boolean isUsePointStyle()
Returns if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).- Specified by:
isUsePointStyle
in interfaceIsDefaultLegendLabels
- Returns:
true
if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).
-
setPadding
public void setPadding(int padding)
Sets the padding to apply around labels. Only top and bottom are implemented.- Parameters:
padding
- padding to apply around labels. Only top and bottom are implemented.
-
getPadding
public int getPadding()
Returns the padding to apply around labels. Only top and bottom are implemented.- Specified by:
getPadding
in interfaceIsDefaultLegendLabels
- Returns:
- padding to apply around labels. Only top and bottom are implemented.
-
setTextAlign
public void setTextAlign(TextAlign align)
Sets the horizontal alignment of the label text.- Parameters:
align
- the horizontal alignment of the label text.
-
getTextAlign
public TextAlign getTextAlign()
Returns the horizontal alignment of the label text.- Specified by:
getTextAlign
in interfaceIsDefaultLegendLabels
- Returns:
- the horizontal alignment of the label text.
-
setBoxWidth
public default void setBoxWidth(int boxWidth)
Sets the width of colored box.- Parameters:
boxWidth
- width of colored box.
-
getBoxWidth
public default int getBoxWidth()
Returns the width of colored box.- Specified by:
getBoxWidth
in interfaceIsDefaultBoxHandler
- Returns:
- width of colored box.
-
setBoxHeight
public default void setBoxHeight(int boxHeight)
Sets the height of colored box.- Parameters:
boxHeight
- width of colored box.
-
getBoxHeight
public default int getBoxHeight()
Returns the height of colored box.- Specified by:
getBoxHeight
in interfaceIsDefaultBoxHandler
- Returns:
- height of colored box.
-
-