Package heronarts.lx.command
Class LXCommandEngine
java.lang.Object
heronarts.lx.command.LXCommandEngine
The LX command engine keeps track of high-level UI commands that have been
performed. A stack is maintained which enables Undo operations to take place.
-
Field Summary
Modifier and TypeFieldDescriptionfinal BooleanParameter
final MutableParameter
final MutableParameter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclear()
boolean
isDirty()
boolean
isDirty
(long sinceMs) Performs a command and pushes it onto the undo stack.redo()
When possible, re-does an operation that has been undone.setDirty
(boolean dirty) undo()
Undoes the last command on the undo stack, if there is any.
-
Field Details
-
undoChanged
-
redoChanged
-
dirty
-
-
Constructor Details
-
LXCommandEngine
-
-
Method Details
-
perform
Performs a command and pushes it onto the undo stack.- Parameters:
command
- Command to perform and push onto the undo stack- Returns:
- this
-
isDirty
public boolean isDirty() -
isDirty
public boolean isDirty(long sinceMs) -
setDirty
-
getUndoCommand
-
getRedoCommand
-
clear
-
undo
Undoes the last command on the undo stack, if there is any. If the undo stack is empty then this is a no-op.- Returns:
- this
-
redo
When possible, re-does an operation that has been undone.- Returns:
- this
-