Class ChangeAnchorCommand

    • Constructor Detail

      • ChangeAnchorCommand

        public ChangeAnchorCommand​(CommandManager commandManager,
                                   Element element)
        Constructor
        Parameters:
        commandManager - - The command manager
        element - - The change element
    • Method Detail

      • changeAnchor

        public void changeAnchor​(int x)
        Change anchor
        Parameters:
        x - - The x value of the property 'x'
      • setFinalAnchor

        public void setFinalAnchor​(InstanceLine anchor,
                                   ViewWorkAround view)
        Set the final anchor
        Parameters:
        anchor - - The anchor
        view - - The work view
      • doCancel

        protected void doCancel()
        Undo the translation. All elements are moved back to their original position. The translation can only be canceled as long as it has not been committed.
        Specified by:
        doCancel in class AbstractTransaction
      • getModifiedElement

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