org.jplot2d.element.impl
Interface PlotEx
-
- All Superinterfaces:
- ComponentEx, ContainerEx, Element, ElementEx, PComponent, Plot
- All Known Implementing Classes:
- PlotImpl
public interface PlotEx extends Plot, ContainerEx
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidcommit()Apply all pending changes on this plot.PlotExcopyStructure(java.util.Map<ElementEx,ElementEx> orig2copyMap)Create a deep copy of this component.PlotExcopyStructureCascade(java.util.Map<ElementEx,ElementEx> orig2copyMap)Create a structural copy of this plot, without linking layer and axis transform.java.awt.geom.Dimension2DgetContentConstrant()Returns the contents constraint of this plot.LayerEx[]getLayers()Returns all layers in the order of added.LegendExgetLegend()Returns the legend of this plot.PlotMarginExgetMargin()Returns the margin area of this plot.NotifiergetNotifier()PlotExgetParent()Gets the parent of this component.java.lang.StringgetShortId()Returns the short id of this plot.PlotEx[]getSubplots()Gets the nth subplot in this plot.TitleEx[]getTitles()Returns all titles in the order of added.AxisEx[]getXAxes()AxisEx[]getYAxes()intindexOf(LayerEx layer)intindexOf(PlotEx subplot)intindexOf(TitleEx title)intindexOfXAxis(AxisEx axis)intindexOfYAxis(AxisEx axis)voidinvalidate()Invalidates this component.booleanisRerenderNeeded()Returns the flag that indicate if this plot is needed to be re-rendered.booleanisValid()Determines whether this plot is valid.voidparentPaperTransformChanged()voidsetContentConstrant(java.awt.geom.Dimension2D constraint)Impose contents constraint on this plot.voidsetContentSize(java.awt.geom.Dimension2D csize)Sets the content size by layout director.voidsetNotifier(Notifier notifier)Sets a notifier to receive all notice messages.voidsetRerenderNeeded(boolean flag)Mark or clear the flag that indicate this plot artifact need to be re-rendered.voidvalidate()Mark this component has a valid layout.-
Methods inherited from interface org.jplot2d.element.Plot
adaptiveZoomX, adaptiveZoomY, addLayer, addLayer, addLayer, addSubplot, addTitle, addXAxes, addXAxis, addYAxes, addYAxis, getConstraint, getContainerSize, getContentSize, getLayer, getLayoutDirector, getLocation, getPreferredContentSize, getScale, getSizeMode, getSubplot, getTitle, getXAxis, getYAxis, removeLayer, removeSubplot, removeTitle, removeXAxis, removeYAxis, setConstraint, setContainerSize, setLayoutDirector, setLocation, setLocation, setPreferredContentSize, setPreferredContentSize, setScale, setSize, setSize, setSizeMode, setSubplotConstraint, zoomXRange, zoomYRange
-
Methods inherited from interface org.jplot2d.element.impl.ContainerEx
getComponents
-
Methods inherited from interface org.jplot2d.element.impl.ComponentEx
canContribute, draw, getEffectiveColor, getEffectiveFontName, getEffectiveFontSize, getEffectiveFontStyle, getMooringMap, isMovable, isRedrawNeeded, parentEffectiveColorChanged, parentEffectiveFontChanged, setMovable, setRedrawNeeded, thisEffectiveColorChanged, thisEffectiveFontChanged
-
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.impl.ElementEx
copyFrom, getFullId, getInvokeStepFormParent, notify, setParent
-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId
-
-
-
-
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- Specified by:
getParentin interfacePlot- Returns:
- the parent of this component
-
copyStructure
PlotEx copyStructure(java.util.Map<ElementEx,ElementEx> orig2copyMap)
Description copied from interface:ComponentExCreate a deep copy of this component. The parent of the copy are not set.- Specified by:
copyStructurein interfaceComponentEx- Specified by:
copyStructurein interfaceElementEx- Parameters:
orig2copyMap- original element to copy map- Returns:
- a deep copy of this component
-
copyStructureCascade
PlotEx copyStructureCascade(java.util.Map<ElementEx,ElementEx> orig2copyMap)
Create a structural copy of this plot, without linking layer and axis transform.
-
getShortId
java.lang.String getShortId()
Returns the short id of this plot. The short id is composed of series of ids concatenated with dots. The 1st id is the id of this element, the 2nd id is the id of the parent of this element, etc, until but not include the root plot.- Returns:
- the short id of this plot.
-
isValid
boolean isValid()
Determines whether this plot is valid. A plot is valid when it is correctly sized and positioned within its parent plot and all its axes, titles, legend and subplot are also valid.- Returns:
trueif the component is valid,falseotherwise- See Also:
validate(),invalidate()
-
invalidate
void invalidate()
Invalidates this component. This component and all parents above it are marked as needing to be laid out. This method can be called often, so it needs to execute quickly.- See Also:
validate()
-
validate
void validate()
Mark this component has a valid layout.- See Also:
invalidate()
-
isRerenderNeeded
boolean isRerenderNeeded()
Returns the flag that indicate if this plot is needed to be re-rendered. This flag will control if rendering process is executed by all renderers of a RenderEnvironment.- Returns:
- the flag that indicate if this plot is needed to be re-rendered
-
setRerenderNeeded
void setRerenderNeeded(boolean flag)
Mark or clear the flag that indicate this plot artifact need to be re-rendered. Any component changes which do not require redraw and require re-render the plot can call this method. eg, when a cacheable component removed.- Parameters:
flag- the flag that indicate this plot artifact need to be re-rendered
-
getNotifier
Notifier getNotifier()
-
setNotifier
void setNotifier(Notifier notifier)
Sets a notifier to receive all notice messages.- Parameters:
notifier-
-
commit
void commit()
Apply all pending changes on this plot. After this method is called, all axis range and layout are valid.
-
getMargin
PlotMarginEx getMargin()
Description copied from interface:PlotReturns the margin area of this plot.
-
getLegend
LegendEx getLegend()
Description copied from interface:PlotReturns the legend of this plot.
-
indexOf
int indexOf(TitleEx title)
-
getTitles
TitleEx[] getTitles()
Description copied from interface:PlotReturns all titles in the order of added.
-
indexOf
int indexOf(LayerEx layer)
-
getLayers
LayerEx[] getLayers()
Description copied from interface:PlotReturns all layers in the order of added.
-
indexOfXAxis
int indexOfXAxis(AxisEx axis)
-
indexOfYAxis
int indexOfYAxis(AxisEx axis)
-
indexOf
int indexOf(PlotEx subplot)
-
getSubplots
PlotEx[] getSubplots()
Description copied from interface:PlotGets the nth subplot in this plot.- Specified by:
getSubplotsin interfacePlot- Returns:
- the nth subplot in this plot
-
parentPaperTransformChanged
void parentPaperTransformChanged()
-
setContentSize
void setContentSize(java.awt.geom.Dimension2D csize)
Sets the content size by layout director. All layers in this plot have the same viewport size.The layout manager guarantee this method is called after setting plot margin, and no matter if the content size is changed.
- Parameters:
csize- the content size
-
getContentConstrant
java.awt.geom.Dimension2D getContentConstrant()
Returns the contents constraint of this plot.- Returns:
- the contents constraint
-
setContentConstrant
void setContentConstrant(java.awt.geom.Dimension2D constraint)
Impose contents constraint on this plot. This method is called by a plot's layout director, when laying out subplots of the plot.- Parameters:
constraint- the contents constraint
-
-
DMelt 3.0 © DataMelt by jWork.ORG