Package commands

Class CmdUpdateRectangle

  • All Implemented Interfaces:
    Command

    public class CmdUpdateRectangle
    extends java.lang.Object
    implements Command
    Class that represent command for update existing rectangle from the draw.
    • Constructor Detail

      • CmdUpdateRectangle

        public CmdUpdateRectangle​(Rectangle oldState,
                                  Rectangle newState)
    • Method Detail

      • execute

        public void execute()
        Update rectangle.
        Specified by:
        execute in interface Command
      • unexecute

        public void unexecute()
        Undo previous updating and return rectangle to the original values.
        Specified by:
        unexecute in interface Command