org.argouml.uml.diagram.ui
Class FigStereotypesGroup

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

public class FigStereotypesGroup
extends ArgoFigGroup

A Fig designed to be the child of some FigNode or FigEdge to display the stereotypes of the model element represented by the parent Fig. Currently, multiple stereotypes are shown stacked one on top of the other, each enclosed by guillemets.

The minimum width of this fig is the largest minimum width of its child figs. The minimum height of this fig is the total minimum height of its child figs.

The owner of this Fig is the UML element that is extended with the stereotypes. We are listening to changes to the model: addition and removal of stereotypes.

This fig supports showing one keyword as the first "stereotype" in the list.

There is no way to remove a keyword fig, once added.

TODO: Allow for UML2 style display where all stereotypes are displayed in the same guillemet pair and are delimited by commas. The style should be changeable by calling getOrientation(Orientation). The swidget Orientation class can be used for this.


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
FigStereotypesGroup(int x, int y, int w, int h)
          Deprecated. for 0.27.3 by tfmorris. Use FigStereotypesGroup(Object, Rectangle, DiagramSettings).
FigStereotypesGroup(java.lang.Object owner, java.awt.Rectangle bounds, DiagramSettings settings)
          The constructor.
 
Method Summary
protected  Fig getBigPort()
          Deprecated. for 0.27.2. For backward compatibility only. The visibility of this method will be changed to private in the next release when FigStereotypesCompartment is removed.
 java.awt.Dimension getMinimumSize()
           
 int getStereotypeCount()
          Get the number of stereotypes contained in this group
 boolean isHidingStereotypesWithIcon()
           
 void populate()
          TODO: This should become private and only called from constructor
 void propertyChange(java.beans.PropertyChangeEvent event)
           
 void removeFromDiagram()
           
protected  void setBoundsImpl(int x, int y, int w, int h)
           
 void setHidingStereotypesWithIcon(boolean hideStereotypesWithIcon)
          Turn on/off textual stereotype display in preference to icon.
 void setKeyword(java.lang.String word)
          Allows a parent Fig to specify some keyword text to display amongst the stereotypes.
 
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

FigStereotypesGroup

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

The constructor.

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

FigStereotypesGroup

public FigStereotypesGroup(java.lang.Object owner,
                           java.awt.Rectangle bounds,
                           DiagramSettings settings)
The constructor.

Parameters:
owner - owning UML element
bounds - position and size
settings - render settings
Method Detail

removeFromDiagram

public void removeFromDiagram()

getBigPort

@Deprecated
protected Fig getBigPort()
Deprecated. for 0.27.2. For backward compatibility only. The visibility of this method will be changed to private in the next release when FigStereotypesCompartment is removed.

Returns:
the bigport

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)

populate

public void populate()
TODO: This should become private and only called from constructor

See Also:
FigEditableCompartment.populate()

getStereotypeCount

public int getStereotypeCount()
Get the number of stereotypes contained in this group

Returns:
the number of stereotypes in this group

setBoundsImpl

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

setKeyword

public void setKeyword(java.lang.String word)
Allows a parent Fig to specify some keyword text to display amongst the stereotypes. An example of this usage is to display <<interface>> on FigInterface.

Parameters:
word - the text of the pseudo stereotype

isHidingStereotypesWithIcon

public boolean isHidingStereotypesWithIcon()
Returns:
true if textual stereotypes are being hidden in preference to displaying icon.

setHidingStereotypesWithIcon

public void setHidingStereotypesWithIcon(boolean hideStereotypesWithIcon)
Turn on/off textual stereotype display in preference to icon.

Parameters:
hideStereotypesWithIcon - true to hide textual stereotypes and show icon instead.

getMinimumSize

public java.awt.Dimension getMinimumSize()


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook