public class TLspSetControllerAction extends ALcdAction
ILcdAction
that sets an ILspController
on a
given ILspView
.
A typical use case is activating the edit controller after a new shape is created (see
setActionToTriggerAfterCommit
in the TLspCreateController
).
The action automatically updates the ILcdAction.SELECTED_KEY
value based on whether the controller is active or not.changeSupport
DEFAULT, LONG_DESCRIPTION, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, VISIBLE
Constructor and Description |
---|
TLspSetControllerAction(ILspView aView,
ILspController aController)
Creates a new action with an
ILspView and an ILspController . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent aEvent)
Sets the controller onto the view.
|
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, isTraceOn, putValue, registerInstance, removePropertyChangeListener, setClassTraceOn, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription, setTraceOn
public TLspSetControllerAction(ILspView aView, ILspController aController)
ILspView
and an ILspController
.
The icon and name for the new action are taken from the specified ILspController
.aView
- the view on which the controller will be setaController
- the controller that is activated by this actionpublic void actionPerformed(ActionEvent aEvent)
aEvent
- the event specifying the context in which this action was triggered