org.argouml.uml.diagram.ui
Class FigCompartment

java.lang.Object
  extended by FigGroup
      extended by org.argouml.uml.diagram.ui.ArgoFigGroup
          extended by org.argouml.uml.diagram.ui.FigCompartment
All Implemented Interfaces:
ArgoFig
Direct Known Subclasses:
FigEditableCompartment

public abstract class FigCompartment
extends ArgoFigGroup

Presentation logic for a UML List Compartment.

The UML defines a Name Compartment, and a List Compartment. This class implements the latter.

A List Compartment is a boxed compartment, containing vertically stacked figs, which is common to e.g. an operations compartment and an attributes compartment.

The bigPort is filled, but has no border. All other figs contained in this group may not be filled, but can have a border.

The size calculation done here supports vertically stacked sub-figs of this group and supports all compartment specializations.


Field Summary
 
Fields inherited from interface org.argouml.uml.diagram.ui.ArgoFig
DEBUG, DEBUG_COLOR, FILL_COLOR, INVISIBLE_LINE_COLOR, LINE_COLOR, LINE_WIDTH, ROWHEIGHT, SOLID_FILL_COLOR, STEREOHEIGHT, TEXT_COLOR, X0, Y0
 
Constructor Summary
FigCompartment(int x, int y, int w, int h)
          Deprecated. for 0.27.3 by tfmorris. Use FigCompartment(Object, Rectangle, DiagramSettings).
FigCompartment(java.lang.Object owner, java.awt.Rectangle bounds, DiagramSettings settings)
          Construct a new FigCompartment.
 
Method Summary
protected abstract  void createModelElement()
          Create a new model element for the compartment.
 Fig getBigPort()
           
abstract  java.lang.Object getCompartmentType()
          Implemented in the subclass to indicate the primary type of model element the compartment is designed to hold.
 boolean getFilled()
          Deprecated. 
 java.awt.Dimension getMinimumSize()
          The minimum width is the minimum width of the child with the widest minimum width.
abstract  java.lang.String getName()
          This operation shall return a name unique for this type of compartment.
 boolean isFilled()
           
abstract  void populate()
          The concrete Fig implements this to build all the child Figs
protected  void setBoundsImpl(int x, int y, int w, int h)
           
 void setFilled(boolean f)
           
 void setLineWidth(int w)
           
 
Methods inherited from class org.argouml.uml.diagram.ui.ArgoFigGroup
getProject, getSettings, renderingChanged, setOwner, setProject, setSettings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FigCompartment

@Deprecated
public FigCompartment(int x,
                                 int y,
                                 int w,
                                 int h)
Deprecated. for 0.27.3 by tfmorris. Use FigCompartment(Object, Rectangle, DiagramSettings).

The constructor.

Parameters:
x - x
y - y
w - width
h - height

FigCompartment

public FigCompartment(java.lang.Object owner,
                      java.awt.Rectangle bounds,
                      DiagramSettings settings)
Construct a new FigCompartment.

Parameters:
owner - owning UML element
bounds - rectangle describing bounds of compartment
settings - render settings
Method Detail

getBigPort

public Fig getBigPort()
Returns:
the bigPort

getMinimumSize

public java.awt.Dimension getMinimumSize()
The minimum width is the minimum width of the child with the widest minimum width. The minimum height is the total minimum height of all child figs.

Returns:
the minimum width

setBoundsImpl

protected void setBoundsImpl(int x,
                             int y,
                             int w,
                             int h)

createModelElement

protected abstract void createModelElement()
Create a new model element for the compartment.


setLineWidth

public void setLineWidth(int w)

setFilled

public void setFilled(boolean f)

getFilled

@Deprecated
public boolean getFilled()
Deprecated. 


isFilled

public boolean isFilled()

getName

public abstract java.lang.String getName()
This operation shall return a name unique for this type of compartment. Potential use: show at the top in the compartment as described in the UML, or as an identification string for the compartment type.

See UML 1.4.2 OMG, chapter 5.24.1.2: Compartment name.

Returns:
the name of the compartment

getCompartmentType

public abstract java.lang.Object getCompartmentType()
Implemented in the subclass to indicate the primary type of model element the compartment is designed to hold.

Returns:
a model element type

populate

public abstract void populate()
The concrete Fig implements this to build all the child Figs



ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook