Class LegendLabel
- java.lang.Object
-
- org.primefaces.model.charts.optionconfig.legend.LegendLabel
-
- All Implemented Interfaces:
Serializable
public class LegendLabel extends Object implements Serializable
The legend label configuration is nested below the legend configuration using the labels key.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LegendLabel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringencode()Write the options of scale labelNumbergetBoxWidth()width of colored boxStringgetFontColor()Font color for the label.StringgetFontFamily()Font family for the label, follows CSS font-family options.NumbergetFontSize()Font size for the label.StringgetFontStyle()Font style for the label, follows CSS font-style options.NumbergetPadding()Padding between rows of colored boxes.booleanisUsePointStyle()Label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).voidsetBoxWidth(Number boxWidth)width of colored boxvoidsetFontColor(String fontColor)Font color for the label.voidsetFontFamily(String fontFamily)Font family for the label, follows CSS font-family options.voidsetFontSize(Number fontSize)Font size for the label.voidsetFontStyle(String fontStyle)Font style for the label, follows CSS font-style options.voidsetPadding(Number padding)Padding between rows of colored boxes.voidsetUsePointStyle(boolean usePointStyle)Label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).
-
-
-
Method Detail
-
getBoxWidth
public Number getBoxWidth()
width of colored box- Returns:
- the boxWidth
-
setBoxWidth
public void setBoxWidth(Number boxWidth)
width of colored box- Parameters:
boxWidth- the boxWidth to set
-
getFontColor
public String getFontColor()
Font color for the label.- Returns:
- the fontColor
-
setFontColor
public void setFontColor(String fontColor)
Font color for the label.- Parameters:
fontColor- the fontColor to set
-
getFontFamily
public String getFontFamily()
Font family for the label, follows CSS font-family options.- Returns:
- the fontFamily
-
setFontFamily
public void setFontFamily(String fontFamily)
Font family for the label, follows CSS font-family options.- Parameters:
fontFamily- the fontFamily to set
-
getFontSize
public Number getFontSize()
Font size for the label.- Returns:
- the fontSize
-
setFontSize
public void setFontSize(Number fontSize)
Font size for the label.- Parameters:
fontSize- the fontSize to set
-
getFontStyle
public String getFontStyle()
Font style for the label, follows CSS font-style options.- Returns:
- the fontStyle
-
setFontStyle
public void setFontStyle(String fontStyle)
Font style for the label, follows CSS font-style options.- Parameters:
fontStyle- the fontStyle to set
-
getPadding
public Number getPadding()
Padding between rows of colored boxes.- Returns:
- the padding
-
setPadding
public void setPadding(Number padding)
Padding between rows of colored boxes.- Parameters:
padding- the padding to set
-
isUsePointStyle
public boolean isUsePointStyle()
Label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).- Returns:
- the usePointStyle
-
setUsePointStyle
public void setUsePointStyle(boolean usePointStyle)
Label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).- Parameters:
usePointStyle- the usePointStyle to set
-
encode
public String encode() throws IOException
Write the options of scale label- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-
-