public class VerticalLayouter extends AbstractLayouter
Layouter
which lays out all children of a CompositeFigure
in vertical direction.
The preferred size of the figures is used to determine the layout. This may cause some figures to resize.
The VerticalLayouter honors the LAYOUT_INSETS and the COMPOSITE_ALIGNMENT AttributeKey when laying out a CompositeFigure.
If COMPOSITE_ALIGNMENT is not set on the composite figure, the layout assigns the same width to all figures.
Constructor and Description |
---|
VerticalLayouter() |
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D.Double |
calculateLayout(CompositeFigure layoutable,
java.awt.geom.Point2D.Double anchor,
java.awt.geom.Point2D.Double lead)
Calculate the layout for the figure and all its subelements.
|
java.awt.geom.Rectangle2D.Double |
layout(CompositeFigure layoutable,
java.awt.geom.Point2D.Double anchor,
java.awt.geom.Point2D.Double lead)
Method which lays out a figure.
|
getInsets
public java.awt.geom.Rectangle2D.Double calculateLayout(CompositeFigure layoutable, java.awt.geom.Point2D.Double anchor, java.awt.geom.Point2D.Double lead)
Layouter
anchor
- start point for the layoutlead
- minimum lead point for the layoutpublic java.awt.geom.Rectangle2D.Double layout(CompositeFigure layoutable, java.awt.geom.Point2D.Double anchor, java.awt.geom.Point2D.Double lead)
Layouter
anchor
- start point for the layoutlead
- minimum lead point for the layout