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:
EventListener, org.tigris.gef.graph.GraphListener, PropertyChangeListener, 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
private  Action actionActor
          Tool to add an actor node.
private  Action actionAggregation
           
private  Action actionAssociation
          Tool to create an association between UML artifacts using a polyedge.
private  Action actionComposition
           
private  Action actionDependency
          Tool to create a dependency between UML artifacts using a polyedge.
private  Action actionExtend
          Tool to create an extend relationship between UML use cases using a polyedge.
private  Action actionExtensionPoint
           
private  Action actionGeneralize
          Tool to create a generalization between UML artifacts using a polyedge.
private  Action actionInclude
          Tool to create an include relationship between UML use cases using a polyedge.
private  Action actionUniAggregation
           
private  Action actionUniAssociation
           
private  Action actionUniComposition
           
private  Action actionUseCase
          Tool to add a use case node.
private static Logger LOG
           
 
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
UMLUseCaseDiagram()
          Construct a new use case diagram with no defined namespace.
UMLUseCaseDiagram(Object m)
          Construct a new use case diagram with in a defined namespace.
UMLUseCaseDiagram(String name, Object namespace)
          Constructor.
 
Method Summary
protected  Action getActionActor()
           
protected  Action getActionAggregation()
           
protected  Action getActionAssociation()
           
protected  Action getActionComposition()
           
protected  Action getActionDependency()
           
protected  Action getActionExtend()
           
protected  Action getActionExtensionPoint()
           
protected  Action getActionGeneralize()
           
protected  Action getActionInclude()
           
protected  Action getActionUniAggregation()
           
protected  Action getActionUniAssociation()
           
protected  Action getActionUniComposition()
           
protected  Action getActionUseCase()
           
private  Object[] getAssociationActions()
           
 String getLabelName()
           
protected  String getNewDiagramName()
           
protected  Object[] getUmlActions()
          Get the actions from which to create a toolbar or equivilent graphic triggers.
 void setNamespace(Object handle)
          Perform a number of important initializations of a Use Case Diagram.
 
Methods inherited from class org.argouml.uml.diagram.ui.UMLDiagram
deselectAllTools, deselectOtherTools, getActions, getClassAndModelID, getJToolBar, getNamespace, getNextDiagramSerial, getOwner, initialize, 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, 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

LOG

private static final Logger LOG

actionActor

private Action actionActor
Tool to add an actor node.


actionUseCase

private Action actionUseCase
Tool to add a use case node.


actionAssociation

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


actionAggregation

private Action actionAggregation

actionComposition

private Action actionComposition

actionUniAssociation

private Action actionUniAssociation

actionUniAggregation

private Action actionUniAggregation

actionUniComposition

private Action actionUniComposition

actionGeneralize

private Action actionGeneralize
Tool to create a generalization between UML artifacts using a polyedge.


actionExtend

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


actionInclude

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


actionDependency

private Action actionDependency
Tool to create a dependency between UML artifacts using a polyedge.


actionExtensionPoint

private Action actionExtensionPoint
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. We allow for the possibility that setting this may fail, in which case no name is set.


UMLUseCaseDiagram

public UMLUseCaseDiagram(Object 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(String name,
                         Object namespace)
Constructor.

Parameters:
name - the name for the diagram
namespace - the namespace for the diagram
Method Detail

setNamespace

public void setNamespace(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
Parameters:
handle - Namespace to be used for this diagram.

getUmlActions

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

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

getAssociationActions

private Object[] getAssociationActions()

getNewDiagramName

protected String getNewDiagramName()
Returns:
a new unique name for the diagram

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

getActionActor

protected Action getActionActor()
Returns:
Returns the actionActor.

getActionAggregation

protected Action getActionAggregation()
Returns:
Returns the actionAggregation.

getActionAssociation

protected Action getActionAssociation()
Returns:
Returns the actionAssociation.

getActionComposition

protected Action getActionComposition()
Returns:
Returns the actionComposition.

getActionDependency

protected Action getActionDependency()
Returns:
Returns the actionDependency.

getActionExtend

protected Action getActionExtend()
Returns:
Returns the actionExtend.

getActionGeneralize

protected Action getActionGeneralize()
Returns:
Returns the actionGeneralize.

getActionInclude

protected Action getActionInclude()
Returns:
Returns the actionInclude.

getActionUniAggregation

protected Action getActionUniAggregation()
Returns:
Returns the actionUniAggregation.

getActionUniAssociation

protected Action getActionUniAssociation()
Returns:
Returns the actionUniAssociation.

getActionUniComposition

protected Action getActionUniComposition()
Returns:
Returns the actionUniComposition.

getActionUseCase

protected Action getActionUseCase()
Returns:
Returns the actionUseCase.

getActionExtensionPoint

protected Action getActionExtensionPoint()
Returns:
the action to create an extension point


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