public interface GraphController
The interaction and rendering of nodes is managed by node controller objects, each associated with particular kind of node. Edges are similarly managed by an edge controller object.
Red |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(java.lang.Object edge,
java.lang.Object node,
int end,
double x,
double y)
Add an edge to this graph editor and render it
from the given tail node to an autonomous site at the
given location.
|
void |
addEdge(java.lang.Object edge,
java.lang.Object tail,
java.lang.Object head)
Add an edge to this graph between the given tail and head
nodes.
|
void |
addGraphViewListener(GraphViewListener l) |
void |
addNode(java.lang.Object node)
Add the node to this graph editor and place it wherever convenient.
|
void |
addNode(java.lang.Object node,
double x,
double y)
Add the node to this graph editor and render it
at the given location.
|
void |
addNode(java.lang.Object node,
java.lang.Object parent)
Add the node to this graph editor, inside the given parent node
at whatever position is convenient
|
void |
addNode(java.lang.Object node,
java.lang.Object parent,
double x,
double y)
Add the node to this graph editor, inside the given parent node
and render it at the given location relative to its parent.
|
void |
clear()
Remove all figures from the display
|
void |
clearEdge(java.lang.Object edge)
Remove the figure for the given edge.
|
void |
clearNode(java.lang.Object node)
Remove the figure for the given node.
|
void |
dispatch(GraphViewEvent e)
Dispatch the given graph view event to all registered graph view
listeners.
|
Figure |
drawEdge(java.lang.Object edge)
Draw the given edge: create a figure, place it in the canvas,
and associate the figure with the edge.
|
Figure |
drawNode(java.lang.Object node)
Draw the given node: create a figure, place it in the canvas,
and associate the figure with the node.
|
Figure |
drawNode(java.lang.Object node,
java.lang.Object parent)
Draw the given node: create a figure, place it in the figure of the
given parent node,
and associate the figure with the node.
|
EdgeController |
getEdgeController(java.lang.Object edge)
Given an edge, return the controller associated with that
edge.
|
Figure |
getFigure(java.lang.Object semanticObj)
Return the figure associated with the given
semantic object (node or edge), or null
if there is no association.
|
GraphModel |
getGraphModel()
Return the graph being viewed.
|
GraphPane |
getGraphPane()
Return the graphics pane of this controller cast as a GraphPane.
|
NodeController |
getNodeController(java.lang.Object node)
Given an node, return the controller associated with that
node.
|
SelectionModel |
getSelectionModel()
Get the default selection model
|
void |
removeEdge(java.lang.Object edge)
Remove the given edge.
|
void |
removeGraphViewListener(GraphViewListener l)
Remove the given view listener.
|
void |
removeNode(java.lang.Object node)
Remove the given node.
|
void |
rerender()
Render the current graph again by recreating the figures for all
nodes and edges, but do not alter the connectivity in the graph.
|
void |
rerenderEdge(java.lang.Object edge)
Rerender the given edge by replacing its figure with a new figure.
|
void |
rerenderNode(java.lang.Object node)
Rerender the given node by replacing its figure with a new
figure.
|
void |
setFigure(java.lang.Object semanticObj,
Figure f)
Set the figure associated with the given semantic object (node
or edge).
|
void |
setGraphModel(GraphModel model)
Set the graph being viewed.
|
void |
setGraphPane(GraphPane pane)
Set the graph pane.
|
void |
setSelectionModel(SelectionModel m)
Set the default selection model.
|
void addEdge(java.lang.Object edge, java.lang.Object node, int end, double x, double y)
GraphException
- If the connector target cannot return a
valid site on the node's figure.void addEdge(java.lang.Object edge, java.lang.Object tail, java.lang.Object head)
void addGraphViewListener(GraphViewListener l)
void addNode(java.lang.Object node)
void addNode(java.lang.Object node, double x, double y)
void addNode(java.lang.Object node, java.lang.Object parent)
void addNode(java.lang.Object node, java.lang.Object parent, double x, double y)
void clear()
void clearEdge(java.lang.Object edge)
void clearNode(java.lang.Object node)
Figure drawEdge(java.lang.Object edge)
Figure drawNode(java.lang.Object node)
Figure drawNode(java.lang.Object node, java.lang.Object parent)
EdgeController getEdgeController(java.lang.Object edge)
NodeController getNodeController(java.lang.Object node)
GraphModel getGraphModel()
GraphPane getGraphPane()
Figure getFigure(java.lang.Object semanticObj)
SelectionModel getSelectionModel()
void removeEdge(java.lang.Object edge)
void removeGraphViewListener(GraphViewListener l)
void removeNode(java.lang.Object node)
void rerender()
void rerenderEdge(java.lang.Object edge)
void rerenderNode(java.lang.Object node)
void setGraphModel(GraphModel model)
void setFigure(java.lang.Object semanticObj, Figure f)
void setGraphPane(GraphPane pane)
void setSelectionModel(SelectionModel m)
void dispatch(GraphViewEvent e)