Package com.uppaal.model.core2.lsc
Class RemoveAnchorCommand
- java.lang.Object
-
- com.uppaal.model.core2.AbstractCommand
-
- com.uppaal.model.core2.AbstractTransaction
-
- com.uppaal.model.core2.lsc.RemoveAnchorCommand
-
- All Implemented Interfaces:
Command
public class RemoveAnchorCommand extends AbstractTransaction
The command class for remove anchor
-
-
Field Summary
Fields Modifier and Type Field Description protected Conditionelementprotected InstanceLineoldAnchor-
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 RemoveAnchorCommand(CommandManager commandManager, Element element, InstanceLine anchor)Constructor
-
Method Summary
Modifier and Type Method Description protected voiddoCancel()Undo the translation.protected voiddoExecute()protected voiddoUndo()ElementgetModifiedElement()voidremoveAnchor(ViewWorkAround view)Remove the anchor-
Methods inherited from class com.uppaal.model.core2.AbstractTransaction
cancel, commit, execute, move, undo
-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, setVersion
-
-
-
-
Field Detail
-
oldAnchor
protected InstanceLine oldAnchor
-
element
protected Condition element
-
-
Constructor Detail
-
RemoveAnchorCommand
public RemoveAnchorCommand(CommandManager commandManager, Element element, InstanceLine anchor)
Constructor- Parameters:
commandManager- - The command managerelement-anchor-
-
-
Method Detail
-
removeAnchor
public void removeAnchor(ViewWorkAround view)
Remove the anchor- Parameters:
view- - The work around 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:
doCancelin classAbstractTransaction
-
doExecute
protected void doExecute()
- Specified by:
doExecutein classAbstractTransaction
-
doUndo
protected void doUndo()
- Specified by:
doUndoin classAbstractTransaction
-
getModifiedElement
public Element getModifiedElement()
- Returns:
- the modified element or its closest relative (sibling or parent) if the element is not displayed.
-
-