org.jhotdraw.draw.layouter
Interface Layouter
-
- All Known Implementing Classes:
- AbstractLayouter, HorizontalLayouter, LocatorLayouter, VerticalLayouter
public interface LayouterA Layouter encapsulates a strategy for laying out the child figures of a CompositeFigure.
Design PatternsStrategy
Composite figures can be laid out using different layout algorithms which are implemented by layouters.
Context:CompositeFigure; Strategy:Layouter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.awt.geom.Rectangle2D.DoublecalculateLayout(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.Doublelayout(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 layoutlead- 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 layoutlead- minimum lead point for the layout
-
-
DataMelt 3.0 © DataMelt by jWork.ORG