Package commands

Class CmdUpdateCircle

  • All Implemented Interfaces:
    Command

    public class CmdUpdateCircle
    extends java.lang.Object
    implements Command
    Class that represent command for update existing circle from the draw.
    • Field Detail

      • oldState

        private Circle oldState
      • newState

        private Circle newState
      • originalState

        private Circle originalState
    • Constructor Detail

      • CmdUpdateCircle

        public CmdUpdateCircle​(Circle oldState,
                               Circle newState)
    • Method Detail

      • execute

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

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