Class UndoableCommand


  • public abstract class UndoableCommand
    extends Object
    An action that can be rolled back. Similar to an UndoableEdit, but assumes that the action is yet to be executed, whereas an UndoableEdit assumes that the action has already been executed (i.e. it has a #redo method but not a #do method).
    See Also:
    UndoableEdit
    • Constructor Detail

      • UndoableCommand

        public UndoableCommand​(String name)
    • Method Detail

      • dispose

        protected void dispose()
        Releases resources.
      • execute

        public abstract void execute()
        If there is an exception that leaves this UndoableCommand execution partially complete and non-unexecutable, be sure to call #reportIrreversibleChange() on the UndoableEditReceiver (which can be obtained from the LayerManager).
        See Also:
        UndoableEditReceiver.reportIrreversibleChange()
      • unexecute

        public abstract void unexecute()
      • getName

        public String getName()