public class LegendLabels extends Object
Modifier and Type | Method and Description |
---|---|
int |
getBoxWidth()
Returns the width of colored box.
|
AbstractChart<?,?> |
getChart()
Returns the chart instance
|
protected T |
getConfiguration()
Returns the configuration element.
|
LegendFilterCallback |
getFilterCallback()
Returns the user filter callback.
|
IsColor |
getFontColor()
Returns the font color for label
|
String |
getFontColorAsString()
Returns the font color for label
|
String |
getFontFamily()
Returns the font family for the label, follows CSS font-family options.
|
int |
getFontSize()
Returns the font size for label.
|
FontStyle |
getFontStyle()
Returns the font style for the label, follows CSS font-style options (i.e.
|
LegendLabelsCallback |
getLabelsCallback()
Returns the user callback to generate labels.
|
int |
getPadding()
Returns the padding to apply around labels.
|
boolean |
isUsePointStyle()
Returns if label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this
case).
|
void |
setBoxWidth(int boxWidth)
Sets the width of colored box.
|
protected void |
setConfiguration(T configuration) |
void |
setFilterCallback(LegendFilterCallback filterCallback)
Sets the user filter callback.
|
void |
setFontColor(IsColor fontColor)
Sets the font color for label
|
void |
setFontColor(String fontColor)
Sets the font color for label
|
void |
setFontFamily(String fontFamily)
Sets the font family for the label, follows CSS font-family options.
|
void |
setFontSize(int fontSize)
Sets the font size for label.
|
void |
setFontStyle(FontStyle fontStyle)
Sets the font style for the label, follows CSS font-style options (i.e.
|
void |
setLabelsCallback(LegendLabelsCallback labelsCallback)
Sets the user callback to generate labels.
|
void |
setPadding(int padding)
Sets the padding to apply around labels.
|
void |
setUsePointStyle(boolean usePointStyle)
Sets if label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).
|
String |
toJSON()
Returns the JSON representation of the object.
|
public void setFontSize(int fontSize)
fontSize
- Font size for label.public int getFontSize()
public void setFontStyle(FontStyle fontStyle)
fontStyle
- Font style for the label, follows CSS font-style options (i.e. normal, italic, oblique, initial,
inherit).public FontStyle getFontStyle()
public void setFontColor(IsColor fontColor)
fontColor
- Font color for labelpublic void setFontColor(String fontColor)
fontColor
- Font color for labelpublic String getFontColorAsString()
public IsColor getFontColor()
public void setFontFamily(String fontFamily)
fontFamily
- Font family for the label, follows CSS font-family options.public String getFontFamily()
public void setUsePointStyle(boolean usePointStyle)
usePointStyle
- if label style will match corresponding point style (size is based on fontSize, boxWidth is not used
in this case).public boolean isUsePointStyle()
public void setBoxWidth(int boxWidth)
boxWidth
- width of colored box.public int getBoxWidth()
public void setPadding(int padding)
padding
- Padding to apply around labels. Only top and bottom are implemented.public int getPadding()
public LegendFilterCallback getFilterCallback()
public void setFilterCallback(LegendFilterCallback filterCallback)
filterCallback
- the filterCallback to setpublic LegendLabelsCallback getLabelsCallback()
public void setLabelsCallback(LegendLabelsCallback labelsCallback)
labelsCallback
- the labelsCallback to setprotected final void setConfiguration(T configuration)
configuration
- the configuration to setprotected final T getConfiguration()
public final String toJSON()
public final AbstractChart<?,?> getChart()