org.argouml.uml.diagram.ui
Class ActionNavigability

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

public class ActionNavigability
extends UMLAction

A class to perform the action of changing the unidirectional or bidirectional navigation of an association.

See Also:
Serialized Form

Field Summary
(package private)  java.lang.Object assocEnd
           
(package private)  java.lang.Object assocStart
           
static int BIDIRECTIONAL
           
static int ENDTOSTART
           
(package private)  int nav
           
static int STARTTOEND
           
 
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
protected ActionNavigability(java.lang.String label, java.lang.Object assocStart, java.lang.Object assocEnd, int nav)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          To perform the action of changing navigability
private static java.lang.String getDescription(java.lang.Object assocStart, java.lang.Object assocEnd, int nav)
           
static ActionNavigability newActionNavigability(java.lang.Object assocStart, java.lang.Object assocEnd, int nav)
          The ActionNavigability constructor.
 boolean shouldBeEnabled()
          The is action is always enabled
 
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

BIDIRECTIONAL

public static final int BIDIRECTIONAL
See Also:
Constant Field Values

STARTTOEND

public static final int STARTTOEND
See Also:
Constant Field Values

ENDTOSTART

public static final int ENDTOSTART
See Also:
Constant Field Values

nav

int nav

assocStart

java.lang.Object assocStart

assocEnd

java.lang.Object assocEnd
Constructor Detail

ActionNavigability

protected ActionNavigability(java.lang.String label,
                             java.lang.Object assocStart,
                             java.lang.Object assocEnd,
                             int nav)
Method Detail

newActionNavigability

public static ActionNavigability newActionNavigability(java.lang.Object assocStart,
                                                       java.lang.Object assocEnd,
                                                       int nav)
The ActionNavigability constructor.

Parameters:
assocStart - a MAssociationEnd object at the start of an association.
assocEnd - a MAssociationEnd object at the end of an association.
nav - the type of navigation required in the association being either
  • BIDIRECTIONAL
  • STARTTOEND
  • ENDTOSTART

getDescription

private static java.lang.String getDescription(java.lang.Object assocStart,
                                               java.lang.Object assocEnd,
                                               int nav)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
To perform the action of changing navigability

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class UMLAction

shouldBeEnabled

public boolean shouldBeEnabled()
The is action is always enabled

Overrides:
shouldBeEnabled in class UMLAction
Returns:
true if the action should be available.


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