JHotDraw 7.1

org.jhotdraw.draw
Interface Layouter

All Known Implementing Classes:
AbstractLayouter, HorizontalLayouter, LocatorLayouter, VerticalLayouter

public interface Layouter

A Layouter encapsulates a algorithm to layout a CompositeFigure. It is passed on to a figure which delegates the layout task to the Layouter's layout method. The Layouter might need access to some information specific to a certain figure in order to layout it out properly. Note: Currently, only the GraphicalCompositeFigure uses such a Layouter to layout its child components.

Version:
2.0 2006-01-14 Changed to support double precision coordinates.
1.0 2003-12-01 Derived from JHotDraw 5.4b1.
Author:
Werner Randelshofer

Method Summary
 java.awt.geom.Rectangle2D.Double calculateLayout(CompositeFigure compositeFigure, 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 compositeFigure, java.awt.geom.Point2D.Double anchor, java.awt.geom.Point2D.Double lead)
          Method which lays out a figure.
 

Method Detail

calculateLayout

java.awt.geom.Rectangle2D.Double calculateLayout(CompositeFigure compositeFigure,
                                                 java.awt.geom.Point2D.Double anchor,
                                                 java.awt.geom.Point2D.Double lead)
Calculate the layout for the figure and all its subelements. The layout is not actually performed but just its dimensions are calculated.

Parameters:
anchor - start point for the layout
lead - minimum lead point for the layout

layout

java.awt.geom.Rectangle2D.Double layout(CompositeFigure compositeFigure,
                                        java.awt.geom.Point2D.Double anchor,
                                        java.awt.geom.Point2D.Double lead)
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.

Parameters:
anchor - start point for the layout
lead - minimum lead point for the layout

Copyright 1996-2007 (c) JHotDraw.org.
Some rights reserved.