org.argouml.uml.ui
Class AbstractActionNavigate

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.tigris.gef.undo.UndoableAction
          extended byorg.argouml.uml.ui.UMLAction
              extended byorg.argouml.uml.ui.AbstractActionNavigate
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
ActionNavigateAction, ActionNavigateAssociation, ActionNavigateContainerElement, ActionNavigateContext, ActionNavigateNamespace, ActionNavigateOppositeAssocEnd, ActionNavigateOwner, ActionNavigateTransition, ActionNavigateUpFromDiagram

public abstract class AbstractActionNavigate
extends UMLAction

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
 
Fields inherited from class org.argouml.uml.ui.UMLAction
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
AbstractActionNavigate()
          The constructor.
AbstractActionNavigate(String key, boolean hasIcon)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
          Perform the work the action is supposed to do.
 boolean isEnabled()
           
protected abstract  Object navigateTo(Object source)
          Abstract method to do the navigation.
 AbstractActionNavigate setIcon(Icon newIcon)
           
 
Methods inherited from class org.argouml.uml.ui.UMLAction
getMnemonic, getValue, oldActionPerformed, putValue, shouldBeEnabled, 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
 

Constructor Detail

AbstractActionNavigate

public AbstractActionNavigate()
The constructor.


AbstractActionNavigate

public AbstractActionNavigate(String key,
                              boolean hasIcon)
Parameters:
key - The key (to be localized) of the name of the action.
hasIcon - true if there is an icon for this action
Method Detail

setIcon

public AbstractActionNavigate setIcon(Icon newIcon)
Parameters:
newIcon - the icon for this action
Returns:
this action

navigateTo

protected abstract Object navigateTo(Object source)
Abstract method to do the navigation. The actual navigation is performed by actionPerformed.

Parameters:
source - the object to navigate from
Returns:
the object to navigate to

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface Action
Overrides:
isEnabled in class UMLAction
See Also:
Action.isEnabled()

actionPerformed

public void actionPerformed(ActionEvent e)
Perform the work the action is supposed to do.

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


ArgoUML © 1996-2005ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook