org.argouml.uml.diagram.static_structure.ui
Class UMLClassDiagram

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

public class UMLClassDiagram
extends UMLDiagram

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tigris.gef.base.Diagram
_comments, _name, _toolBar, NAME_KEY, SCALE_KEY
 
Constructor Summary
UMLClassDiagram()
          Constructor.
UMLClassDiagram(Object m)
          The constructor.
UMLClassDiagram(String name, Object namespace)
          Constructor.
 
Method Summary
protected  Action getActionAggregation()
           
protected  Action getActionAssociation()
           
protected  Action getActionAssociationClass()
           
protected  Action getActionAssociationEnd()
           
protected  Action getActionClass()
           
protected  Action getActionComposition()
           
protected  Action getActionDependency()
           
protected  Action getActionGeneralization()
           
protected  Action getActionInterface()
           
protected  Action getActionLink()
           
protected  Action getActionModel()
           
protected  Action getActionPackage()
           
protected  Action getActionPermission()
           
protected  Action getActionRealization()
           
protected  Action getActionSubsystem()
           
protected  Action getActionUniAggregation()
           
protected  Action getActionUniAssociation()
           
protected  Action getActionUniComposition()
           
protected  Action getActionUsage()
           
 String getLabelName()
           
protected  String getNewDiagramName()
          Creates a new diagramname.
protected  Object[] getUmlActions()
          Get the actions from which to create a toolbar or equivilent graphic trigger.
 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, getNamespace, getNextDiagramSerial, getOwner, 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

UMLClassDiagram

public UMLClassDiagram()
Constructor.


UMLClassDiagram

public UMLClassDiagram(String name,
                       Object namespace)
Constructor.

Parameters:
name - the name for the new diagram
namespace - the namespace for the new diagram

UMLClassDiagram

public UMLClassDiagram(Object m)
The constructor. A default unique diagram name is constructed.

Parameters:
m - the namespace
Method Detail

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)

getUmlActions

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

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

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

getActionAggregation

protected Action getActionAggregation()
Returns:
Returns the actionAggregation.

getActionAssociation

protected Action getActionAssociation()
Returns:
Returns the actionAssociation.

getActionAssociationEnd

protected Action getActionAssociationEnd()
Returns:
Returns the actionAssociation.

getActionClass

protected Action getActionClass()
Returns:
Returns the actionClass.

getActionAssociationClass

protected Action getActionAssociationClass()
Returns:
Returns the actionAssociationClass.

getActionComposition

protected Action getActionComposition()
Returns:
Returns the actionComposition.

getActionDependency

protected Action getActionDependency()
Returns:
Returns the actionDepend.

getActionGeneralization

protected Action getActionGeneralization()
Returns:
Returns the actionGeneralize.

getActionInterface

protected Action getActionInterface()
Returns:
Returns the actionInterface.

getActionLink

protected Action getActionLink()
Returns:
Returns the actionLink.

getActionModel

protected Action getActionModel()
Returns:
Returns the actionModel.

getActionPackage

protected Action getActionPackage()
Returns:
Returns the actionPackage.

getActionPermission

protected Action getActionPermission()
Returns:
Returns the actionPermission.

getActionRealization

protected Action getActionRealization()
Returns:
Returns the actionRealize.

getActionSubsystem

protected Action getActionSubsystem()
Returns:
Returns the actionSubsystem.

getActionUniAggregation

protected Action getActionUniAggregation()
Returns:
Returns the actionUniAggregation.

getActionUniAssociation

protected Action getActionUniAssociation()
Returns:
Returns the actionUniAssociation.

getActionUniComposition

protected Action getActionUniComposition()
Returns:
Returns the actionUniComposition.

getActionUsage

protected Action getActionUsage()
Returns:
Returns the actionUsage.

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