org.argouml.uml.ui.behavior.state_machines
Class ActionNewEvent

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.ui.UMLAction
          extended byorg.argouml.uml.ui.AbstractActionNewModelElement
              extended byorg.argouml.uml.ui.behavior.state_machines.ActionNewEvent
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
ActionNewCallEvent, ActionNewChangeEvent, ActionNewSignalEvent, ActionNewTimeEvent

public abstract class ActionNewEvent
extends AbstractActionNewModelElement

Abstract action to create new events.

Since:
Dec 15, 2002
See Also:
Serialized Form

Nested Class Summary
static interface ActionNewEvent.Roles
           
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
static String ROLE
          The constant defining the role the event to be created plays for its parent.
 
Fields inherited from class org.argouml.uml.ui.AbstractActionNewModelElement
 
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 ActionNewEvent()
          Constructor for ActionNewEvent.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Creates the event, sets its role, and navigates towards it.
protected abstract  Object createEvent()
          Implementors should create a concrete event like an instance of SignalEvent in this method.
static Object getAction(String role, Object t)
           
 
Methods inherited from class org.argouml.uml.ui.AbstractActionNewModelElement
getTarget, setTarget
 
Methods inherited from class org.argouml.uml.ui.UMLAction
getMnemonic, getValue, isEnabled, 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

ROLE

public static final String ROLE
The constant defining the role the event to be created plays for its parent. For example, if one wishes to create a trigger event for a transition, this is filled with "trigger". The values are defined in the interface Roles

See Also:
Constant Field Values
Constructor Detail

ActionNewEvent

protected ActionNewEvent()
Constructor for ActionNewEvent.

Method Detail

createEvent

protected abstract Object createEvent()
Implementors should create a concrete event like an instance of SignalEvent in this method.

Returns:
Object

actionPerformed

public void actionPerformed(ActionEvent e)
Creates the event, sets its role, and navigates towards it.

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

getAction

public static Object getAction(String role,
                               Object t)
Parameters:
role - the role the event plays
t - the transition or state to get the event for
Returns:
the event


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