|
|||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
This class implements a main edit mode for interacting with a graph displayed in a GraphCanvas. The EditMode dispatches some of its tasks to instances of CreateEdgeMode, MoveSelectionMode, RectangularSelectionMode and EditLabelMode, respectively. If the EditMode is activated, it maintains a GraphSelection and connects selecting nodes and edges to highlighting these nodes and edges in the graph canvas. It handles user input by changing the graph possibly through activating one of the above mentioned input modes as child modes. A list of user input gestures and the actions they trigger is given in the comment for activate().
| Constructor Summary | |
|---|---|
EditMode(/*GraphCanvas*/ canvas, /*Boolean?*/ selectNodes, /*Boolean?*/ selectEdges, /*Boolean?*/ routeEdges, /*HierarchyManager?*/ hierarchyManager)
This class implements a main edit mode for interacting with a graph displayed in a GraphCanvas. |
|
| Method Summary | |
|---|---|
|
activate()
activates this input mode. |
|
clearSelection()
clears the current selection. |
|
deactivate()
deactivates this input mode. |
|
editLabel(/*String*/ id)
starts editing a node label. |
Number |
getEdgeTestSensitivity()
gets the edge test sensitivity in pixels (view units). |
GraphSelection |
getSelection()
returns the current selection. |
|
setEdgeTestSensitivity(/*Number*/ sensitivity)
sets the edge test sensitivity in pixels (view units). |
| Constructor Detail |
|---|
EditMode(/*GraphCanvas*/ canvas, /*Boolean?*/ selectNodes, /*Boolean?*/ selectEdges, /*Boolean?*/ routeEdges, /*HierarchyManager?*/ hierarchyManager)
canvas - the canvas instance this mode works on
selectNodes - if true, nodes are selectable (default true)
selectEdges - if true, edges are selectable (default true)
routeEdges - if true, newly created edges are roued (default false)
hierarchyManager - optional hierarchy manager for the graph of the canvas
| Method Detail |
|---|
activate()
clearSelection()
deactivate()
editLabel(/*String*/ id)
id - id of a node or a node label
Number getEdgeTestSensitivity()
GraphSelection getSelection()
setEdgeTestSensitivity(/*Number*/ sensitivity)