org.argouml.uml.diagram.sequence.ui
Class UMLSequenceDiagram

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.sequence.ui.UMLSequenceDiagram
All Implemented Interfaces:
EventListener, GraphListener, PropertyChangeListener, Relocatable, Serializable

public class UMLSequenceDiagram
extends UMLDiagram

The diagram for sequence diagrams.

Totally rewritten for release 0.16.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tigris.gef.base.Diagram
_comments, _name, _toolBar, NAME_KEY, SCALE_KEY
 
Constructor Summary
UMLSequenceDiagram()
          Constructs a new sequence diagram with a default name and NO namespace.
UMLSequenceDiagram(Object collaboration)
          The constructor.
 
Method Summary
 void cleanUp()
          Method called by Project.removeDiagram to clean up the mess in this diagram when the diagram is removed.
 String getLabelName()
           
 Object getNamespace()
           
protected  String getNewDiagramName()
          Creates a new diagramname.
 Object getOwner()
          Returns the owner of this diagram.
protected  Object[] getUmlActions()
          Must return an array of actions via which the model can be manipulated.
 boolean isRelocationAllowed(Object base)
          This function should return true if it is allowed to relocate this type of diagram to the given modelelement.
 boolean relocate(Object base)
          Relocate this diagram, e.g.
 void setNamespace(Object ns)
          Sets the namespace of the Diagram, and adds the diagram as a listener of its namespace in the UML model (so that it can delete itself when the model element is deleted).
 
Methods inherited from class org.argouml.uml.diagram.ui.UMLDiagram
deselectAllTools, getActions, getClassAndModelID, getDependentElement, getJToolBar, getNextDiagramSerial, getSelectedAction, initialize, initToolBar, makeCreateAssociationAction, makeCreateAssociationClassAction, makeCreateAssociationEndAction, makeCreateEdgeAction, makeCreateNodeAction, manageDefault, propertyChange, resetDiagramSerial, setSelectedAction
 
Methods inherited from class org.argouml.ui.ArgoDiagram
damage, getContainingFig, getEdges, getItemUID, getNodes, getVetoMessage, presentationsFor, remove, repair, setItemUID, setName, 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, 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
 

Constructor Detail

UMLSequenceDiagram

public UMLSequenceDiagram()
Constructs a new sequence diagram with a default name and NO namespace. namespaces are used to determine the 'owner' of the diagram for diagrams but that's plain misuse.


UMLSequenceDiagram

public UMLSequenceDiagram(Object collaboration)
The constructor.

Parameters:
collaboration - the collaboration
Method Detail

getOwner

public Object getOwner()
Returns the owner of this diagram.

Overrides:
getOwner in class UMLDiagram
Returns:
the namespace
See Also:
UMLDiagram.getOwner()

getNewDiagramName

protected String getNewDiagramName()
Creates a new diagramname.

Returns:
a new unique name.

getLabelName

public String getLabelName()
Specified by:
getLabelName in class UMLDiagram
Returns:
a string that can be used as a label for this kind of diagram
See Also:
UMLDiagram.getLabelName()

getUmlActions

protected Object[] getUmlActions()
Must return an array of actions via which the model can be manipulated. To use the 'nested actions' feature (like the different association types on UMLClassDiagram) these nested actions must be in an array of their own.

In case of the sequence diagram this method must return the following actions:

Specified by:
getUmlActions in class UMLDiagram
Returns:
the actions structure
See Also:
UMLDiagram.getUmlActions()

getNamespace

public Object getNamespace()
Overrides:
getNamespace in class UMLDiagram
Returns:
the namespace for the diagram
See Also:
UMLDiagram.getNamespace()

setNamespace

public void setNamespace(Object ns)
Description copied from class: UMLDiagram
Sets the namespace of the Diagram, and adds the diagram as a listener of its namespace in the UML model (so that it can delete itself when the model element is deleted).

Overrides:
setNamespace in class UMLDiagram
Parameters:
ns - the namespace for the diagram
See Also:
UMLDiagram.setNamespace(java.lang.Object)

cleanUp

public void cleanUp()
Method called by Project.removeDiagram to clean up the mess in this diagram when the diagram is removed.


isRelocationAllowed

public boolean isRelocationAllowed(Object base)
Description copied from interface: Relocatable
This function should return true if it is allowed to relocate this type of diagram to the given modelelement.

Specified by:
isRelocationAllowed in interface Relocatable
Specified by:
isRelocationAllowed in class UMLDiagram
See Also:
UMLDiagram.isRelocationAllowed( java.lang.Object)

relocate

public boolean relocate(Object base)
Description copied from interface: Relocatable
Relocate this diagram, e.g. for a class diagram assign it a new namespace, e.g. for a statechart move it together with the statemachine to a new operation/classifier.

Precondition: isRelocationAllowed(base) is true.

Specified by:
relocate in interface Relocatable
Specified by:
relocate in class UMLDiagram
See Also:
UMLDiagram.relocate(java.lang.Object)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook