All Packages Class Hierarchy This Package Previous Next Index
Interface CH.ifa.draw.framework.Compartment
- public interface Compartment
- extends Serializable
A compartment is a subarea (NOT a figure) within a composite denoted
by the display box of the compartement. A compartment
keeps track of the subfigures within its area and a it has a
layout strategy for its contents. Compartments can be merged.
-
add(Enumeration)
- Add a sequence of figures.
-
add(Figure)
- Add a figure to this.
-
changed()
- Do what ever updates are needed to maintain consistency and signal
a change message to listeners.
-
contains(Figure)
- Return true if this contains the figure.
-
displayBox()
- Return the display box of this.
-
displayBox(Point, Point)
- Set the display box of this.
-
displayBox(Rectangle)
- Set the display box of this.
-
elements()
- Return an enumeration of the contents.
-
getFitter()
- Return the current fitting algorithm.
-
mergeWith(Compartment)
- Merge this with an (adjacent) compartment.
-
moveBy(int, int)
- Move the display box by the given
distances (but NOT the subfigures).
-
orphan(Figure)
- Remove the figure but do not release it.
-
pack()
- This method implements the layout algorithm of the compartment class.
-
preferredSize()
- Return the preferred size of this.
-
release()
- Release the contents.
-
remove(Figure)
- Remove the given figure from this and return the removed figure.
-
setFitter(DisplayBoxFitter)
- Set the display box fitting algorithm.
displayBox
public abstract void displayBox(Point origin,
Point corner)
- Set the display box of this.
displayBox
public abstract void displayBox(Rectangle box)
- Set the display box of this.
displayBox
public abstract Rectangle displayBox()
- Return the display box of this.
moveBy
public abstract void moveBy(int x,
int y)
- Move the display box by the given
distances (but NOT the subfigures).
preferredSize
public abstract Dimension preferredSize()
- Return the preferred size of this. Usually computed based on the
sizes of the contained figures and their relative positions which
are computed using the current layout strategy.
add
public abstract Figure add(Figure figure)
- Add a figure to this.
add
public abstract void add(Enumeration figures)
- Add a sequence of figures.
remove
public abstract Figure remove(Figure figure)
- Remove the given figure from this and return the removed figure.
orphan
public abstract Figure orphan(Figure figure)
- Remove the figure but do not release it. Return the figure.
contains
public abstract boolean contains(Figure figure)
- Return true if this contains the figure.
elements
public abstract Enumeration elements()
- Return an enumeration of the contents.
changed
public abstract void changed()
- Do what ever updates are needed to maintain consistency and signal
a change message to listeners.
setFitter
public abstract void setFitter(DisplayBoxFitter fitter)
- Set the display box fitting algorithm.
getFitter
public abstract DisplayBoxFitter getFitter()
- Return the current fitting algorithm.
mergeWith
public abstract void mergeWith(Compartment other)
- Merge this with an (adjacent) compartment.
release
public abstract void release()
- Release the contents.
pack
public abstract void pack()
- This method implements the layout algorithm of the compartment class.
All Packages Class Hierarchy This Package Previous Next Index