org.jplot2d.element.impl
Interface LegendItemEx
-
- All Superinterfaces:
- Element, ElementEx, LegendItem
- All Known Subinterfaces:
- XYLegendItemEx
- All Known Implementing Classes:
- LegendItemImpl, XYLegendItemImpl
public interface LegendItemEx extends LegendItem, ElementEx
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleancanContribute()Returnstrueif the item has a text can be displayed in legend.voiddraw(java.awt.Graphics2D g)This method is called by LegendImpl.LegendExgetLegend()Returns the legend who show this itemGraphExgetParent()Gets the parent of this component.java.awt.geom.Dimension2DgetSize()java.lang.StringgetText()Returns the text displayed in the legend itemvoidlegendEffectiveFontChanged()Called by legend when its effective font changedvoidsetLegend(LegendEx legend)voidsetLocation(double locx, double locy)Set location in legendvoidsetText(java.lang.String text)Sets the text displayed in the legend item-
Methods inherited from interface org.jplot2d.element.LegendItem
getSymbolSize, isVisible, setSymbolSize, setVisible
-
Methods inherited from interface org.jplot2d.element.impl.ElementEx
copyFrom, copyStructure, getFullId, getInvokeStepFormParent, notify, setParent
-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId
-
-
-
-
Method Detail
-
getParent
GraphEx getParent()
Description copied from interface:ElementGets the parent of this component.
-
getLegend
LegendEx getLegend()
Description copied from interface:LegendItemReturns the legend who show this item- Specified by:
getLegendin interfaceLegendItem- Returns:
- the legend who show this item
-
setLegend
void setLegend(LegendEx legend)
-
getText
java.lang.String getText()
Returns the text displayed in the legend item- Returns:
- the text
-
setText
void setText(java.lang.String text)
Sets the text displayed in the legend item- Parameters:
text- the text displayed in the legend item
-
canContribute
boolean canContribute()
Returnstrueif the item has a text can be displayed in legend.- Returns:
- the indicator
-
legendEffectiveFontChanged
void legendEffectiveFontChanged()
Called by legend when its effective font changed
-
getSize
java.awt.geom.Dimension2D getSize()
-
setLocation
void setLocation(double locx, double locy)Set location in legend
-
draw
void draw(java.awt.Graphics2D g)
This method is called by LegendImpl. The given g has been transformed to legend's paper space.- Parameters:
g- the graphic to draw.
-
-
DMelt 3.0 © DataMelt by jWork.ORG