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
 
 public final class LegendLabels extends AbstractModel<Legend,IsDefaultLegendLabels> implements IsDefaultLegendLabels, HasFont This is the labels configuration of the legend.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll 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.default PointStylegetPointStyle()Returns the style of the point.default CanvasgetPointStyleAsCanvas()Returns the style of the point as canvas.
 If property is missing or not an canvas, returnsnull.default ImggetPointStyleAsImage()Returns the style of the point as image.
 If property is missing or not an image, returnsnull.org.pepstock.charba.client.options.PointStyleHandlergetPointStyleHandler()default PointStyleTypegetPointStyleType()Returns the type of point style.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.default voidsetPointStyle(Canvas pointStyle)Sets the style of the point as canvas.default voidsetPointStyle(Img pointStyle)Sets the style of the point as image.default voidsetPointStyle(PointStyle pointStyle)Sets the style of the point.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.AbstractModelgetDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
 - 
Methods inherited from class org.pepstock.charba.client.commons.AbstractNodecheckAndAddToParent, 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.NativeObjectContainercheckDefaultValuesArgument, 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
 
- 
 
- 
- 
- 
Method Detail- 
getBoxHandlerpublic org.pepstock.charba.client.options.BoxHandler getBoxHandler() 
 - 
getPointStyleHandlerpublic org.pepstock.charba.client.options.PointStyleHandler getPointStyleHandler() 
 - 
getFontContainerpublic FontContainer getFontContainer() Description copied from interface:HasFontReturns a font container instance to use in the default methods of this interface.- Specified by:
- getFontContainerin interface- HasFont
- Returns:
- a font container instance
 
 - 
setUsePointStylepublic 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).
 
 - 
isUsePointStylepublic 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 interface- IsDefaultLegendLabels
- Returns:
- trueif label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).
 
 - 
setPaddingpublic 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.
 
 - 
getPaddingpublic int getPadding() Returns the padding to apply around labels. Only top and bottom are implemented.- Specified by:
- getPaddingin interface- IsDefaultLegendLabels
- Returns:
- padding to apply around labels. Only top and bottom are implemented.
 
 - 
setTextAlignpublic void setTextAlign(TextAlign align) Sets the horizontal alignment of the label text.- Parameters:
- align- the horizontal alignment of the label text.
 
 - 
getTextAlignpublic TextAlign getTextAlign() Returns the horizontal alignment of the label text.- Specified by:
- getTextAlignin interface- IsDefaultLegendLabels
- Returns:
- the horizontal alignment of the label text.
 
 - 
setBoxWidthpublic default void setBoxWidth(int boxWidth) Sets the width of colored box.- Parameters:
- boxWidth- width of colored box.
 
 - 
getBoxWidthpublic default int getBoxWidth() Returns the width of colored box.- Specified by:
- getBoxWidthin interface- IsDefaultBoxHandler
- Returns:
- width of colored box.
 
 - 
setBoxHeightpublic default void setBoxHeight(int boxHeight) Sets the height of colored box.- Parameters:
- boxHeight- width of colored box.
 
 - 
getBoxHeightpublic default int getBoxHeight() Returns the height of colored box.- Specified by:
- getBoxHeightin interface- IsDefaultBoxHandler
- Returns:
- height of colored box.
 
 - 
setPointStylepublic default void setPointStyle(PointStyle pointStyle) Sets the style of the point.- Parameters:
- pointStyle- array of the style of the point.
 
 - 
getPointStylepublic default PointStyle getPointStyle() Returns the style of the point.- Specified by:
- getPointStylein interface- IsDefaultPointStyleHandler
- Returns:
- the style of the point or nullif point style is set as image
 
 - 
setPointStylepublic default void setPointStyle(Img pointStyle) Sets the style of the point as image.- Parameters:
- pointStyle- image element of the style of the point as image.
 
 - 
getPointStyleTypepublic default PointStyleType getPointStyleType() Returns the type of point style.- Specified by:
- getPointStyleTypein interface- IsDefaultPointStyleHandler
- Returns:
- the type of point style
 
 - 
getPointStyleAsImagepublic default Img getPointStyleAsImage() Returns the style of the point as image.
 If property is missing or not an image, returnsnull.- Specified by:
- getPointStyleAsImagein interface- IsDefaultPointStyleHandler
- Returns:
- image of the style of the point as image.
 If property is missing or not a image, returnsnull.
 
 - 
setPointStylepublic default void setPointStyle(Canvas pointStyle) Sets the style of the point as canvas.- Parameters:
- pointStyle- canvas element of the style of the point as canvas.
 
 - 
getPointStyleAsCanvaspublic default Canvas getPointStyleAsCanvas() Returns the style of the point as canvas.
 If property is missing or not an canvas, returnsnull.- Specified by:
- getPointStyleAsCanvasin interface- IsDefaultPointStyleHandler
- Returns:
- image of the style of the point as canvas.
 If property is missing or not a canvas, returnsnull.
 
 
- 
 
-