|
|||||
| SUMMARY: FIELD | CONSTR | METHOD| EVENT | DETAIL: FIELD | CONSTR | METHOD| EVENT | ||||
This is an input mode for creating edges.
A CanvasDragLine is used to display the potential edge once the input mode is activated (see activate).
| Field Summary | |
|---|---|
Boolean |
routeEdges
route newly created edges (optional, default false) |
Object |
startNode
the start node for the edge to be created (read/write) |
| Constructor Summary | |
|---|---|
CreateEdgeMode(/*GraphCanvas*/ canvas, /*boolean*/ routeEdges)
This is an input mode for creating edges. |
|
| Method Summary | |
|---|---|
Boolean |
acceptSourceNode(/*String*/ nodeId)
returns true, if the node with the given id is a possible source node for the new edge. |
Boolean |
acceptTargetNode(/*String*/ nodeId)
returns true, if the node with the given id is a possible target node for the new edge. |
|
activate()
activates this instance. |
|
cancelEdgeCreation()
cancels creating an edge properly and reactivates the parent input mode. |
|
createEdge(/*Graph*/ graph, /*String*/ startNodeId, /*String*/ endNodeId)
is called for creating the edge. |
|
deactivate()
deactivates this instance. |
|
setTargetNode(/*String*/ nodeId)
sets the id of the target node. |
| Field Detail |
|---|
/*Boolean*/ routeEdges
/*Object*/ startNode
| Constructor Detail |
|---|
CreateEdgeMode(/*GraphCanvas*/ canvas, /*boolean*/ routeEdges)
canvas - the canvas
routeEdges - Boolean route newly created edges (optional, default false)
| Method Detail |
|---|
Boolean acceptSourceNode(/*String*/ nodeId)
nodeId - The id of the node.
Boolean acceptTargetNode(/*String*/ nodeId)
nodeId - The id of the node.
activate()
cancelEdgeCreation()
createEdge(/*Graph*/ graph, /*String*/ startNodeId, /*String*/ endNodeId)
graph - The graph that contains the nodes.
startNodeId - The id of the starting node.
endNodeId - The id of the ending node.
deactivate()
setTargetNode(/*String*/ nodeId)
nodeId - The id of the node.