templates.diagram.actions
Class DiagramActions.SetTypeAction
java.lang.Object
javax.swing.AbstractAction
templates.diagram.actions.AbstractDiagramAction
templates.diagram.actions.DiagramActions.SetTypeAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
- Enclosing class:
- DiagramActions
public static class DiagramActions.SetTypeAction
- extends AbstractDiagramAction
Action which sets the type (module or channel) of the
TemplateComponent of an Entity.
- Author:
- Lenko Grigorov
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
diagram
protected TemplateDiagram diagram
- The
TemplateDiagram context to be used by the action.
entity
protected Entity entity
- The
Entity which represents the TemplateComponent
whose type has to be set.
type
protected int type
- The type to be set (
TemplateComponent.TYPE_MODULE or
TemplateComponent.TYPE_CHANNEL).
DiagramActions.SetTypeAction
public DiagramActions.SetTypeAction(TemplateDiagram diagram,
Entity entity,
int type)
- Construct an action for the given parameters.
- Parameters:
diagram - the TemplateDiagram to be used by the actionentity - the Entity which represents the
TemplateComponent whose type has to be settype - the type to be set (TemplateComponent.TYPE_MODULE
or TemplateComponent.TYPE_CHANNEL)
DiagramActions.SetTypeAction
public DiagramActions.SetTypeAction(javax.swing.undo.CompoundEdit parent,
TemplateDiagram diagram,
Entity entity,
int type)
- Construct an action for the given parameters.
- Parameters:
parent - the UndoableEdit to which this action should add
its own undo informationdiagram - the TemplateDiagram to be used by the actionentity - the Entity which represents the
TemplateComponent whose type has to be settype - the type to be set (TemplateComponent.TYPE_MODULE
or TemplateComponent.TYPE_CHANNEL)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)