Class UndoCommand

java.lang.Object
fr.istic.aco.editor.commands.UndoCommand
All Implemented Interfaces:
Command

public class UndoCommand extends Object implements Command
The RedoCommand class implements the functionality for undoing the last performed action in the text editor.
  • Constructor Details

    • UndoCommand

      public UndoCommand(UndoManager undoManager)
      Constructs a UndoCommand with the specified dependencies.
      Parameters:
      undoManager - the undo manager for handling undo and redo functionality
  • Method Details

    • execute

      public void execute()
      Executes the undo operation.

      This method invokes the UndoManager.undo() method to undo the most recent action in the text editor.

      Specified by:
      execute in interface Command