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.


Method Index

 o add(Enumeration)
Add a sequence of figures.
 o add(Figure)
Add a figure to this.
 o changed()
Do what ever updates are needed to maintain consistency and signal a change message to listeners.
 o contains(Figure)
Return true if this contains the figure.
 o displayBox()
Return the display box of this.
 o displayBox(Point, Point)
Set the display box of this.
 o displayBox(Rectangle)
Set the display box of this.
 o elements()
Return an enumeration of the contents.
 o getFitter()
Return the current fitting algorithm.
 o mergeWith(Compartment)
Merge this with an (adjacent) compartment.
 o moveBy(int, int)
Move the display box by the given distances (but NOT the subfigures).
 o orphan(Figure)
Remove the figure but do not release it.
 o pack()
This method implements the layout algorithm of the compartment class.
 o preferredSize()
Return the preferred size of this.
 o release()
Release the contents.
 o remove(Figure)
Remove the given figure from this and return the removed figure.
 o setFitter(DisplayBoxFitter)
Set the display box fitting algorithm.

Methods

 o displayBox
 public abstract void displayBox(Point origin,
                                 Point corner)
Set the display box of this.

 o displayBox
 public abstract void displayBox(Rectangle box)
Set the display box of this.

 o displayBox
 public abstract Rectangle displayBox()
Return the display box of this.

 o moveBy
 public abstract void moveBy(int x,
                             int y)
Move the display box by the given distances (but NOT the subfigures).

 o 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.

 o add
 public abstract Figure add(Figure figure)
Add a figure to this.

 o add
 public abstract void add(Enumeration figures)
Add a sequence of figures.

 o remove
 public abstract Figure remove(Figure figure)
Remove the given figure from this and return the removed figure.

 o orphan
 public abstract Figure orphan(Figure figure)
Remove the figure but do not release it. Return the figure.

 o contains
 public abstract boolean contains(Figure figure)
Return true if this contains the figure.

 o elements
 public abstract Enumeration elements()
Return an enumeration of the contents.

 o changed
 public abstract void changed()
Do what ever updates are needed to maintain consistency and signal a change message to listeners.

 o setFitter
 public abstract void setFitter(DisplayBoxFitter fitter)
Set the display box fitting algorithm.

 o getFitter
 public abstract DisplayBoxFitter getFitter()
Return the current fitting algorithm.

 o mergeWith
 public abstract void mergeWith(Compartment other)
Merge this with an (adjacent) compartment.

 o release
 public abstract void release()
Release the contents.

 o pack
 public abstract void pack()
This method implements the layout algorithm of the compartment class.


All Packages  Class Hierarchy  This Package  Previous  Next  Index