org.jhotdraw.draw
Class VerticalLayouter
java.lang.Object
org.jhotdraw.draw.AbstractLayouter
org.jhotdraw.draw.VerticalLayouter
- All Implemented Interfaces:
- Layouter
public class VerticalLayouter
- extends AbstractLayouter
A layouter which lays out all children of a CompositeFigure in vertical
direction. The preferredSize of the figures is used to determine the layout.
This may cause some figures to resize.
The VerticalLayouter honors the LAYOUT_INSETS AttributeKey when laying
out a Figure.
- Version:
- 2.0 2006-01-14 Changed to support double precision coordinates.
1.0 1. Dezember 2003 Created.
- Author:
- Werner Randelshofer
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VerticalLayouter
public VerticalLayouter()
calculateLayout
public java.awt.geom.Rectangle2D.Double calculateLayout(CompositeFigure layoutable,
java.awt.geom.Point2D.Double anchor,
java.awt.geom.Point2D.Double lead)
- Description copied from interface:
Layouter
- Calculate the layout for the figure and all its subelements. The
layout is not actually performed but just its dimensions are calculated.
anchor
- start point for the layoutlead
- minimum lead point for the layout
layout
public java.awt.geom.Rectangle2D.Double layout(CompositeFigure layoutable,
java.awt.geom.Point2D.Double anchor,
java.awt.geom.Point2D.Double lead)
- Description copied from interface:
Layouter
- Method which lays out a figure. It is called by the figure
if a layout task is to be performed. Implementing classes
specify a certain layout algorithm in this method.
anchor
- start point for the layoutlead
- minimum lead point for the layout