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, TargetListener
Direct Known Subclasses:
ActionNavigateAction, ActionNavigateAssociation, ActionNavigateContainerElement, ActionNavigateContext, ActionNavigateNamespace, ActionNavigateOppositeAssocEnd, ActionNavigateOwner, ActionNavigateTransition, ActionNavigateUpNextDown, ActionNavigateUpPreviousDown

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

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)
           
 boolean isEnabled()
           
protected abstract  Object navigateTo(Object source)
          Abstract method to do the navigation.
 AbstractActionNavigate setIcon(Icon newIcon)
           
 void targetAdded(TargetEvent e)
          Fired when a target is added to the list of targets.
 void targetRemoved(TargetEvent e)
          Fired when a target is removed from the list of targets
 void targetSet(TargetEvent e)
          Fired when a total new set of targets is set
 
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()
Specified by:
isEnabled in interface Action

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

targetAdded

public void targetAdded(TargetEvent e)
Description copied from interface: TargetListener
Fired when a target is added to the list of targets.

Specified by:
targetAdded in interface TargetListener
Parameters:
e - The targetevent, name will be TARGET_ADDED

targetRemoved

public void targetRemoved(TargetEvent e)
Description copied from interface: TargetListener
Fired when a target is removed from the list of targets

Specified by:
targetRemoved in interface TargetListener
Parameters:
e - The targetevent, name will be TARGET_REMOVED

targetSet

public void targetSet(TargetEvent e)
Description copied from interface: TargetListener
Fired when a total new set of targets is set

Specified by:
targetSet in interface TargetListener
Parameters:
e - The targetevent, name will be TARGET_SET


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook