org.argouml.uml.diagram.use_case.ui
Class UMLUseCaseDiagram

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.use_case.ui.UMLUseCaseDiagram
All Implemented Interfaces:
java.util.EventListener, org.tigris.gef.graph.GraphListener, ru.novosoft.uml.MElementListener, java.io.Serializable

public class UMLUseCaseDiagram
extends UMLDiagram

The base class of the use case 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
protected static javax.swing.Action _actionActor
          Tool to add an actor node.
protected static javax.swing.Action _actionAggregation
           
protected static javax.swing.Action _actionAssociation
          Tool to create an association between UML artifacts using a polyedge.
protected static javax.swing.Action _actionComposition
           
protected static javax.swing.Action _actionDependency
          Tool to create a dependency between UML artifacts using a polyedge.
protected static javax.swing.Action _actionExtend
          Tool to create an extend relationship between UML use cases using a polyedge.
protected static javax.swing.Action _actionGeneralize
          Tool to create a generalization between UML artifacts using a polyedge.
protected static javax.swing.Action _actionInclude
          Tool to create an include relationship between UML use cases using a polyedge.
protected static javax.swing.Action _actionUniAggregation
           
protected static javax.swing.Action _actionUniAssociation
           
protected static javax.swing.Action _actionUniComposition
           
protected static javax.swing.Action _actionUseCase
          Tool to add a use case node.
protected static int _UseCaseDiagramSerial
          A static counter of the use case index (used in constructing a unique name for each new diagram.
protected static org.apache.log4j.Category cat
           
 
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, _lay, _name, _toolBar, vetoListeners
 
Constructor Summary
UMLUseCaseDiagram()
          Construct a new use case diagram with no defined namespace.
UMLUseCaseDiagram(ru.novosoft.uml.foundation.core.MNamespace m)
          Construct a new use case diagram with in a defined namespace.
UMLUseCaseDiagram(java.lang.String name, ru.novosoft.uml.foundation.core.MNamespace m)
           
 
Method Summary
protected static java.lang.String getNewDiagramName()
           
protected  java.lang.Object[] getUmlActions()
          Get the actions from which to create a toolbar or equivilent graphic triggers
 void setNamespace(java.lang.Object handle)
           perform a number of important initializations of a Use Case Diagram.
 
Methods inherited from class org.argouml.uml.diagram.ui.UMLDiagram
getActions, getClassAndModelID, getNamespace, getOwner, getToolBar, initialize, initToolBar, listRoleItemSet, propertySet, recovered, removeAsTarget, removed, roleAdded, roleRemoved, setAsTarget, setName
 
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

cat

protected static org.apache.log4j.Category cat

_actionActor

protected static javax.swing.Action _actionActor

Tool to add an actor node.


_actionUseCase

protected static javax.swing.Action _actionUseCase

Tool to add a use case node.


_actionAssociation

protected static javax.swing.Action _actionAssociation

Tool to create an association between UML artifacts using a polyedge.


_actionAggregation

protected static javax.swing.Action _actionAggregation

_actionComposition

protected static javax.swing.Action _actionComposition

_actionUniAssociation

protected static javax.swing.Action _actionUniAssociation

_actionUniAggregation

protected static javax.swing.Action _actionUniAggregation

_actionUniComposition

protected static javax.swing.Action _actionUniComposition

_actionGeneralize

protected static javax.swing.Action _actionGeneralize

Tool to create a generalization between UML artifacts using a polyedge.


_actionExtend

protected static javax.swing.Action _actionExtend

Tool to create an extend relationship between UML use cases using a polyedge.


_actionInclude

protected static javax.swing.Action _actionInclude

Tool to create an include relationship between UML use cases using a polyedge.


_actionDependency

protected static javax.swing.Action _actionDependency

Tool to create a dependency between UML artifacts using a polyedge.


_UseCaseDiagramSerial

protected static int _UseCaseDiagramSerial

A static counter of the use case index (used in constructing a unique name for each new diagram.

Constructor Detail

UMLUseCaseDiagram

public UMLUseCaseDiagram()

Construct a new use case diagram with no defined namespace.

Note we must never call this directly, since defining the namespace is what makes everything work. However GEF will call it directly when loading a new diagram, so it must remain public.

A unique name is constructed by using the serial index _UseCaseDiagramSerial. We allow for the possibility that setting this may fail, in which case no name is set.


UMLUseCaseDiagram

public UMLUseCaseDiagram(ru.novosoft.uml.foundation.core.MNamespace m)

Construct a new use case diagram with in a defined namespace.

Invokes the generic constructor UMLUseCaseDiagram(), then intialises the namespace (which initializes all the graphics).

This is the constructor which should always be used.

Parameters:
m - the desired namespace for this diagram.

UMLUseCaseDiagram

public UMLUseCaseDiagram(java.lang.String name,
                         ru.novosoft.uml.foundation.core.MNamespace m)
Method Detail

setNamespace

public void setNamespace(java.lang.Object handle)

perform a number of important initializations of a Use Case Diagram.

Creates a new graph model for the diagram, settings its namespace to that supplied.

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 of items in a layer of the diagram.

Set a renderer suitable for the use case diagram.

Note. This is declared as public. Not clear that other classes should be allowed to invoke this method.

Overrides:
setNamespace in class UMLDiagram

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


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