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
All Methods Instance Methods Concrete Methods 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-
Methods inherited from class com.uppaal.model.core2.AbstractTransaction
cancel, commit, execute, move, undo
-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, merge, 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:
doCancel
in classAbstractTransaction
-
doExecute
protected void doExecute()
- Specified by:
doExecute
in classAbstractTransaction
-
doUndo
protected void doUndo()
- Specified by:
doUndo
in 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
-
-