org.argouml.uml.ui
Class AbstractActionRemoveElement

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.ui.UMLAction
          extended byorg.argouml.uml.ui.AbstractActionRemoveElement
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
ActionRemoveClassifierRoleBase, ActionRemoveModelElement

public class AbstractActionRemoveElement
extends UMLAction

Base class for remove actions. Remove actions can remove an element from the model. This can either be a total remove ('erase from model') or just a remove from a list of bases as in the case of classifierrole bases.

Since:
Jan 25, 2003
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
private  Object objectToRemove
           
private  Object target
          The object that owns the object that must be removed (the object that is the target of the projectbrowser in most cases).
 
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
protected AbstractActionRemoveElement()
          Constructor for AbstractActionRemoveElement.
protected AbstractActionRemoveElement(String name)
          The constructor.
 
Method Summary
 Object getObjectToRemove()
          Returns the objectToRemove.
 Object getTarget()
          Returns the target.
 boolean isEnabled()
           
 void setObjectToRemove(Object theObjectToRemove)
          Sets the objectToRemove.
 void setTarget(Object theTarget)
          Sets the target.
 
Methods inherited from class org.argouml.uml.ui.UMLAction
actionPerformed, getMnemonic, getValue, 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
 

Field Detail

target

private Object target
The object that owns the object that must be removed (the object that is the target of the projectbrowser in most cases).


objectToRemove

private Object objectToRemove
Constructor Detail

AbstractActionRemoveElement

protected AbstractActionRemoveElement()
Constructor for AbstractActionRemoveElement.


AbstractActionRemoveElement

protected AbstractActionRemoveElement(String name)
The constructor.

Parameters:
name - the name for this action
Method Detail

getTarget

public Object getTarget()
Returns the target.

Returns:
MModelElement

setTarget

public void setTarget(Object theTarget)
Sets the target.

Parameters:
theTarget - The target to set

getObjectToRemove

public Object getObjectToRemove()
Returns the objectToRemove.

Returns:
Object

setObjectToRemove

public void setObjectToRemove(Object theObjectToRemove)
Sets the objectToRemove.

Parameters:
theObjectToRemove - The objectToRemove to set

isEnabled

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


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook