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

The correct name for this class is "UMLStatechartDiagram". See issue 2306.

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
           
private static org.apache.log4j.Logger cat
          logger
(package private)  java.lang.Object theStateMachine
          this diagram needs to be deleted when its statemachine is deleted.
 
Fields inherited from class org.argouml.uml.diagram.ui.UMLDiagram
_actionBroom, _actionCircle, _actionInk, _actionLine, _actionPoly, _actionRectangle, _actionRRectangle, _actionSelect, _actionSpline, _actionText, _diagramName, _namespace
 
Fields inherited from class org.argouml.ui.ArgoDiagram
TheInstance
 
Fields inherited from class org.tigris.gef.base.Diagram
_comments, _name, _toolBar, NAME_KEY, SCALE_KEY
 
Constructor Summary
UMLStateDiagram()
          this constructor is used to build a dummy statechart diagram so that a project will load properly.
UMLStateDiagram(java.lang.Object namespace, java.lang.Object sm)
           
 
Method Summary
protected static java.lang.String getNewDiagramName()
           
 java.lang.Object getOwner()
          The owner of a statechart diagram is the statechart diagram it's showing.
 java.lang.Object 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 statechart diagram.
 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(java.lang.Object sm)
           
 void setup(java.lang.Object namespace, java.lang.Object sm)
          Method to perform a number of important initializations of a StateDiagram.
 
Methods inherited from class org.argouml.uml.diagram.ui.UMLDiagram
deselectAllTools, deselectOtherTools, getActions, getClassAndModelID, getJToolBar, getNamespace, initToolBar, listRoleItemSet, propertySet, recovered, removeAsTarget, roleAdded, roleRemoved, setAsTarget, setName, setNamespace
 
Methods inherited from class org.argouml.ui.ArgoDiagram
addChangeRegistryAsListener, damage, getContainingFig, getEdges, getItemUID, getNodes, getNodes, getVetoMessage, removeChangeRegistryAsListener, setItemUID, toString
 
Methods inherited from class org.tigris.gef.base.Diagram
add, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, bringForward, bringToFront, countContained, edgeAdded, edgeRemoved, elements, elementsIn, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getComments, getGraphController, getGraphModel, getLayer, getName, getScale, getShowSingleMultiplicity, getToolBar, graphChanged, hit, nodeAdded, nodeRemoved, postLoad, postSave, preSave, presentationFor, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, reorder, sendBackward, sendToBack, setComments, setGraphModel, setLayer, setScale, setShowSingleMultiplicity, setToolBar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cat

private static org.apache.log4j.Logger cat
logger


theStateMachine

java.lang.Object theStateMachine
this diagram needs to be deleted when its statemachine is deleted.


_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 statechart diagram so that a project will load properly.


UMLStateDiagram

public UMLStateDiagram(java.lang.Object namespace,
                       java.lang.Object sm)
Method Detail

getOwner

public java.lang.Object getOwner()
The owner of a statechart diagram is the statechart diagram it's showing.

Overrides:
getOwner in class UMLDiagram

initialize

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

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

setup

public void setup(java.lang.Object namespace,
                  java.lang.Object sm)
Method to perform a number of important initializations of a StateDiagram.

Each diagram type has a similar UMLxxxDiagram class.

Changed lay from LayerPerspective to LayerPerspectiveMutable. This class is a child of LayerPerspective and was implemented to correct some difficulties in changing the model. lay is used mainly in LayerManager(GEF) to control the adding, changing and deleting layers on the diagram...

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

getStateMachine

public java.lang.Object getStateMachine()

setStateMachine

public void setStateMachine(java.lang.Object 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-2004 (20040316)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook