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
-
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
-
Constructor Details
-
InsertMessageCommand
The hot sections touched by the message (and split)- Parameters:
source- - The sourcemessage- - The message
-
-
Method Details
-
getSource
Get message source- Returns:
- The source of the message
-
setTarget
Set the target- Parameters:
target- - the target of the message
-
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
- 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
-