All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.contrib.xcomp.VListLayout
CH.ifa.draw.contrib.xcomp.BagLayout
|
+----CH.ifa.draw.contrib.xcomp.AbstractFlowLayout
|
+----CH.ifa.draw.contrib.xcomp.BagFlowLayout
|
+----CH.ifa.draw.contrib.xcomp.BagFlowLayout2
|
+----CH.ifa.draw.contrib.xcomp.VListLayout
- public class VListLayout
- extends BagFlowLayout2
The basic implementation for list-like layout strategies.
Like BagLayout this layout manager positions the contained
figures 'as they were'. That is, no positioning is performed.
This is an example implementation that shows how the mechanisms
of super classes are used to create specialized layout managers.
-
VListLayout()
-
-
VListLayout(int)
-
-
attachAligners()
-
-
findPos(Figure)
- Find the position of figure among the subfigures according to the current
layout strategy.
-
getBottomElementAligner(CompositeFigure, Figure, Figure)
- Returns a NullAligner.
-
getHgap()
-
-
getMiddleElementAligner(CompositeFigure, Figure, Figure)
- Returns a NullAligner.
-
getOrderingPredicate()
- Returns the ordering predicate.
-
getTopElementAligner(CompositeFigure, Figure)
- Returns a NullAligner.
-
invalidateLayout(Figure)
- Force rearrangement.
-
layoutContainer(CompositeFigure)
- The bag layout algorithm.
-
minimumLayoutRectangle(CompositeFigure)
-
For bag layout, the minimum display box is the box that contains
all components at their preferred sizes with the insets of the
container.
-
preferredLayoutRectangle(CompositeFigure)
- Calculates the minimum size display box for the specified container
at its current location.
-
setHgap(int)
-
VListLayout
public VListLayout()
VListLayout
public VListLayout(int hgap)
getHgap
public int getHgap()
setHgap
public void setHgap(int gap)
getOrderingPredicate
protected BinaryPredicate getOrderingPredicate()
- Returns the ordering predicate. Figures are ordered in ascending
order by the y-coordinate of the origin of their display box.
invalidateLayout
public void invalidateLayout(Figure component)
- Force rearrangement.
- Overrides:
- invalidateLayout in class BagFlowLayout
attachAligners
protected void attachAligners()
- Overrides:
- attachAligners in class AbstractFlowLayout
preferredLayoutRectangle
public Rectangle preferredLayoutRectangle(CompositeFigure container)
- Calculates the minimum size display box for the specified container
at its current location.
- Overrides:
- preferredLayoutRectangle in class BagFlowLayout
minimumLayoutRectangle
public Rectangle minimumLayoutRectangle(CompositeFigure container)
- For bag layout, the minimum display box is the box that contains
all components at their preferred sizes with the insets of the
container.
- Overrides:
- minimumLayoutRectangle in class BagFlowLayout
layoutContainer
public void layoutContainer(CompositeFigure container)
- The bag layout algorithm.
- Overrides:
- layoutContainer in class BagFlowLayout
getTopElementAligner
protected Aligner getTopElementAligner(CompositeFigure container,
Figure component)
- Returns a NullAligner.
- Overrides:
- getTopElementAligner in class BagFlowLayout
getMiddleElementAligner
protected Aligner getMiddleElementAligner(CompositeFigure container,
Figure component,
Figure previous)
- Returns a NullAligner.
- Overrides:
- getMiddleElementAligner in class BagFlowLayout
getBottomElementAligner
protected Aligner getBottomElementAligner(CompositeFigure container,
Figure component,
Figure previous)
- Returns a NullAligner.
- Overrides:
- getBottomElementAligner in class BagFlowLayout
findPos
protected int findPos(Figure figure)
- Find the position of figure among the subfigures according to the current
layout strategy. Return an index to the vector of subfigures. The default
is to return the last+1 position.
- Overrides:
- findPos in class AbstractFlowLayout
All Packages Class Hierarchy This Package Previous Next Index