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 String
encode()
Write the options of scale labelNumber
getBoxWidth()
width of colored boxString
getFontColor()
Font color for the label.String
getFontFamily()
Font family for the label, follows CSS font-family options.Number
getFontSize()
Font size for the label.String
getFontStyle()
Font style for the label, follows CSS font-style options.Number
getPadding()
Padding between rows of colored boxes.boolean
isUsePointStyle()
Label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).void
setBoxWidth(Number boxWidth)
width of colored boxvoid
setFontColor(String fontColor)
Font color for the label.void
setFontFamily(String fontFamily)
Font family for the label, follows CSS font-family options.void
setFontSize(Number fontSize)
Font size for the label.void
setFontStyle(String fontStyle)
Font style for the label, follows CSS font-style options.void
setPadding(Number padding)
Padding between rows of colored boxes.void
setUsePointStyle(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
-
-