Class SnapCommand

  • All Implemented Interfaces:
    Command

    public class SnapCommand
    extends AbstractCommand
    Command to snap template elements to a grid.
    • Constructor Detail

      • SnapCommand

        public SnapCommand​(AbstractTemplate template,
                           double diameter)
        Snap command
        Parameters:
        template - - the template object
        diameter - - the position value
    • Method Detail

      • execute

        public void execute()
      • undo

        public void undo()
      • getModifiedElement

        public Element getModifiedElement()
        Returns:
        the modified element or its closest relative (sibling or parent) if the element is not displayed.