org.argouml.uml.diagram.state.ui
Class FigFinalState

java.lang.Object
  extended by FigNode
      extended by org.argouml.uml.diagram.ui.FigNodeModelElement
          extended by org.argouml.uml.diagram.state.ui.FigStateVertex
              extended by org.argouml.uml.diagram.state.ui.FigFinalState
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.beans.PropertyChangeListener, java.beans.VetoableChangeListener, java.util.EventListener, ArgoEventListener, ArgoDiagramAppearanceEventListener, ArgoNotationEventListener, Highlightable, DelayedVChangeListener, DiagramElement, PathContainer, ArgoFig, Clarifiable, StereotypeStyled, IItemUID

public class FigFinalState
extends FigStateVertex

Class to display graphics for a UML FinalState in a diagram.

This class supports any line width.


Field Summary
 
Fields inherited from class org.argouml.uml.diagram.ui.FigNodeModelElement
ABSTRACT, ACTIVE, invisibleAllowed, LEAF, NAME_FIG_HEIGHT, NAME_V_PADDING, ROOT, WIDTH
 
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
FigFinalState(java.lang.Object owner, java.awt.Rectangle bounds, DiagramSettings settings)
          Construct a new FigFinalState.
 
Method Summary
 java.lang.Object clone()
          Clone this figure.
protected  Fig createBigPortFig()
          Overrule this if a rectangle is not usable.
 java.awt.Color getFillColor()
           
 java.util.List getGravityPoints()
          Return a list of gravity points around the outer circle.
 java.awt.Color getLineColor()
           
 int getLineWidth()
           
 boolean isFilled()
           
 boolean isResizable()
          Final states are fixed size.
 Selection makeSelection()
          return selectors, depending whether we deal with activity or state diagrams.
 void mouseClicked(java.awt.event.MouseEvent me)
           
 void setFillColor(java.awt.Color col)
           
 void setFilled(boolean f)
           
 void setLineColor(java.awt.Color col)
           
 void setLineWidth(int w)
           
protected  void setStandardBounds(int x, int y, int w, int h)
          Override setBounds to keep shapes looking right.
 
Methods inherited from class org.argouml.uml.diagram.state.ui.FigStateVertex
redrawEnclosedFigs, setEnclosingFig
 
Methods inherited from class org.argouml.uml.diagram.ui.FigNodeModelElement
addElementListener, addElementListener, addElementListener, addEnclosedFig, allowRemoveFromDiagram, bindPort, buildModifierPopUp, buildShowPopUp, buildVisibilityPopUp, calcBounds, classNameAndBounds, createContainedModelElement, createStereotypeFig, delayedVetoableChange, deleteFromModel, determineDefaultPathVisible, diagramFontChanged, displace, enableSizeChecking, getBigPort, getDiElement, getEnclosedFigs, getEncloser, getEnclosingFig, getItemUID, getMinimumSize, getName, getNameBounds, getNameFig, getNameFigFontStyle, getNotationProviderType, getNotationSettings, getPopUpActions, getPopupAddOffset, getProject, getRemoveDelegate, getSettings, getStereotypeCount, getStereotypeFig, getStereotypeStyle, getStereotypeView, getTipString, hit, hitClarifier, initNotationProviders, isCheckSize, isDragConnectable, isEditable, isPartlyOwner, isPartlyOwner, isPathVisible, isReadyToEdit, isSingleTarget, keyPressed, keyReleased, keyTyped, modelChanged, moveIntoComponent, notationAdded, notationChanged, notationProviderAdded, notationProviderRemoved, notationRemoved, paintClarifiers, placeString, propertyChange, removeAllElementListeners, removeElementListener, removeEnclosedFig, removeFromDiagram, removeFromDiagramImpl, renderingChanged, setBigPort, setBoundsImpl, setDiElement, setEditable, setEncloser, setItemUID, setLayer, setName, setNameFig, setOwner, setPathVisible, setProject, setReadyToEdit, setSettings, setStereotypeStyle, setStereotypeView, setSuppressCalcBounds, setVisible, showHelp, textEdited, textEditStarted, updateBounds, updateElementListeners, updateFont, updateLayout, updateListeners, updateNameText, updateStereotypeIcon, updateStereotypeText, vetoableChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.MouseListener
mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods inherited from interface org.argouml.cognitive.Highlightable
getHighlight, setHighlight
 

Constructor Detail

FigFinalState

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

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

createBigPortFig

protected Fig createBigPortFig()
Description copied from class: FigNodeModelElement
Overrule this if a rectangle is not usable.

Overrides:
createBigPortFig in class FigNodeModelElement
Returns:
the Fig to be used as bigPort

clone

public java.lang.Object clone()
Description copied from class: FigNodeModelElement
Clone this figure. After the base clone method has been called determine which child figs of the clone represent the name, stereotype and port.

TODO: enclosedFigs, encloser and eventSenders may also need to be cloned.

Overrides:
clone in class FigNodeModelElement
Returns:
the cloned figure
See Also:
Object.clone()

makeSelection

public Selection makeSelection()
Description copied from class: FigStateVertex
return selectors, depending whether we deal with activity or state diagrams.

Overrides:
makeSelection in class FigStateVertex

isResizable

public boolean isResizable()
Final states are fixed size.

Returns:
false
See Also:
org.tigris.gef.presentation.Fig#isResizable()

setLineColor

public void setLineColor(java.awt.Color col)

getLineColor

public java.awt.Color getLineColor()

setFillColor

public void setFillColor(java.awt.Color col)

getFillColor

public java.awt.Color getFillColor()

setFilled

public void setFilled(boolean f)

isFilled

public boolean isFilled()

setLineWidth

public void setLineWidth(int w)
Overrides:
setLineWidth in class FigNodeModelElement

getLineWidth

public int getLineWidth()

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent me)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class FigNodeModelElement

getGravityPoints

public java.util.List getGravityPoints()
Return a list of gravity points around the outer circle. Used in place of the default bounding box.


setStandardBounds

protected void setStandardBounds(int x,
                                 int y,
                                 int w,
                                 int h)
Override setBounds to keep shapes looking right. Special care is taken to have the inner circle nicely centered within the outer circle. Replaces FigNodeModelElement.setBoundsImpl(int, int, int, int).

Overrides:
setStandardBounds in class FigNodeModelElement
Parameters:
x - Desired X coordinate of upper left corner
y - Desired Y coordinate of upper left corner
w - Desired width of the FigClass
h - Desired height of the FigClass
See Also:
org.tigris.gef.presentation.Fig#setBoundsImpl(int, int, int, int)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook