Class DescriptionLabel
- java.lang.Object
-
- org.pepstock.charba.client.impl.charts.DescriptionLabel
-
public final class DescriptionLabel extends Object
Meter element class to define the description to render in the meter chart under theValueLabel.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static IsColorDEFAULT_FONT_COLORDefault color of render, rgb(128, 128, 128)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsColorgetColor()Returns the font color of the label.StringgetColorAsString()Returns the font color of the label.ColorCallback<MeterContext>getColorCallback()Returns the callback to customize the font color for rendered label in the chart.StringgetContent()Returns the content of the label.MeterContentCallbackgetContentCallback()Returns the callback to customize the description label string in the chart.IsFontgetFont()Returns the font of the label.FontCallback<MeterContext>getFontCallback()Returns the callback to customize the font for rendered label in the chart.booleanisAutoFontSize()Returnstrueif the font size of the rendering will be automatically calculated, based on dimension of the area for rendering.booleanisDisplay()Returnstruewhether the element label should be displayed.voidsetAutoFontSize(boolean autoFontSize)Setstrueif the font size of the rendering will be automatically calculated, based on dimension of the area for rendering.voidsetColor(String color)Sets the font color of the label.voidsetColor(ColorCallback<MeterContext> colorCallback)Sets the callback to customize the font color for rendered label in the chart.voidsetColor(IsColor color)Sets the font color of the label.voidsetContent(String content)Sets the content of the label.voidsetContent(MeterContentCallback contentCallback)Sets the callback to customize the description label string in the chart.voidsetDisplay(boolean display)Setstruewhether the element label should be displayed.voidsetFont(FontCallback<MeterContext> fontCallback)Sets the callback to customize the font for rendered label in the chart.
-
-
-
Field Detail
-
DEFAULT_FONT_COLOR
public static final IsColor DEFAULT_FONT_COLOR
Default color of render, rgb(128, 128, 128)
-
-
Method Detail
-
setContent
public void setContent(String content)
Sets the content of the label.- Parameters:
content- the content of the label
-
getContent
public String getContent()
Returns the content of the label.- Returns:
- the content of the label
-
getContentCallback
public MeterContentCallback getContentCallback()
Returns the callback to customize the description label string in the chart.- Returns:
- the callback to customize the description label string in the chart
-
setContent
public void setContent(MeterContentCallback contentCallback)
Sets the callback to customize the description label string in the chart.- Parameters:
contentCallback- the callback to description label the value string in the chart
-
setDisplay
public final void setDisplay(boolean display)
Setstruewhether the element label should be displayed.- Parameters:
display-truewhether the element label should be displayed
-
isDisplay
public final boolean isDisplay()
Returnstruewhether the element label should be displayed.- Returns:
truewhether the element label should be displayed
-
getFont
public final IsFont getFont()
Returns the font of the label.- Returns:
- the font of the label
-
isAutoFontSize
public final boolean isAutoFontSize()
Returnstrueif the font size of the rendering will be automatically calculated, based on dimension of the area for rendering.- Returns:
trueif the font size of the rendering will be automatically calculated, based on dimension of the area for rendering
-
setAutoFontSize
public final void setAutoFontSize(boolean autoFontSize)
Setstrueif the font size of the rendering will be automatically calculated, based on dimension of the area for rendering.- Parameters:
autoFontSize-trueif the font size of the rendering will be automatically calculated, based on dimension of the area for rendering
-
setColor
public final void setColor(String color)
Sets the font color of the label.- Parameters:
color- the font color of the label
-
setColor
public final void setColor(IsColor color)
Sets the font color of the label.- Parameters:
color- the font color of the label
-
getColorAsString
public final String getColorAsString()
Returns the font color of the label.- Returns:
- the font color of the label
-
getColor
public final IsColor getColor()
Returns the font color of the label.- Returns:
- the font color of the label
-
getColorCallback
public final ColorCallback<MeterContext> getColorCallback()
Returns the callback to customize the font color for rendered label in the chart.- Returns:
- the callback to customize the font color for rendered label in the chart
-
setColor
public final void setColor(ColorCallback<MeterContext> colorCallback)
Sets the callback to customize the font color for rendered label in the chart.- Parameters:
colorCallback- the callback to customize the font color for rendered label in the chart
-
getFontCallback
public final FontCallback<MeterContext> getFontCallback()
Returns the callback to customize the font for rendered label in the chart.- Returns:
- the callback to customize the font for rendered label in the chart
-
setFont
public final void setFont(FontCallback<MeterContext> fontCallback)
Sets the callback to customize the font for rendered label in the chart.- Parameters:
fontCallback- the callback to customize the font for rendered label in the chart
-
-