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

java.lang.Object
  extended byorg.tigris.gef.base.Diagram
      extended byorg.argouml.ui.ArgoDiagram
          extended byorg.argouml.uml.diagram.ui.UMLDiagram
              extended byorg.argouml.uml.diagram.state.ui.UMLStateDiagram
All Implemented Interfaces:
java.util.EventListener, org.tigris.gef.graph.GraphListener, ru.novosoft.uml.MElementListener, java.io.Serializable

public class UMLStateDiagram
extends UMLDiagram

See Also:
Serialized Form

Field Summary
protected static javax.swing.Action _actionBranchPseudoState
           
protected static javax.swing.Action _actionCompositeState
           
protected static javax.swing.Action _actionDeepHistoryPseudoState
           
protected static javax.swing.Action _actionFinalPseudoState
           
protected static javax.swing.Action _actionForkPseudoState
           
protected static javax.swing.Action _actionJoinPseudoState
           
protected static javax.swing.Action _actionShallowHistoryPseudoState
           
protected static javax.swing.Action _actionStartPseudoState
           
protected static javax.swing.Action _actionState
           
protected static javax.swing.Action _actionTransition
           
protected static int _StateDiagramSerial
           
 
Fields inherited from class org.argouml.uml.diagram.ui.UMLDiagram
_actionBroom, _actionCircle, _actionInk, _actionLine, _actionPoly, _actionRectangle, _actionRRectangle, _actionSelect, _actionSpline, _actionText, _diagramName, _namespace, cat
 
Fields inherited from class org.argouml.ui.ArgoDiagram
TheInstance
 
Fields inherited from class org.tigris.gef.base.Diagram
_comments, _lay, _name, _toolBar, vetoListeners
 
Constructor Summary
UMLStateDiagram()
          this constructor is used to build a dummy state diagram so that a project will load properly.
UMLStateDiagram(ru.novosoft.uml.foundation.core.MNamespace m, ru.novosoft.uml.behavior.state_machines.MStateMachine sm)
           
 
Method Summary
protected static java.lang.String getNewDiagramName()
           
 ru.novosoft.uml.foundation.core.MModelElement getOwner()
          The owner of a statediagram is the statediagram it's showing.
 ru.novosoft.uml.behavior.state_machines.MStateMachine getStateMachine()
           
protected  java.lang.Object[] getUmlActions()
          Get the actions from which to create a toolbar or equivilent graphic triggers
 void initialize(java.lang.Object o)
          Called by the PGML parser to initialize the statediagram.
 void removed(ru.novosoft.uml.MElementEvent e)
          This diagram listens to NSUML events from its Statemachine; When the Statemachine is removed, we also want to delete this diagram too.
 void setStateMachine(ru.novosoft.uml.behavior.state_machines.MStateMachine sm)
           
 void setup(ru.novosoft.uml.foundation.core.MNamespace m, ru.novosoft.uml.behavior.state_machines.MStateMachine sm)
          method to perform a number of important initializations of a StateDiagram.
 
Methods inherited from class org.argouml.uml.diagram.ui.UMLDiagram
getActions, getClassAndModelID, getNamespace, getToolBar, initToolBar, listRoleItemSet, propertySet, recovered, removeAsTarget, roleAdded, roleRemoved, setAsTarget, setName, setNamespace
 
Methods inherited from class org.argouml.ui.ArgoDiagram
addChangeRegistryAsListener, damage, getContainingFig, getEdges, getItemUID, getNodes, getVetoMessage, removeChangeRegistryAsListener, setItemUID
 
Methods inherited from class org.tigris.gef.base.Diagram
add, addVetoableChangeListener, bringForward, bringToFront, countContained, edgeAdded, edgeRemoved, elements, elementsIn, fireVetoableChange, fireVetoableChange, fireVetoableChange, getComments, getGraphController, getGraphModel, getLayer, getName, graphChanged, hit, nodeAdded, nodeRemoved, postLoad, postSave, preSave, presentationFor, remove, removeAll, removeVetoableChangeListener, reorder, sendBackward, sendToBack, setComments, setGraphModel, setLayer, setToolBar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_actionState

protected static javax.swing.Action _actionState

_actionCompositeState

protected static javax.swing.Action _actionCompositeState

_actionStartPseudoState

protected static javax.swing.Action _actionStartPseudoState

_actionFinalPseudoState

protected static javax.swing.Action _actionFinalPseudoState

_actionBranchPseudoState

protected static javax.swing.Action _actionBranchPseudoState

_actionForkPseudoState

protected static javax.swing.Action _actionForkPseudoState

_actionJoinPseudoState

protected static javax.swing.Action _actionJoinPseudoState

_actionShallowHistoryPseudoState

protected static javax.swing.Action _actionShallowHistoryPseudoState

_actionDeepHistoryPseudoState

protected static javax.swing.Action _actionDeepHistoryPseudoState

_actionTransition

protected static javax.swing.Action _actionTransition

_StateDiagramSerial

protected static int _StateDiagramSerial
Constructor Detail

UMLStateDiagram

public UMLStateDiagram()
this constructor is used to build a dummy state diagram so that a project will load properly.


UMLStateDiagram

public UMLStateDiagram(ru.novosoft.uml.foundation.core.MNamespace m,
                       ru.novosoft.uml.behavior.state_machines.MStateMachine sm)
Method Detail

getOwner

public ru.novosoft.uml.foundation.core.MModelElement getOwner()
The owner of a statediagram is the statediagram it's showing.

Overrides:
getOwner in class UMLDiagram

initialize

public void initialize(java.lang.Object o)
Called by the PGML parser to initialize the statediagram. First the parser creates a statediagram via the default constructor. Then this method is called.

Overrides:
initialize in class UMLDiagram
See Also:
Diagram.initialize(Object)

setup

public void setup(ru.novosoft.uml.foundation.core.MNamespace m,
                  ru.novosoft.uml.behavior.state_machines.MStateMachine sm)
method to perform a number of important initializations of a StateDiagram. each diagram type has a similar UMLxxxDiagram class.

Parameters:
m - MClass from the model in NSUML...connects the class to the State diagram.
sm - MStateMachine from the model in NSUML...

getStateMachine

public ru.novosoft.uml.behavior.state_machines.MStateMachine getStateMachine()

setStateMachine

public void setStateMachine(ru.novosoft.uml.behavior.state_machines.MStateMachine sm)
Parameters:
sm -

getUmlActions

protected java.lang.Object[] getUmlActions()
Get the actions from which to create a toolbar or equivilent graphic triggers

Specified by:
getUmlActions in class UMLDiagram

getNewDiagramName

protected static java.lang.String getNewDiagramName()

removed

public void removed(ru.novosoft.uml.MElementEvent e)
This diagram listens to NSUML events from its Statemachine; When the Statemachine is removed, we also want to delete this diagram too.

Specified by:
removed in interface ru.novosoft.uml.MElementListener
Overrides:
removed in class UMLDiagram


ArgoUML © 1996-2003 (20030829)ArgoUML Project HomeArgoUML Cookbook