org.argouml.uml.diagram.collaboration.ui
Class UMLCollaborationDiagram

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.collaboration.ui.UMLCollaborationDiagram
All Implemented Interfaces:
EventListener, org.tigris.gef.graph.GraphListener, PropertyChangeListener, Serializable

public class UMLCollaborationDiagram
extends UMLDiagram

The base class of the collaboration diagram.

Defines the toolbar, provides for its initialization and provides constructors for a top level diagram and one within a defined namespace.

See Also:
Serialized Form

Field Summary
private  Action actionAggregation
           
private  Action actionAssociation
           
private  Action actionClassifierRole
           
private  Action actionComposition
           
private  Action actionDepend
           
private  Action actionGeneralize
           
private  Action actionMessage
           
private  Action actionUniAggregation
           
private  Action actionUniAssociation
           
private  Action actionUniComposition
           
private  Object collaboration
           
private static Logger LOG
          Logging.
 
Fields inherited from class org.argouml.uml.diagram.ui.UMLDiagram
 
Fields inherited from class org.argouml.ui.ArgoDiagram
 
Fields inherited from class org.tigris.gef.base.Diagram
_comments, _name, _toolBar, NAME_KEY, SCALE_KEY
 
Constructor Summary
UMLCollaborationDiagram()
          This constructor is used to build a dummy collaboration diagram so that a project will load properly.
UMLCollaborationDiagram(Object namespace)
          The constructor.
UMLCollaborationDiagram(Object namespace, Object collab)
          The constructor.
 
Method Summary
private  Action getActionAggregation()
           
protected  Action getActionAssociation()
           
private  Action getActionClassifierRole()
           
protected  Action getActionComposition()
           
protected  Action getActionDepend()
           
protected  Action getActionGeneralize()
           
private  Action getActionMessage()
           
protected  Action getActionUniAggregation()
           
protected  Action getActionUniAssociation()
           
protected  Action getActionUniComposition()
           
private  Object[] getAssociationActions()
           
 String getLabelName()
           
protected  String getNewDiagramName()
          Creates a new diagramname.
 int getNumMessages()
           
 Object getOwner()
          The owner of a collaboration diagram is the collaboration it's showing.
protected  Object[] getUmlActions()
          Get the actions from which to create a toolbar or equivalent graphic triggers.
 void initialize(Object owner)
          Called by the PGML parser to initialize the diagram.
 void postLoad()
          After loading the diagram it is necessary to connect every FigMessage to its FigAssociationRole.
 void setNamespace(Object handle)
          Method to perform a number of important initializations of a CollaborationDiagram.
 
Methods inherited from class org.argouml.uml.diagram.ui.UMLDiagram
deselectAllTools, deselectOtherTools, getActions, getClassAndModelID, getJToolBar, getNamespace, getNextDiagramSerial, initToolBar, makeCreateAssociationAction, makeCreateEdgeAction, makeCreateNodeAction, needsToBeRemoved, propertyChange, removeAsTarget, resetDiagramSerial, setAsTarget
 
Methods inherited from class org.argouml.ui.ArgoDiagram
damage, getContainingFig, getEdges, getItemUID, getNodes, getVetoMessage, 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, 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

collaboration

private Object collaboration

LOG

private static final Logger LOG
Logging.


actionClassifierRole

private Action actionClassifierRole

actionGeneralize

private Action actionGeneralize

actionAssociation

private Action actionAssociation

actionAggregation

private Action actionAggregation

actionComposition

private Action actionComposition

actionUniAssociation

private Action actionUniAssociation

actionUniAggregation

private Action actionUniAggregation

actionUniComposition

private Action actionUniComposition

actionDepend

private Action actionDepend

actionMessage

private Action actionMessage
Constructor Detail

UMLCollaborationDiagram

public UMLCollaborationDiagram()
This constructor is used to build a dummy collaboration diagram so that a project will load properly.


UMLCollaborationDiagram

public UMLCollaborationDiagram(Object namespace)
The constructor.

Parameters:
namespace - the namespace for the diagram

UMLCollaborationDiagram

public UMLCollaborationDiagram(Object namespace,
                               Object collab)
The constructor.

Parameters:
namespace - the namespace for the diagram
collab - the collaboration of this diagram
Method Detail

getOwner

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

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

getNumMessages

public int getNumMessages()
Returns:
the number of UML messages in the diagram

setNamespace

public void setNamespace(Object handle)
Method to perform a number of important initializations of a CollaborationDiagram.

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...

Overrides:
setNamespace in class UMLDiagram
Parameters:
handle - MNamespace from the model in NSUML...

initialize

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

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

getUmlActions

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

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

getAssociationActions

private Object[] getAssociationActions()

postLoad

public void postLoad()
After loading the diagram it is necessary to connect every FigMessage to its FigAssociationRole. This is done by adding the FigMessage to the PathItems of its FigAssociationRole.


getNewDiagramName

protected String getNewDiagramName()
Creates a new diagramname.

Returns:
String

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()

getActionClassifierRole

private Action getActionClassifierRole()
Returns:
Returns the actionClassifierRole.

getActionAssociation

protected Action getActionAssociation()
Returns:
Returns the actionAssociation.

getActionComposition

protected Action getActionComposition()
Returns:
Returns the actionComposition.

getActionDepend

protected Action getActionDepend()
Returns:
Returns the actionDepend.

getActionGeneralize

protected Action getActionGeneralize()
Returns:
Returns the actionGeneralize.

getActionUniAggregation

protected Action getActionUniAggregation()
Returns:
Returns the actionUniAggregation.

getActionUniAssociation

protected Action getActionUniAssociation()
Returns:
Returns the actionUniAssociation.

getActionUniComposition

protected Action getActionUniComposition()
Returns:
Returns the actionUniComposition.

getActionAggregation

private Action getActionAggregation()
Returns:
Returns the actionAggregation.

getActionMessage

private Action getActionMessage()
Returns:
Returns the actionMessage.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook