Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public abstract class UndoableEdit
- Object
- UndoableEdit
Known subtypesComponentEdit
One step an UndoHistory can take back and apply again.
An edit is recorded after the change it describes was made, so undo is
called first. Both methods must leave the edited object exactly as it was
before, or after, the original change: a history replays them in order and
each relies on the state the previous one left.
This is a class rather than an interface so that later capabilities can be added here with a default that keeps every existing edit working.
Constructors
public UndoableEdit() |
Methods
public abstract void undo() | Takes the change back. |
public abstract void redo() | Makes the change again, after undo. |
public String getName() | A short name for the change, such as “Move” or “Delete”, for an “Undo Move” menu item. |
public boolean isAlive() | False once what this edit changes can no longer take it, for instance after the component it was made in was given another document. |
Inherited methods
Constructor details
UndoableEdit
public UndoableEdit()Method details
undo
public abstract void undo()Takes the change back.
redo
public abstract void redo()Makes the change again, after
undo.getName
public String getName()A short name for the change, such as “Move” or “Delete”, for an “Undo
Move” menu item. Null by default.
isAlive
public boolean isAlive()False once what this edit changes can no longer take it, for instance
after the component it was made in was given another document. A
history passes over such an edit and forgets it. True by default.