Package com.uppaal.model.core2.lsc
Class AddAnchorCommand
- java.lang.Object
-
- com.uppaal.model.core2.AbstractCommand
-
- com.uppaal.model.core2.AbstractTransaction
-
- com.uppaal.model.core2.lsc.AddAnchorCommand
-
- All Implemented Interfaces:
Command
public class AddAnchorCommand extends AbstractTransaction
-
-
Field Summary
Fields Modifier and Type Field Description protected InstanceLine
anchor
protected Condition
element
-
Fields inherited from class com.uppaal.model.core2.AbstractTransaction
commandManager, committed
-
Fields inherited from class com.uppaal.model.core2.AbstractCommand
version
-
-
Constructor Summary
Constructors Constructor Description AddAnchorCommand(CommandManager commandManager, Element element)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnchor(InstanceLine anchor, int x)
protected void
doCancel()
Undo the translation.protected void
doExecute()
protected void
doUndo()
Element
getModifiedElement()
-
Methods inherited from class com.uppaal.model.core2.AbstractTransaction
cancel, commit, execute, move, undo
-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, merge, setVersion
-
-
-
-
Field Detail
-
element
protected Condition element
-
anchor
protected InstanceLine anchor
-
-
Constructor Detail
-
AddAnchorCommand
public AddAnchorCommand(CommandManager commandManager, Element element)
Constructor- Parameters:
commandManager
- - The command managerelement
- - The element object
-
-
Method Detail
-
addAnchor
public void addAnchor(InstanceLine anchor, int x)
-
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 classAbstractTransaction
-
doExecute
protected void doExecute()
- Specified by:
doExecute
in classAbstractTransaction
-
doUndo
protected void doUndo()
- Specified by:
doUndo
in classAbstractTransaction
-
getModifiedElement
public Element getModifiedElement()
- Returns:
- the modified element or its closest relative (sibling or parent) if the element is not displayed.
-
-