All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.samples.uml.ClassBox

java.lang.Object
   |
   +----CH.ifa.draw.standard.AbstractFigure
           |
           +----CH.ifa.draw.standard.CompositeFigure
                   |
                   +----CH.ifa.draw.standard.PanelComposite
                           |
                           +----CH.ifa.draw.standard.CompartmentPanel
                                   |
                                   +----CH.ifa.draw.samples.uml.ClassBox

public class ClassBox
extends CompartmentPanel
A test implementation of an UML Class figure.


Constructor Index

 o ClassBox()
 o ClassBox(Point, Point)

Method Index

 o createCompartmentAt(int, int, DrawingView)
Create a new compartment at the point (x,y).
 o createCompartments(Point, Point)
Creates one FigureHolder compartment by default.
 o createRootFigure()
Creates a RootRoundRectangleFigure.
 o createRootFigure(Point, Point)
Creates a RootRoundRectangleFigure.
 o drawDividers(Graphics)
Draws a horizontal solid line after each name compartment and a vertical dashed line after each state machine compartment (except the last).
 o getLayout(Point, Point)
Computes and returns the layout of figure holders within the box defined by origin and corner.
 o getMinimumLayout()
Returns a vector of rectangles representing the minimum space required by the compartments arranged according to the current layout strategy.
 o removeCompartmentAt(int, int)
Delete the compartment at the point (x,y).

Constructors

 o ClassBox
 public ClassBox()
 o ClassBox
 public ClassBox(Point origin,
                 Point corner)

Methods

 o createRootFigure
 protected RootFigure createRootFigure()
Creates a RootRoundRectangleFigure.

Overrides:
createRootFigure in class PanelComposite
 o createRootFigure
 protected RootFigure createRootFigure(Point origin,
                                       Point corner)
Creates a RootRoundRectangleFigure.

Overrides:
createRootFigure in class PanelComposite
 o createCompartments
 protected void createCompartments(Point origin,
                                   Point corner)
Creates one FigureHolder compartment by default.

Overrides:
createCompartments in class CompartmentPanel
 o getMinimumLayout
 protected Vector getMinimumLayout()
Returns a vector of rectangles representing the minimum space required by the compartments arranged according to the current layout strategy. The name compartments are tiled vertically (top-down).

Overrides:
getMinimumLayout in class CompartmentPanel
 o getLayout
 protected Vector getLayout(Point origin,
                            Point corner)
Computes and returns the layout of figure holders within the box defined by origin and corner. The layout is returned as a vector of rectangles that holds the new display boxes of the holders. The name compartments are tiled vertically (top-down) The name compartments are stretched horizontally to fill the display box and the last compartment is also stretched horizontally.

Overrides:
getLayout in class CompartmentPanel
 o drawDividers
 public void drawDividers(Graphics g)
Draws a horizontal solid line after each name compartment and a vertical dashed line after each state machine compartment (except the last).

Overrides:
drawDividers in class CompartmentPanel
 o createCompartmentAt
 public void createCompartmentAt(int x,
                                 int y,
                                 DrawingView view)
Create a new compartment at the point (x,y). The created compartment is a default FigureHolder that is inserted after the compartment found currently at (x,y).

Overrides:
createCompartmentAt in class CompartmentPanel
 o removeCompartmentAt
 public void removeCompartmentAt(int x,
                                 int y)
Delete the compartment at the point (x,y). The contents of the compartment is merged with the previous compartment.

Overrides:
removeCompartmentAt in class CompartmentPanel

All Packages  Class Hierarchy  This Package  Previous  Next  Index