JHotDraw 7.4.1

org.jhotdraw.draw.layouter
Interface Layouter

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

public interface Layouter

A Layouter encapsulates a strategy for laying out the child figures of a CompositeFigure.


Design Patterns

Strategy
Composite figures can be laid out using different layout algorithms which are implemented by layouters.
Context: CompositeFigure; Strategy: Layouter.


Version:
$Id: Layouter.java 604 2010-01-09 12:00:29Z rawcoder $
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-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.