Package com.uppaal.model.core2
Class InsertEdgeCommand
java.lang.Object
com.uppaal.model.core2.AbstractCommand
com.uppaal.model.core2.AbstractTransaction
com.uppaal.model.core2.InsertEdgeCommand
- All Implemented Interfaces:
Command
public class InsertEdgeCommand extends AbstractTransaction
Transaction inserting the edge
-
Field Summary
-
Constructor Summary
Constructors Constructor Description InsertEdgeCommand(AbstractLocation source, int x, int y)
Constructor -
Method Summary
Modifier and Type Method Description void
addNail(int x, int y)
Add nail that the graphical layout of the edge.void
commit()
Commit the transaction.void
commit(AbstractLocation target)
Commit setting of the destination of this edgevoid
commitBranchPoint(int x, int y)
Commit the branch pointvoid
commitLocation(int x, int y)
Commit the locationprotected void
doCancel()
protected void
doExecute()
protected void
doUndo()
Element
getModifiedElement()
AbstractLocation
getSource()
Get the source of the edgeAbstractLocation
getTarget()
Get the target of the edgeboolean
hasNails()
Does the edge has nailsvoid
move(int x, int y)
-
Constructor Details
-
InsertEdgeCommand
Constructor- Parameters:
source
- - The source locationx
- - The x value of the edgey
- - The y value of the edge
-
-
Method Details
-
addNail
public void addNail(int x, int y)Add nail that the graphical layout of the edge.- Parameters:
x
- - The x value of the edgey
- - The y value of the edge
-
move
public void move(int x, int y)- Overrides:
move
in classAbstractTransaction
-
commitLocation
public void commitLocation(int x, int y)Commit the location- Parameters:
x
- - The x value of the edgey
- - The y value of the edge
-
commitBranchPoint
public void commitBranchPoint(int x, int y)Commit the branch point- Parameters:
x
- - The x value of the edgey
- - The y value of the edge
-
commit
Commit setting of the destination of this edge- Parameters:
target
- - The location
-
hasNails
public boolean hasNails()Does the edge has nails- Returns:
- True : The edge has the start node and the next node
-
getSource
Get the source of the edge- Returns:
- The source location of the edge
-
getTarget
Get the target of the edge- Returns:
- The target location of the edge
-
commit
public void commit()Description copied from class:AbstractTransaction
Commit the transaction.- Overrides:
commit
in classAbstractTransaction
-
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.
-