org.jplot2d.layout
Class SimpleLayoutDirector
- java.lang.Object
-
- org.jplot2d.layout.SimpleLayoutDirector
-
- All Implemented Interfaces:
- LayoutDirector
- Direct Known Subclasses:
- GridLayoutDirector, OverlayLayoutDirector
public class SimpleLayoutDirector extends java.lang.Object implements LayoutDirector
This LayoutDirector only layout layers, all subplot are not considered.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classSimpleLayoutDirector.AxesInPlotAll Axes in a plot grouped by position.
-
Constructor Summary
Constructors Constructor and Description SimpleLayoutDirector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.ObjectgetConstraint(PlotEx plot)Returns the constraint for the given plot.java.awt.geom.Dimension2DgetPreferredContentSize(PlotEx plot)Calculate the preferred content size of the given plot.java.awt.geom.Dimension2DgetPreferredSize(PlotEx plot)Returns the preferred size of the given plot.voidinvalidateLayout(PlotEx plot)Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.voidlayout(PlotEx plot)Layout the plot.voidremove(PlotEx plot)Removes the given child from this layout.voidsetConstraint(PlotEx plot, java.lang.Object constraint)Sets the constraint for the given plot.java.lang.StringtoString()
-
-
-
Method Detail
-
getConstraint
public java.lang.Object getConstraint(PlotEx plot)
Description copied from interface:LayoutDirectorReturns the constraint for the given plot.- Specified by:
getConstraintin interfaceLayoutDirector- Parameters:
plot- The plot- Returns:
- The constraint
-
remove
public void remove(PlotEx plot)
Description copied from interface:LayoutDirectorRemoves the given child from this layout.- Specified by:
removein interfaceLayoutDirector
-
setConstraint
public void setConstraint(PlotEx plot, java.lang.Object constraint)
Description copied from interface:LayoutDirectorSets the constraint for the given plot.- Specified by:
setConstraintin interfaceLayoutDirector
-
invalidateLayout
public void invalidateLayout(PlotEx plot)
Description copied from interface:LayoutDirectorInvalidates the layout, indicating that if the layout manager has cached information it should be discarded.- Specified by:
invalidateLayoutin interfaceLayoutDirector- Parameters:
plot- the plot has been invalidate.
-
layout
public void layout(PlotEx plot)
Description copied from interface:LayoutDirectorLayout the plot. Normally the plot contents size is calculated by subtracting margin from plot size. If the plot has contents size constraint, the plot size is calculated by adding margin to plot content size.- Specified by:
layoutin interfaceLayoutDirector
-
getPreferredContentSize
public java.awt.geom.Dimension2D getPreferredContentSize(PlotEx plot)
Calculate the preferred content size of the given plot. The default implementation returns the plot.getPreferredContentSize(), which can be override by subclass to consider nested subplots. The returned size may benullif there is no enough information to derive a value.- Specified by:
getPreferredContentSizein interfaceLayoutDirector- Parameters:
plot-- Returns:
- the preferred content size
-
getPreferredSize
public java.awt.geom.Dimension2D getPreferredSize(PlotEx plot)
Description copied from interface:LayoutDirectorReturns the preferred size of the given plot.- Specified by:
getPreferredSizein interfaceLayoutDirector- Parameters:
plot- The plot- Returns:
- The preferred size
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG