org.argouml.uml.ui
Class ActionCollaborationDiagram

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--org.argouml.uml.ui.UMLAction
              |
              +--org.argouml.uml.ui.UMLChangeAction
                    |
                    +--org.argouml.uml.ui.ActionAddDiagram
                          |
                          +--org.argouml.uml.ui.ActionCollaborationDiagram
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable

public class ActionCollaborationDiagram
extends ActionAddDiagram

Action to trigger creation of new collaboration diagram.

See Also:
Serialized Form

Field Summary
static ActionCollaborationDiagram SINGLETON
           
 
Fields inherited from class org.argouml.uml.ui.ActionAddDiagram
 
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
private ActionCollaborationDiagram()
           
 
Method Summary
 UMLDiagram createDiagram(java.lang.Object handle)
          Creates the diagram.
 boolean isValidNamespace(java.lang.Object handle)
          Returns true as the given namespace a valid namespace is to add the diagram to.
 boolean shouldBeEnabled()
          Just calls isValidNamespace(...) on the nav pane target.
 
Methods inherited from class org.argouml.uml.ui.ActionAddDiagram
actionPerformed
 
Methods inherited from class org.argouml.uml.ui.UMLAction
getMnemonic, getShortcut, getValue, isEnabled, markNeedsSave, putValue, stripJunk, updateEnabled, updateEnabled
 
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
 

Field Detail

SINGLETON

public static ActionCollaborationDiagram SINGLETON
Constructor Detail

ActionCollaborationDiagram

private ActionCollaborationDiagram()
Method Detail

createDiagram

public UMLDiagram createDiagram(java.lang.Object handle)
Description copied from class: ActionAddDiagram
Creates the diagram. Classes derived from this class should implement any specific behaviour to create the diagram.

Specified by:
createDiagram in class ActionAddDiagram
Parameters:
handle - The namespace the UMLDiagram should get.
Returns:
UMLDiagram
See Also:
ActionAddDiagram.createDiagram(Object)

isValidNamespace

public boolean isValidNamespace(java.lang.Object handle)
Description copied from class: ActionAddDiagram
Returns true as the given namespace a valid namespace is to add the diagram to.

Specified by:
isValidNamespace in class ActionAddDiagram
Parameters:
handle -
Returns:
boolean
See Also:
CollaborationsHelper.isAddingCollaborationAllowed(Object), ActionAddDiagram.isValidNamespace(Object)

shouldBeEnabled

public boolean shouldBeEnabled()
Just calls isValidNamespace(...) on the nav pane target.

Overrides:
shouldBeEnabled in class UMLAction
Returns:
true if the action should be available.
See Also:
UMLAction.shouldBeEnabled()


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