All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.standard.ListHolder

java.lang.Object
   |
   +----CH.ifa.draw.standard.AbstractFigure
           |
           +----CH.ifa.draw.standard.CompositeFigure
                   |
                   +----CH.ifa.draw.standard.FigureHolder
                           |
                           +----CH.ifa.draw.standard.ListHolder

public abstract class ListHolder
extends FigureHolder
A ListHolder keeps its contents stacked vertically. The horizontal alignment is determined by concrete subclasses. The contained figures are kept in ascending order by the y-coordinate of their origin.


Constructor Index

 o ListHolder()
 o ListHolder(Point, Point)
 o ListHolder(Point, Point, Margins)

Method Index

 o arrange()
Fill the arrangement vector with Aligner objects for the contained subfigures.
 o findPos(Figure)
Returns the relative position of figure among the stationary (i.e.
 o getBottomElementAligner(Figure)
Gets the aligner for the bottom element of the list.
 o getMiddleElementAligner(Figure)
Gets the aligner for a middle element of the list.
 o getOrderingPredicate()
Returns the ordering predicate.
 o getTopElementAligner()
Gets the aligner for the top element of the list.
 o setChildAligner(Figure)
A child has changed.
 o setChildAligners()
Set the aligners of the contained figures.

Constructors

 o ListHolder
 public ListHolder()
 o ListHolder
 public ListHolder(Point origin,
                   Point corner)
 o ListHolder
 public ListHolder(Point origin,
                   Point corner,
                   Margins margins)

Methods

 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 findPos
 protected int findPos(Figure figure)
Returns the relative position of figure among the stationary (i.e. not being dragged) figures contained by this.

Overrides:
findPos in class FigureHolder
 o arrange
 protected void arrange()
Fill the arrangement vector with Aligner objects for the contained subfigures. Call setChildAligners to make sure that the children have correct aligner objects (ordering may have changed when this method is called).

Overrides:
arrange in class FigureHolder
 o setChildAligner
 protected void setChildAligner(Figure child)
A child has changed. Reorganize the holdees.

Overrides:
setChildAligner in class FigureHolder
 o getTopElementAligner
 protected abstract Aligner getTopElementAligner()
Gets the aligner for the top element of the list.

 o getMiddleElementAligner
 protected abstract Aligner getMiddleElementAligner(Figure previous)
Gets the aligner for a middle element of the list.

 o getBottomElementAligner
 protected abstract Aligner getBottomElementAligner(Figure previous)
Gets the aligner for the bottom element of the list.

 o setChildAligners
 protected void setChildAligners()
Set the aligners of the contained figures. Implement the get/Top/Middle/Bottom/ElementAligner methods to get the specific alignment (layout) you want.


All Packages  Class Hierarchy  This Package  Previous  Next  Index