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 void
doCancel()
protected void
doExecute()
protected void
doUndo()
Element
getElement()
Get the elementElement
getModifiedElement()
InstanceLine
getSource()
Get message sourcevoid
move(int x)
Move the 'x' value of the messagevoid
moveY(int y)
Move the 'y' value of the messgevoid
setTarget(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:
doCancel
in classAbstractTransaction
-
doExecute
protected void doExecute()- Specified by:
doExecute
in classAbstractTransaction
-
doUndo
protected void doUndo()- Specified by:
doUndo
in 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
-