org.jplot2d.element.impl
Class LegendItemImpl
- java.lang.Object
-
- org.jplot2d.element.impl.ElementImpl
-
- org.jplot2d.element.impl.LegendItemImpl
-
- All Implemented Interfaces:
- Element, ElementEx, LegendItemEx, LegendItem
- Direct Known Subclasses:
- XYLegendItemImpl
public abstract class LegendItemImpl extends ElementImpl implements LegendItemEx
-
-
Constructor Summary
Constructors Constructor and Description LegendItemImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcopyFrom(ElementEx src)Copies all properties from given src to this element.java.awt.geom.Rectangle2DgetBounds()java.lang.StringgetId()Returns the id string of this elementInvokeStepgetInvokeStepFormParent()Return the invoke step to get this object from its parent.LegendExgetLegend()Returns the legend who show this itemjava.awt.geom.Point2DgetLocation()XYGraphExgetParent()Gets the parent of this component.booleanisVisible()returnstrueif this item is displayed in legend; otherwise, returnsfalse.voidsetLegend(LegendEx legend)voidsetLocation(double locX, double locY)Set location in legendvoidsetVisible(boolean visible)Sets a flag indicating whether this item should be displayed in the legend.-
Methods inherited from class org.jplot2d.element.impl.ElementImpl
copyStructure, getEnvironment, getFullId, notify, setParent, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jplot2d.element.impl.LegendItemEx
canContribute, draw, getSize, getText, legendEffectiveFontChanged, setText
-
Methods inherited from interface org.jplot2d.element.LegendItem
getSymbolSize, setSymbolSize
-
Methods inherited from interface org.jplot2d.element.impl.ElementEx
copyStructure, getFullId, notify, setParent
-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment
-
-
-
-
Method Detail
-
getId
public java.lang.String getId()
Description copied from interface:ElementReturns the id string of this element
-
getInvokeStepFormParent
public InvokeStep getInvokeStepFormParent()
Description copied from interface:ElementExReturn the invoke step to get this object from its parent.- Specified by:
getInvokeStepFormParentin interfaceElementEx- Returns:
- the invoke step
-
getParent
public XYGraphEx getParent()
Description copied from interface:ElementGets the parent of this component.- Specified by:
getParentin interfaceElement- Specified by:
getParentin interfaceElementEx- Specified by:
getParentin interfaceLegendItemEx- Specified by:
getParentin interfaceLegendItem- Overrides:
getParentin classElementImpl- Returns:
- the parent of this component
-
getLegend
public LegendEx getLegend()
Description copied from interface:LegendItemReturns the legend who show this item- Specified by:
getLegendin interfaceLegendItemEx- Specified by:
getLegendin interfaceLegendItem- Returns:
- the legend who show this item
-
setLegend
public void setLegend(LegendEx legend)
- Specified by:
setLegendin interfaceLegendItemEx
-
getLocation
public java.awt.geom.Point2D getLocation()
-
setLocation
public void setLocation(double locX, double locY)Description copied from interface:LegendItemExSet location in legend- Specified by:
setLocationin interfaceLegendItemEx
-
getBounds
public java.awt.geom.Rectangle2D getBounds()
-
isVisible
public boolean isVisible()
Description copied from interface:LegendItemreturnstrueif this item is displayed in legend; otherwise, returnsfalse.- Specified by:
isVisiblein interfaceLegendItem- Returns:
- the flag
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:LegendItemSets a flag indicating whether this item should be displayed in the legend. The default value istrue, even if the Graph is invisible.- Specified by:
setVisiblein interfaceLegendItem- Parameters:
visible- the flag
-
copyFrom
public void copyFrom(ElementEx src)
Description copied from interface:ElementExCopies all properties from given src to this element. Notice properties of sub-elements are not copied over.- Specified by:
copyFromin interfaceElementEx- Overrides:
copyFromin classElementImpl- Parameters:
src- the src
-
-
DMelt 3.0 © DataMelt by jWork.ORG