public class UndoAction extends AbstractViewAction
This action requires that the View returns a project specific undo action when invoking getActionMap("redo") on a View.
This action is called when the user selects the Undo item in the Edit menu. The menu item is automatically created by the application.
If you want this behavior in your application, you have to create an action
with this ID and put it in your ApplicationModel in method
ApplicationModel.initApplication(org.jhotdraw.app.Application).
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID |
ENABLED_PROPERTY, VIEW_PROPERTY| Constructor and Description |
|---|
UndoAction(Application app,
View view)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
protected void |
installViewListeners(View p)
Installs listeners on the view object.
|
protected void |
uninstallViewListeners(View p)
Installs listeners on the view object.
|
protected void |
updateEnabledState() |
protected void |
updateView(View oldValue,
View newValue)
Updates the listeners of this action depending on the current view
of the application.
|
getActiveView, getApplication, getPropertyName, isEnabled, setEnabled, setPropertyName, updateEnabled, updateViewpublic static final java.lang.String ID
public UndoAction(Application app, View view)
protected void updateEnabledState()
protected void updateView(View oldValue, View newValue)
AbstractViewActionupdateView in class AbstractViewActionprotected void installViewListeners(View p)
installViewListeners in class AbstractViewActionprotected void uninstallViewListeners(View p)
uninstallViewListeners in class AbstractViewActionpublic void actionPerformed(java.awt.event.ActionEvent e)