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.


Constructor Index

 o VListLayout()
 o VListLayout(int)

Method Index

 o attachAligners()
 o findPos(Figure)
Find the position of figure among the subfigures according to the current layout strategy.
 o getBottomElementAligner(CompositeFigure, Figure, Figure)
Returns a NullAligner.
 o getHgap()
 o getMiddleElementAligner(CompositeFigure, Figure, Figure)
Returns a NullAligner.
 o getOrderingPredicate()
Returns the ordering predicate.
 o getTopElementAligner(CompositeFigure, Figure)
Returns a NullAligner.
 o invalidateLayout(Figure)
Force rearrangement.
 o layoutContainer(CompositeFigure)
The bag layout algorithm.
 o 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.
 o preferredLayoutRectangle(CompositeFigure)
Calculates the minimum size display box for the specified container at its current location.
 o setHgap(int)

Constructors

 o VListLayout
 public VListLayout()
 o VListLayout
 public VListLayout(int hgap)

Methods

 o getHgap
 public int getHgap()
 o setHgap
 public void setHgap(int gap)
 o 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.

 o invalidateLayout
 public void invalidateLayout(Figure component)
Force rearrangement.

Overrides:
invalidateLayout in class BagFlowLayout
 o attachAligners
 protected void attachAligners()
Overrides:
attachAligners in class AbstractFlowLayout
 o 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
 o 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
 o layoutContainer
 public void layoutContainer(CompositeFigure container)
The bag layout algorithm.

Overrides:
layoutContainer in class BagFlowLayout
 o getTopElementAligner
 protected Aligner getTopElementAligner(CompositeFigure container,
                                        Figure component)
Returns a NullAligner.

Overrides:
getTopElementAligner in class BagFlowLayout
 o getMiddleElementAligner
 protected Aligner getMiddleElementAligner(CompositeFigure container,
                                           Figure component,
                                           Figure previous)
Returns a NullAligner.

Overrides:
getMiddleElementAligner in class BagFlowLayout
 o getBottomElementAligner
 protected Aligner getBottomElementAligner(CompositeFigure container,
                                           Figure component,
                                           Figure previous)
Returns a NullAligner.

Overrides:
getBottomElementAligner in class BagFlowLayout
 o 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