org.argouml.uml.ui
Class ActionAddDiagram
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--org.argouml.uml.ui.UMLAction
|
+--org.argouml.uml.ui.UMLChangeAction
|
+--org.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, 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 |
private Logger |
log
|
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 javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private Logger log
ActionAddDiagram
public ActionAddDiagram(java.lang.String s)
- Constructor for ActionAddDiagram.
- Parameters:
s
-
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