org.argouml.uml.ui
Class AbstractActionAddModelElement

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.ui.UMLAction
          extended byorg.argouml.uml.ui.AbstractActionAddModelElement
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
ActionAddAssociationSpecification, ActionAddClassifierRoleBase, ActionAddContextSignal, ActionAddExtendExtensionPoint, ActionAddInstanceClassifier, ActionAddMessagePredecessor

public abstract class AbstractActionAddModelElement
extends UMLAction

Abstract action that is the parent to all add actions that add the modelelements via the UMLAddDialog.

Since:
Oct 2, 2002
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
private  boolean exclusive
           
private  boolean multiSelect
           
private  Object target
           
 
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 AbstractActionAddModelElement()
          The constructor.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Perform the work the action is supposed to do.
protected abstract  void doIt(Vector selected)
          The action that has to be done by Argouml after the user clicks ok in the UMLAddDialog.
protected abstract  Vector getChoices()
          Returns the choices the user has in the UMLAddDialog.
protected abstract  String getDialogTitle()
          Returns the title of the dialog.
protected abstract  Vector getSelected()
          The modelelements allready selected BEFORE the dialog is shown.
protected  Object getTarget()
          Returns the target.
 boolean isEnabled()
           
 boolean isExclusive()
          Returns the exclusive.
 boolean isMultiSelect()
          Returns the multiSelect.
 void setExclusive(boolean theExclusive)
          Sets the exclusive.
 void setMultiSelect(boolean theMultiSelect)
          Sets the multiSelect.
 void setTarget(Object theTarget)
          Sets the target.
 
Methods inherited from class org.argouml.uml.ui.UMLAction
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

multiSelect

private boolean multiSelect

exclusive

private boolean exclusive
Constructor Detail

AbstractActionAddModelElement

protected AbstractActionAddModelElement()
The constructor.

Method Detail

getTarget

protected Object getTarget()
Returns the target.

Returns:
MModelElement

setTarget

public void setTarget(Object theTarget)
Sets the target.

Parameters:
theTarget - The target to set

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from class: UMLAction
Perform the work the action is supposed to do. This method needs to be overridden by all actions, since it only shows a fake progressbar...

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class UMLAction
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

getChoices

protected abstract Vector getChoices()
Returns the choices the user has in the UMLAddDialog. The choices are depicted on the left side of the UMLAddDialog (sorry Arabic users) and can be moved via the buttons on the dialog to the right side. On the right side are the selected modelelements.

Returns:
Vector

getSelected

protected abstract Vector getSelected()
The modelelements allready selected BEFORE the dialog is shown.

Returns:
Vector

getDialogTitle

protected abstract String getDialogTitle()
Returns the title of the dialog.

Returns:
String

doIt

protected abstract void doIt(Vector selected)
The action that has to be done by Argouml after the user clicks ok in the UMLAddDialog.

Parameters:
selected - The choices the user has selected in the UMLAddDialog

isExclusive

public boolean isExclusive()
Returns the exclusive.

Returns:
boolean

isMultiSelect

public boolean isMultiSelect()
Returns the multiSelect.

Returns:
boolean

setExclusive

public void setExclusive(boolean theExclusive)
Sets the exclusive.

Parameters:
theExclusive - The exclusive to set

setMultiSelect

public void setMultiSelect(boolean theMultiSelect)
Sets the multiSelect.

Parameters:
theMultiSelect - The multiSelect 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