Package commands

Class CmdUpdatePoint

  • All Implemented Interfaces:
    Command

    public class CmdUpdatePoint
    extends java.lang.Object
    implements Command
    Class that represent command for update existing point from the draw.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Update point.
      void unexecute()
      Undo previous updating and return point to the original values.
      • Methods inherited from class java.lang.Object

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

      • oldState

        private Point oldState
      • newState

        private Point newState
      • originalState

        private Point originalState
    • Constructor Detail

      • CmdUpdatePoint

        public CmdUpdatePoint​(Point oldState,
                              Point newState)
    • Method Detail

      • execute

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

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