Class ChangeMessageEndCommand

    • Field Detail

      • element

        protected Message element
      • changeSource

        protected boolean changeSource
      • oldX

        protected int oldX
      • newX

        protected int newX
      • oldY

        protected int oldY
      • newY

        protected int newY
    • Constructor Detail

      • ChangeMessageEndCommand

        public ChangeMessageEndCommand​(CommandManager commandManager,
                                       Element element,
                                       boolean source)
        Constructor
        Parameters:
        commandManager - - The command manager
        element - - The change element
        source - - Is the source
    • Method Detail

      • changeEnd

        public void changeEnd​(int x)
        Change the end of the message
        Parameters:
        x - - The input value for the 'x'
      • setFinalEnd

        public void setFinalEnd​(InstanceLine end)
        Set the final value
        Parameters:
        end - - The end value
      • 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.