Class SaveStateCommand

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String name
      Name of the command, shown in undo/redo GUI
    • Constructor Summary

      Constructors 
      Constructor Description
      SaveStateCommand​(java.lang.String name)
      Initialize Derived class should save the 'original' state.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void saveState()
      Derived class should implement this to save the 'final' state.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private final java.lang.String name
        Name of the command, shown in undo/redo GUI
    • Constructor Detail

      • SaveStateCommand

        public SaveStateCommand​(java.lang.String name)
        Initialize Derived class should save the 'original' state.
    • Method Detail

      • saveState

        public abstract void saveState()
        Derived class should implement this to save the 'final' state. Might be called multiple times to save intermediate states, and the state saved on the last call would be the 'redo' state.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        Name of the command, shown in undo/redo GUI