org.argouml.uml.ui
Class AbstractActionNavigate

java.lang.Object
  extended by UndoableAction
      extended by org.argouml.uml.ui.AbstractActionNavigate
All Implemented Interfaces:
java.util.EventListener, TargetListener
Direct Known Subclasses:
ActionNavigateAction, ActionNavigateAssociation, ActionNavigateContainerElement, ActionNavigateContext, ActionNavigateNamespace, ActionNavigateOppositeAssocEnd, ActionNavigateOwner, ActionNavigateTransition, ActionNavigateUpNextDown, ActionNavigateUpPreviousDown

public abstract class AbstractActionNavigate
extends UndoableAction
implements TargetListener


Constructor Summary
AbstractActionNavigate()
          The constructor.
AbstractActionNavigate(java.lang.String key, boolean hasIcon)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 boolean isEnabled()
           
protected abstract  java.lang.Object navigateTo(java.lang.Object source)
          Abstract method to do the navigation.
 AbstractActionNavigate setIcon(javax.swing.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractActionNavigate

public AbstractActionNavigate()
The constructor.


AbstractActionNavigate

public AbstractActionNavigate(java.lang.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(javax.swing.Icon newIcon)
Parameters:
newIcon - the icon for this action
Returns:
this action

navigateTo

protected abstract java.lang.Object navigateTo(java.lang.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()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)

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