org.argouml.uml.diagram.ui
Class ActionNavigability

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.tigris.gef.undo.UndoableAction
          extended byorg.argouml.uml.diagram.ui.ActionNavigability
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable

public class ActionNavigability
extends org.tigris.gef.undo.UndoableAction

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

See Also:
Serialized Form

Field Summary
static int BIDIRECTIONAL
          Enumeration constant for BIDIRECTIONAL navigability.
static int ENDTOSTART
          Enumeration constant for ENDTOSTART navigability.
static int STARTTOEND
          Enumeration constant for STARTTOEND navigability.
 
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(String label, Object theAssociationStart, Object theAssociationEnd, int theNavigability)
          The constructor.
 
Method Summary
 void actionPerformed(ActionEvent ae)
          To perform the action of changing navigability.
 boolean isEnabled()
          The is action is always enabled.
static ActionNavigability newActionNavigability(Object assocStart, Object assocEnd, int nav)
          The ActionNavigability constructor.
 
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
 

Field Detail

BIDIRECTIONAL

public static final int BIDIRECTIONAL
Enumeration constant for BIDIRECTIONAL navigability.

See Also:
Constant Field Values

STARTTOEND

public static final int STARTTOEND
Enumeration constant for STARTTOEND navigability.

See Also:
Constant Field Values

ENDTOSTART

public static final int ENDTOSTART
Enumeration constant for ENDTOSTART navigability.

See Also:
Constant Field Values
Constructor Detail

ActionNavigability

protected ActionNavigability(String label,
                             Object theAssociationStart,
                             Object theAssociationEnd,
                             int theNavigability)
The constructor.

Parameters:
label - the description as build in getDescription
theAssociationStart - association end 1
theAssociationEnd - association end 2
theNavigability - the navigability: one of BIDIRECTIONAL, STARTTOEND, ENDTOSTART
Method Detail

newActionNavigability

public static ActionNavigability newActionNavigability(Object assocStart,
                                                       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
Returns:
the constructed class

actionPerformed

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

See Also:
ActionListener.actionPerformed( java.awt.event.ActionEvent)

isEnabled

public boolean isEnabled()
The is action is always enabled.

Returns:
always true (the action is always enabled)
See Also:
AbstractAction.isEnabled()


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook