org.argouml.uml.ui
Class AbstractActionNavigate

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.tigris.gef.undo.UndoableAction
          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

public abstract class AbstractActionNavigate
extends org.tigris.gef.undo.UndoableAction

See Also:
Serialized Form

Field Summary
 
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 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
 

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()
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-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook