org.jplot2d.element.impl
Interface LegendEx
-
- All Superinterfaces:
- ComponentEx, Element, ElementEx, Legend, MovableComponent, PComponent
- All Known Implementing Classes:
- LegendImpl
public interface LegendEx extends Legend, ComponentEx
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddLegendItem(LegendItemEx item)Add the given item to this legend.voidcalcSize()Calculate size of this legend and re-layout legend items.voiddirectLocation(double locX, double locY)Sets the location without setting the position to Position.FREELegendItemEx[]getItems()Returns all legend items managed by this legendPlotExgetParent()Gets the parent of this component.doublegetThickness()Returns the thickness of this legend.voiditemContribitivityChanged(LegendItemImpl item)Called by a legend item to notify that the item's contributivity is changed.voiditemSizeChanged(LegendItemEx item)Called by a visible legend item to notify this legend that the item's size is changed.voiditemVisibilityChanged(LegendItemImpl item)Called by a legend item to notify this legend that the item's visibility is changed.voidputItemsToEnabledLegend()Put all items in this disabled legend to enabled upper legendvoidremoveLegendItem(LegendItemEx item)Remove the given item from this legend.-
Methods inherited from interface org.jplot2d.element.Legend
getColumns, getHAlign, getLocation, getPosition, getRowSpacingFactor, getVAlign, isBorderVisible, isEnabled, isMovable, setBorderVisible, setColumns, setEnabled, setHAlign, setLocation, setLocation, setMovable, setPosition, setRowSpacingFactor, setVAlign
-
Methods inherited from interface org.jplot2d.element.PComponent
getBounds, getColor, getEffectiveFont, getFontName, getFontScale, getFontSize, getFontStyle, getPaperTransform, getSelectableBounds, getSize, getZOrder, isCacheable, isSelectable, isVisible, setCacheable, setColor, setFont, setFontName, setFontScale, setFontSize, setFontStyle, setSelectable, setVisible, setZOrder
-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId
-
Methods inherited from interface org.jplot2d.element.impl.ComponentEx
canContribute, copyStructure, draw, getEffectiveColor, getEffectiveFontName, getEffectiveFontSize, getEffectiveFontStyle, getMooringMap, isMovable, isRedrawNeeded, parentEffectiveColorChanged, parentEffectiveFontChanged, setMovable, setRedrawNeeded, thisEffectiveColorChanged, thisEffectiveFontChanged
-
-
-
-
Method Detail
-
getParent
PlotEx getParent()
Description copied from interface:PComponentGets the parent of this component.- Specified by:
getParentin interfaceComponentEx- Specified by:
getParentin interfaceElement- Specified by:
getParentin interfaceElementEx- Specified by:
getParentin interfacePComponent- Returns:
- the parent of this component
-
getItems
LegendItemEx[] getItems()
Returns all legend items managed by this legend
-
putItemsToEnabledLegend
void putItemsToEnabledLegend()
Put all items in this disabled legend to enabled upper legend
-
directLocation
void directLocation(double locX, double locY)Sets the location without setting the position to Position.FREE- Parameters:
locX-locY-
-
addLegendItem
void addLegendItem(LegendItemEx item)
Add the given item to this legend. If this legend is disabled, the item should be added to its upper level legend. This method will set the legend property of added legend item to the actual hosting legend.- Parameters:
item- the legend item to be added
-
removeLegendItem
void removeLegendItem(LegendItemEx item)
Remove the given item from this legend. If this legend is disabled, the item should be removed from its upper level legend.- Parameters:
item- the legend item to be removed
-
itemSizeChanged
void itemSizeChanged(LegendItemEx item)
Called by a visible legend item to notify this legend that the item's size is changed.
-
itemVisibilityChanged
void itemVisibilityChanged(LegendItemImpl item)
Called by a legend item to notify this legend that the item's visibility is changed. An item is shown when both visibility and contributivity aretrue.
-
itemContribitivityChanged
void itemContribitivityChanged(LegendItemImpl item)
Called by a legend item to notify that the item's contributivity is changed. An item is shown when both visibility and contributivity aretrue.
-
getThickness
double getThickness()
Returns the thickness of this legend. When position is on top or bottom, thickness is its height. When position is on left or right, thickness is its width.- Returns:
- the thickness of this legend
-
calcSize
void calcSize()
Calculate size of this legend and re-layout legend items. This method is always called by plot when committing changes.
-
-
DMelt 3.0 © DataMelt by jWork.ORG