|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object extended bydiva.graph.AbstractGraphController
An abstract implementation of the GraphController interface. Concrete subclasses must implement the getNodeController() and getEdgeController() methods, to return the correct controller for a given node or edge.
| Constructor Summary | |
AbstractGraphController()
Construct a graph controller without a parent pane. |
|
| Method Summary | |
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. |
abstract 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. |
abstract NodeController |
getNodeController(java.lang.Object node)
Given an node, return the controller associated with that node. |
SelectionModel |
getSelectionModel()
Get the default selection model |
protected abstract void |
initializeInteraction()
Initialize all interaction on the graph pane. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractGraphController()
| Method Detail |
public void addEdge(java.lang.Object edge, java.lang.Object node, int end, double x, double y)
addEdge in interface GraphControllerGraphException - If the connector target cannot return a
valid site on the node's figure.public void addEdge(java.lang.Object edge, java.lang.Object tail, java.lang.Object head)
addEdge in interface GraphControllerpublic void addGraphViewListener(GraphViewListener l)
addGraphViewListener in interface GraphControllerpublic void addNode(java.lang.Object node)
addNode in interface GraphControllerpublic void addNode(java.lang.Object node, double x, double y)
addNode in interface GraphControllerpublic void addNode(java.lang.Object node, java.lang.Object parent)
addNode in interface GraphControllerpublic void addNode(java.lang.Object node, java.lang.Object parent, double x, double y)
addNode in interface GraphControllerpublic void clear()
clear in interface GraphControllerpublic void clearEdge(java.lang.Object edge)
clearEdge in interface GraphControllerpublic void clearNode(java.lang.Object node)
clearNode in interface GraphControllerpublic Figure drawEdge(java.lang.Object edge)
drawEdge in interface GraphControllerpublic Figure drawNode(java.lang.Object node)
drawNode in interface GraphControllerpublic Figure drawNode(java.lang.Object node, java.lang.Object parent)
drawNode in interface GraphControllerpublic abstract EdgeController getEdgeController(java.lang.Object edge)
getEdgeController in interface GraphControllerpublic abstract NodeController getNodeController(java.lang.Object node)
getNodeController in interface GraphControllerpublic GraphModel getGraphModel()
getGraphModel in interface GraphControllerpublic GraphPane getGraphPane()
getGraphPane in interface GraphControllerpublic Figure getFigure(java.lang.Object semanticObj)
getFigure in interface GraphControllerpublic SelectionModel getSelectionModel()
getSelectionModel in interface GraphControllerpublic void removeEdge(java.lang.Object edge)
removeEdge in interface GraphControllerpublic void removeGraphViewListener(GraphViewListener l)
removeGraphViewListener in interface GraphControllerpublic void removeNode(java.lang.Object node)
removeNode in interface GraphControllerpublic void rerender()
rerender in interface GraphControllerpublic void rerenderEdge(java.lang.Object edge)
rerenderEdge in interface GraphControllerpublic void rerenderNode(java.lang.Object node)
rerenderNode in interface GraphControllerpublic void setGraphModel(GraphModel model)
setGraphModel in interface GraphControllerpublic void setFigure(java.lang.Object semanticObj, Figure f)
setFigure in interface GraphControllerpublic void setGraphPane(GraphPane pane)
setGraphPane in interface GraphControllerpublic void setSelectionModel(SelectionModel m)
setSelectionModel in interface GraphControllerpublic void dispatch(GraphViewEvent e)
dispatch in interface GraphControllerprotected abstract void initializeInteraction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||