public abstract static class UndoManager.Action extends PropertySet
Modifier and Type | Field and Description |
---|---|
protected String |
description |
properties
Constructor and Description |
---|
Action() |
Modifier and Type | Method and Description |
---|---|
String |
getDefaultDescription()
Returns an automatically generated description for simple, atomic,
actions such as removing an attribute from an element or typing
text.
|
String |
getDescription()
Returns the description of this action.
|
abstract DocumentEvent[] |
getDocumentEvents()
Returns the DocumentEvents which compose this action.
|
void |
setDescription(String description)
Describes this action.
|
getProperties, getProperty, getPropertyCount, hasProperty, putProperties, putProperty, removeAllProperties, removeProperty
protected String description
public void setDescription(String description)
This method is typically invoked by the application just after the user has performed an action because at that time, the application knows how to describe this user action.
Descriptions are automatically moved from undo action to corresponding redo action after the undo action has been performed, so there is no need to invoke this method for a redo action.
Commands automatically adds a description to top undo action, so in principle, there is no need to use this method at all.
public String getDescription()
null
if such description has not been specified.getDefaultDescription()
public String getDefaultDescription()
null
if such description cannot be
guessed.public abstract DocumentEvent[] getDocumentEvents()