public class LegendLabels extends Object
Modifier and Type | Method and Description |
---|---|
int |
getBoxHeight()
Returns the height of colored box.
|
int |
getBoxWidth()
Returns the width of colored box.
|
IsChart |
getChart()
Returns the chart instance
|
IsColor |
getColor()
Returns the font color.
|
String |
getColorAsString()
Returns the font color as string.
|
protected ExtendedOptions |
getConfiguration()
Returns the configuration element.
|
LegendFilterCallback |
getFilterCallback()
Returns the user filter callback instance.
|
Font |
getFont()
Returns the font element.
|
LegendItemSortCallback |
getItemSortCallback()
Returns the user item sort callback instance.
|
LegendLabelsCallback |
getLabelsCallback()
Returns the user callback instance to generate labels.
|
protected ConfigurationOptions |
getOptions()
Returns the configuration options.
|
int |
getPadding()
Returns the padding to apply around labels.
|
PointStyle |
getPointStyle()
Returns the style of the legend.
|
Canvas |
getPointStyleAsCanvas()
Returns the style of the point as canvas.
|
Img |
getPointStyleAsImage()
Returns the style of the legend as image.
|
PointStyleType |
getPointStyleType()
Returns the type of point style.
|
TextAlign |
getTextAlign()
Returns the the horizontal alignment of the label text.
|
boolean |
isUsePointStyle()
Returns if label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).
|
void |
setBoxHeight(int boxHeight)
Sets the height of colored box.
|
void |
setBoxWidth(int boxWidth)
Sets the width of colored box.
|
void |
setColor(IsColor color)
Sets the font color.
|
void |
setColor(String color)
Sets the font color.
|
void |
setFilterCallback(LegendFilterCallback filterCallback)
Sets the user filter callback instance.
|
void |
setItemSortCallback(LegendItemSortCallback itemSortCallback)
Sets the user item sort callback instance.
|
void |
setLabelsCallback(LegendLabelsCallback labelsCallback)
Sets the user callback instance to generate labels.
|
void |
setPadding(int padding)
Sets the padding to apply around labels.
|
void |
setPointStyle(Canvas pointStyle)
Sets the style of the legend, overriding point style from dataset, as canvas.
Only applies if setUsePointStyle(boolean) is set to true . |
void |
setPointStyle(Img pointStyle)
Sets the style of the legend, overriding point style from dataset, as image.
Only applies if setUsePointStyle(boolean) is set to true . |
void |
setPointStyle(PointStyle pointStyle)
Sets the style of the legend, overriding point style from dataset.
Only applies if setUsePointStyle(boolean) is set to true . |
void |
setTextAlign(TextAlign align)
Sets the horizontal alignment of the label text.
|
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).
|
public Font getFont()
public void setColor(IsColor color)
color
- font color.public void setColor(String color)
color
- font color.public String getColorAsString()
public IsColor getColor()
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 setPointStyle(PointStyle pointStyle)
setUsePointStyle(boolean)
is set to true
.pointStyle
- the style of the legend, overriding point style from dataset.public void setPointStyle(Img pointStyle)
setUsePointStyle(boolean)
is set to true
.pointStyle
- the style of the legend, overriding point style from dataset.public void setPointStyle(Canvas pointStyle)
setUsePointStyle(boolean)
is set to true
.pointStyle
- the style of the legend, overriding point style from dataset.public PointStyleType getPointStyleType()
public PointStyle getPointStyle()
public Canvas getPointStyleAsCanvas()
public Img getPointStyleAsImage()
public void setBoxWidth(int boxWidth)
boxWidth
- width of colored box.public int getBoxWidth()
public void setBoxHeight(int boxHeight)
boxHeight
- height of colored box.public int getBoxHeight()
public void setPadding(int padding)
padding
- Padding to apply around labels. Only top and bottom are implemented.public int getPadding()
public void setTextAlign(TextAlign align)
align
- the horizontal alignment of the label text.public TextAlign getTextAlign()
public LegendFilterCallback getFilterCallback()
public void setFilterCallback(LegendFilterCallback filterCallback)
filterCallback
- the user filter callback instancepublic LegendLabelsCallback getLabelsCallback()
public void setLabelsCallback(LegendLabelsCallback labelsCallback)
labelsCallback
- the user callback instance to generate labelspublic LegendItemSortCallback getItemSortCallback()
public void setItemSortCallback(LegendItemSortCallback itemSortCallback)
itemSortCallback
- the user item sort callback instanceprotected final ConfigurationOptions getOptions()
protected final ExtendedOptions getConfiguration()
public final IsChart getChart()