Class SetLengthCommand

    • Field Detail

      • oldLength

        protected int oldLength
      • newLength

        protected int newLength
    • Constructor Detail

      • SetLengthCommand

        public SetLengthCommand​(CommandManager commandManager,
                                Element element,
                                ViewWorkAround view)
        Constructor
        Parameters:
        commandManager - - The command manager
        element - - The element
        view - - The work around view
    • Method Detail

      • resize

        public void resize​(int y)
        Resize the instanceLine element
        Parameters:
        y - - The new length
      • 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.