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.
-
ListHolder()
-
-
ListHolder(Point, Point)
-
-
ListHolder(Point, Point, Margins)
-
-
arrange()
- Fill the arrangement vector with Aligner objects
for the contained subfigures.
-
findPos(Figure)
- Returns the relative position of figure among the stationary (i.e.
-
getBottomElementAligner(Figure)
-
Gets the aligner for the bottom element of the list.
-
getMiddleElementAligner(Figure)
-
Gets the aligner for a middle element of the list.
-
getOrderingPredicate()
- Returns the ordering predicate.
-
getTopElementAligner()
-
Gets the aligner for the top element of the list.
-
setChildAligner(Figure)
-
A child has changed.
-
setChildAligners()
-
Set the aligners of the contained figures.
ListHolder
public ListHolder()
ListHolder
public ListHolder(Point origin,
Point corner)
ListHolder
public ListHolder(Point origin,
Point corner,
Margins margins)
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.
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
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
setChildAligner
protected void setChildAligner(Figure child)
- A child has changed. Reorganize the holdees.
- Overrides:
- setChildAligner in class FigureHolder
getTopElementAligner
protected abstract Aligner getTopElementAligner()
- Gets the aligner for the top element of the list.
getMiddleElementAligner
protected abstract Aligner getMiddleElementAligner(Figure previous)
- Gets the aligner for a middle element of the list.
getBottomElementAligner
protected abstract Aligner getBottomElementAligner(Figure previous)
- Gets the aligner for the bottom element of the list.
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