Class AbstractUndoableCommand

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String name
      The command name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Executes this command.
      java.lang.String getName()
      Gets the command name.
      void redo()
      Performs redo for this command.
      void setName​(java.lang.String name)
      Sets the command name.
      boolean shouldExecute()
      Tests if the command can be executed.
      void undo()
      Performs undo for this command.
      • Methods inherited from class java.lang.Object

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

      • name

        protected java.lang.String name
        The command name.
    • Constructor Detail

      • AbstractUndoableCommand

        public AbstractUndoableCommand()
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
        Sets the command name.
        Parameters:
        name - Name to set
      • shouldExecute

        public boolean shouldExecute()
        Description copied from interface: UndoableCommand
        Tests if the command can be executed.
        Specified by:
        shouldExecute in interface UndoableCommand
        Returns:
        True if command should be executed