org.argouml.uml.ui.behavior.state_machines
Class ActionNewEvent
java.lang.Object
javax.swing.AbstractAction
org.argouml.uml.ui.UMLAction
org.argouml.uml.ui.AbstractActionNewModelElement
org.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
Field Summary |
static String |
ROLE
The constant defining the role the event to be created plays for its
parent. |
Constructor Summary |
protected |
ActionNewEvent()
Constructor for ActionNewEvent. |
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
ActionNewEvent
protected ActionNewEvent()
- Constructor for ActionNewEvent.
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 playst
- the transition or state to get the event for
- Returns:
- the event