org.jplot2d.element
Interface LegendItem
-
- All Superinterfaces:
- Element
- All Known Subinterfaces:
- LegendItemEx, XYLegendItemEx
- All Known Implementing Classes:
- LegendItemImpl, XYLegendItemImpl
public interface LegendItem extends Element
An item in legend to show a short line and a text. It will be hosted by the legend of the plot which host the Graph. If the hosting legend is disabled, it will be hosted by legend of parent plot.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description LegendgetLegend()Returns the legend who show this itemGraphgetParent()Gets the parent of this component.floatgetSymbolSize()Returns the size of the symbol draw in legend.booleanisVisible()returnstrueif this item is displayed in legend; otherwise, returnsfalse.voidsetSymbolSize(float size)Set the size of symbol draw in legend.voidsetVisible(boolean show)Sets a flag indicating whether this item should be displayed in the legend.-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId
-
-
-
-
Method Detail
-
getParent
Graph getParent()
Description copied from interface:ElementGets the parent of this component.
-
getLegend
Legend getLegend()
Returns the legend who show this item- Returns:
- the legend who show this item
-
isVisible
boolean isVisible()
returnstrueif this item is displayed in legend; otherwise, returnsfalse.- Returns:
- the flag
-
setVisible
void setVisible(boolean show)
Sets a flag indicating whether this item should be displayed in the legend. The default value istrue, even if the Graph is invisible.- Parameters:
show- the flag
-
getSymbolSize
float getSymbolSize()
Returns the size of the symbol draw in legend. The default symbol size isFloat.NaN, means the same size as the symbol size of XYGraph.- Returns:
- the size of the symbol draw in legend
-
setSymbolSize
void setSymbolSize(float size)
Set the size of symbol draw in legend. Setting toFloat.NaNmeans the same size as the symbol size of XYGraph.- Parameters:
size- the size of symbols draw in legend
-
-
DMelt 3.0 © DataMelt by jWork.ORG