Package com.uppaal.model.core2.lsc
Class InsertMessageCommand
- java.lang.Object
-
- com.uppaal.model.core2.AbstractCommand
-
- com.uppaal.model.core2.AbstractTransaction
-
- com.uppaal.model.core2.lsc.InsertMessageCommand
-
- All Implemented Interfaces:
Command
public class InsertMessageCommand extends AbstractTransaction
A transaction command for inserting elements. The transaction supports optionally setting a position, repeatedly.
-
-
Field Summary
-
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 InsertMessageCommand(InstanceLine source, Message message)The hot sections touched by the message (and split)
-
Method Summary
Modifier and Type Method Description protected voiddoCancel()protected voiddoExecute()protected voiddoUndo()ElementgetElement()Get the elementElementgetModifiedElement()InstanceLinegetSource()Get message sourcevoidmove(int x)Move the 'x' value of the messagevoidmoveY(int y)Move the 'y' value of the messgevoidsetTarget(InstanceLine target)Set the target-
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
-
-
-
-
Constructor Detail
-
InsertMessageCommand
public InsertMessageCommand(InstanceLine source, Message message)
The hot sections touched by the message (and split)- Parameters:
source- - The sourcemessage- - The message
-
-
Method Detail
-
getSource
public InstanceLine getSource()
Get message source- Returns:
- The source of the message
-
setTarget
public void setTarget(InstanceLine target)
Set the target- Parameters:
target- - the target of the message
-
getElement
public Element getElement()
Get the element- Returns:
- The element
-
doCancel
protected void doCancel()
- 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.
-
move
public void move(int x)
Move the 'x' value of the message- Parameters:
x- - The new 'x' value
-
moveY
public void moveY(int y)
Move the 'y' value of the messge- Parameters:
y- - The new 'y' value
-
-