Class DefaultLegendLabels
- java.lang.Object
-
- org.pepstock.charba.client.defaults.globals.DefaultLegendLabels
-
- All Implemented Interfaces:
IsDefaultBoxHandler,IsDefaultFontContainer,IsDefaultLegendLabels,IsDefaultPointStyleHandler
public final class DefaultLegendLabels extends Object implements IsDefaultLegendLabels
CHART.JS default values for LEGENDLABELS element.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBoxHeight()Returns the height of colored box.intgetBoxWidth()Returns the width of colored box.StringgetColorAsString()Returns the font color as string.IsDefaultFontgetFont()Returns the font element.intgetPadding()Returns the padding to apply around labels.PointStylegetPointStyle()Returns the style of the point.CanvasgetPointStyleAsCanvas()Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull.ImggetPointStyleAsImage()Returns the style of the point as image.
If property is missing or not an image, returnsnull.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 fontSize, boxWidth is not used in this case).
-
-
-
Method Detail
-
getColorAsString
public String getColorAsString()
Description copied from interface:IsDefaultFontContainerReturns the font color as string.- Specified by:
getColorAsStringin interfaceIsDefaultFontContainer- Returns:
- font color as string
-
getFont
public IsDefaultFont getFont()
Description copied from interface:IsDefaultFontContainerReturns the font element.- Specified by:
getFontin interfaceIsDefaultFontContainer- Returns:
- the font
-
isUsePointStyle
public boolean isUsePointStyle()
Description copied from interface:IsDefaultLegendLabelsReturns if label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).- Specified by:
isUsePointStylein interfaceIsDefaultLegendLabels- Returns:
- if label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).
-
getPointStyle
public PointStyle getPointStyle()
Description copied from interface:IsDefaultPointStyleHandlerReturns the style of the point.- Specified by:
getPointStylein interfaceIsDefaultPointStyleHandler- Returns:
- the style of the point.
-
getBoxWidth
public int getBoxWidth()
Description copied from interface:IsDefaultBoxHandlerReturns the width of colored box.- Specified by:
getBoxWidthin interfaceIsDefaultBoxHandler- Returns:
- width of colored box.
-
getBoxHeight
public int getBoxHeight()
Description copied from interface:IsDefaultBoxHandlerReturns the height of colored box.- Specified by:
getBoxHeightin interfaceIsDefaultBoxHandler- Returns:
- height of colored box.
-
getPadding
public int getPadding()
Description copied from interface:IsDefaultLegendLabelsReturns 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.
-
getPointStyleType
public PointStyleType getPointStyleType()
Description copied from interface:IsDefaultPointStyleHandlerReturns the type of point style.- Specified by:
getPointStyleTypein interfaceIsDefaultPointStyleHandler- Returns:
- the type of point style
-
getPointStyleAsCanvas
public Canvas getPointStyleAsCanvas()
Description copied from interface:IsDefaultPointStyleHandlerReturns the style of the point as canvas.
If property is missing or not an canvas, returnsnull.- Specified by:
getPointStyleAsCanvasin interfaceIsDefaultPointStyleHandler- Returns:
- image of the style of the point as canvas.
If property is missing or not a canvas, returnsnull.
-
getPointStyleAsImage
public Img getPointStyleAsImage()
Description copied from interface:IsDefaultPointStyleHandlerReturns the style of the point as image.
If property is missing or not an image, returnsnull.- Specified by:
getPointStyleAsImagein interfaceIsDefaultPointStyleHandler- Returns:
- image of the style of the point as image.
If property is missing or not a image, returnsnull.
-
getTextAlign
public TextAlign getTextAlign()
Description copied from interface:IsDefaultLegendLabelsReturns the horizontal alignment of the label text.- Specified by:
getTextAlignin interfaceIsDefaultLegendLabels- Returns:
- the horizontal alignment of the label text.
-
-