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
-
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 InsertEdgeCommand(AbstractLocation source, int x, int y)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNail(int x, int y)Add nail that the graphical layout of the edge.voidcommit()Commit the transaction.voidcommit(AbstractLocation target)Commit setting of the destination of this edgevoidcommitBranchPoint(int x, int y)Commit the branch pointvoidcommitLocation(int x, int y)Commit the locationprotected voiddoCancel()protected voiddoExecute()protected voiddoUndo()ElementgetModifiedElement()AbstractLocationgetSource()Get the source of the edgeAbstractLocationgetTarget()Get the target of the edgebooleanhasNails()Does the edge has nailsvoidmove(int x, int y)-
Methods inherited from class com.uppaal.model.core2.AbstractTransaction
cancel, execute, undo
-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, setVersion
-
-
-
-
Constructor Detail
-
InsertEdgeCommand
public InsertEdgeCommand(AbstractLocation source, int x, int y)
Constructor- Parameters:
source- - The source locationx- - The x value of the edgey- - The y value of the edge
-
-
Method Detail
-
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:
movein 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
public void commit(AbstractLocation target)
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
public AbstractLocation getSource()
Get the source of the edge- Returns:
- The source location of the edge
-
getTarget
public AbstractLocation getTarget()
Get the target of the edge- Returns:
- The target location of the edge
-
commit
public void commit()
Description copied from class:AbstractTransactionCommit the transaction.- Overrides:
commitin classAbstractTransaction
-
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.
-
-