Class LXCommandEngine

java.lang.Object
heronarts.lx.command.LXCommandEngine

public class LXCommandEngine extends Object
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 Details

  • Constructor Details

    • LXCommandEngine

      public LXCommandEngine(LX lx)
  • Method Details

    • perform

      public LXCommandEngine perform(LXCommand command)
      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

      public LXCommandEngine setDirty(boolean dirty)
    • getUndoCommand

      public LXCommand getUndoCommand()
    • getRedoCommand

      public LXCommand getRedoCommand()
    • clear

      public LXCommandEngine clear()
    • undo

      public LXCommandEngine 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

      public LXCommandEngine redo()
      When possible, re-does an operation that has been undone.
      Returns:
      this