Package commands

Class CmdToFront

  • All Implemented Interfaces:
    Command

    public class CmdToFront
    extends java.lang.Object
    implements Command
    Class that represent command for bring some shape one position to the front.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Get index of shape, remove it from that position and add it to position at index greater by one.
      void unexecute()
      Get index of shape, remove it from previous position and return it to old position.
      • Methods inherited from class java.lang.Object

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

      • execute

        public void execute()
        Get index of shape, remove it from that position and add it to position at index greater by one.
        Specified by:
        execute in interface Command
      • unexecute

        public void unexecute()
        Get index of shape, remove it from previous position and return it to old position.
        Specified by:
        unexecute in interface Command