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.BoxHandlergetBoxHandler()default intgetBoxHeight()Returns the height of colored box.default intgetBoxWidth()Returns the width of colored box.FontContainergetFontContainer()Returns a font container instance to use in the default methods of this interface.intgetPadding()Returns the padding to apply around labels.PointStyleHandlergetPointStyleHandler()Returns a point style handler instance to use in the default methods of this interface.TextAligngetTextAlign()Returns the horizontal alignment of the label text.booleanisUsePointStyle()Returns if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).default voidsetBoxHeight(int boxHeight)Sets the height of colored box.default voidsetBoxWidth(int boxWidth)Sets the width of colored box.voidsetPadding(int padding)Sets the padding to apply around labels.voidsetTextAlign(TextAlign align)Sets the horizontal alignment of the label text.voidsetUsePointStyle(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, 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, 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:HasPointStyleReturns a point style handler instance to use in the default methods of this interface.- Specified by:
getPointStyleHandlerin interfaceHasPointStyle- Returns:
- a point style handler instance
-
getFontContainer
public FontContainer getFontContainer()
Description copied from interface:HasFontReturns a font container instance to use in the default methods of this interface.- Specified by:
getFontContainerin 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:
isUsePointStylein interfaceIsDefaultLegendLabels- Returns:
trueif 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:
getPaddingin 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:
getTextAlignin 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:
getBoxWidthin 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:
getBoxHeightin interfaceIsDefaultBoxHandler- Returns:
- height of colored box.
-
-