org.argouml.uml.ui
Class ActionAddDiagram

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.ui.UMLAction
          extended byorg.argouml.uml.ui.UMLChangeAction
              extended byorg.argouml.uml.ui.ActionAddDiagram
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
Direct Known Subclasses:
ActionClassDiagram, ActionCollaborationDiagram, ActionDeploymentDiagram, ActionSequenceDiagram, ActionStateDiagram, ActionUseCaseDiagram

public abstract class ActionAddDiagram
extends UMLChangeAction

Abstract class that is the parent of all actions adding diagrams to ArgoUML. The children of this class should implement createDiagram to do any specific actions for creating a diagram and isValidNamespace that checks if some namespace is valid to add the diagram to.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.argouml.uml.ui.UMLAction
cat, HAS_ICON, NO_ICON
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ActionAddDiagram(java.lang.String s)
          Constructor for ActionAddDiagram.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Perform the work the action is supposed to do.
abstract  UMLDiagram createDiagram(java.lang.Object ns)
          Creates the diagram.
abstract  boolean isValidNamespace(java.lang.Object ns)
          Returns true as the given namespace a valid namespace is to add the diagram to.
 
Methods inherited from class org.argouml.uml.ui.UMLAction
getMnemonic, getShortcut, isEnabled, markNeedsSave, shouldBeEnabled, stripJunk, updateEnabled, updateEnabled
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionAddDiagram

public ActionAddDiagram(java.lang.String s)
Constructor for ActionAddDiagram.

Parameters:
s -
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: UMLAction
Perform the work the action is supposed to do.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class UMLChangeAction
See Also:
ActionListener.actionPerformed(ActionEvent)

isValidNamespace

public abstract boolean isValidNamespace(java.lang.Object ns)
Returns true as the given namespace a valid namespace is to add the diagram to.

Parameters:
ns -
Returns:
boolean

createDiagram

public abstract UMLDiagram createDiagram(java.lang.Object ns)
Creates the diagram. Classes derived from this class should implement any specific behaviour to create the diagram.

Parameters:
ns - The namespace the UMLDiagram should get.
Returns:
UMLDiagram


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