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 InstanceLineanchorprotected Conditionelement -
Constructor Summary
Constructors Constructor Description AddAnchorCommand(CommandManager commandManager, Element element)Constructor -
Method Summary
Modifier and Type Method Description voidaddAnchor(InstanceLine anchor, int x)protected voiddoCancel()Undo the translation.protected voiddoExecute()protected voiddoUndo()ElementgetModifiedElement()
-
Field Details
-
Constructor Details
-
AddAnchorCommand
Constructor- Parameters:
commandManager- - The command managerelement- - The element object
-
-
Method Details
-
addAnchor
-
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:
doCancelin classAbstractTransaction
-
doExecute
protected void doExecute()- Specified by:
doExecutein classAbstractTransaction
-
doUndo
protected void doUndo()- Specified by:
doUndoin classAbstractTransaction
-
getModifiedElement
- Returns:
- the modified element or its closest relative (sibling or parent) if the element is not displayed.
-