Package commands

Class CmdSelectShape

  • All Implemented Interfaces:
    Command

    public class CmdSelectShape
    extends java.lang.Object
    implements Command
    Class that represent command to set shape to selected or unselected state.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmdSelectShape​(Shape shape, boolean selectedState)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Set shape selected state to true or false.
      void unexecute()
      Undo previous selection/unselection.
      • Methods inherited from class java.lang.Object

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

      • shape

        private Shape shape
      • selectedState

        private boolean selectedState
    • Constructor Detail

      • CmdSelectShape

        public CmdSelectShape​(Shape shape,
                              boolean selectedState)
    • Method Detail

      • execute

        public void execute()
        Set shape selected state to true or false.
        Specified by:
        execute in interface Command
      • unexecute

        public void unexecute()
        Undo previous selection/unselection.
        Specified by:
        unexecute in interface Command