Package commands

Class CmdUpdateLine

  • All Implemented Interfaces:
    Command

    public class CmdUpdateLine
    extends java.lang.Object
    implements Command
    Class that represent command for update existing line from the draw.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmdUpdateLine​(Line oldState, Line newState)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Update line.
      void unexecute()
      Undo previous updating and return line 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 Line oldState
      • newState

        private Line newState
      • originalState

        private Line originalState
    • Constructor Detail

      • CmdUpdateLine

        public CmdUpdateLine​(Line oldState,
                             Line newState)
    • Method Detail

      • execute

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

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