public abstract class AbstractGraphController extends Object implements GraphController
| Constructor and Description |
|---|
AbstractGraphController()
Construct a graph controller without a parent
pane.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(Object edge,
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(Object edge,
Object tail,
Object head)
Add an edge to this graph between the given tail and head
nodes.
|
void |
addGraphViewListener(GraphViewListener l) |
void |
addNode(Object node)
Add the node to this graph editor and place it whereever convenient.
|
void |
addNode(Object node,
double x,
double y)
Add the node to this graph editor and render it
at the given location.
|
void |
addNode(Object node,
Object parent)
Add the node to this graph editor, inside the given parent node
at whatever position is convenient
|
void |
addNode(Object node,
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(Object edge)
Remove the figure for the given edge.
|
void |
clearNode(Object node)
Remove the figure for the given node.
|
void |
dispatch(GraphViewEvent e)
Dispatch the given graph view event to all registered grpah view
listeners.
|
Figure |
drawEdge(Object edge)
Draw the given edge: create a figure, place it in the canvas,
and associate the figure with the edge.
|
Figure |
drawNode(Object node)
Draw the given node: create a figure, place it in the canvas,
and associate the figure with the node.
|
Figure |
drawNode(Object node,
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(Object edge)
Given an edge, return the controller associated with that
edge.
|
Figure |
getFigure(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(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(Object edge)
Remove the given edge.
|
void |
removeGraphViewListener(GraphViewListener l)
Remove the given view listener.
|
void |
removeNode(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(Object edge)
Rerender the given edge by replacing its figure with a new figure.
|
void |
rerenderNode(Object node)
Rerender the given node by replacing its figure with a new
figure.
|
void |
setFigure(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.
|
public AbstractGraphController()
public void addEdge(Object edge, 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(Object edge, Object tail, Object head)
addEdge in interface GraphControllerpublic void addGraphViewListener(GraphViewListener l)
addGraphViewListener in interface GraphControllerpublic void addNode(Object node)
addNode in interface GraphControllerpublic void addNode(Object node, double x, double y)
addNode in interface GraphControllerpublic void addNode(Object node, Object parent)
addNode in interface GraphControllerpublic void addNode(Object node, Object parent, double x, double y)
addNode in interface GraphControllerpublic void clear()
clear in interface GraphControllerpublic void clearEdge(Object edge)
clearEdge in interface GraphControllerpublic void clearNode(Object node)
clearNode in interface GraphControllerpublic Figure drawEdge(Object edge)
drawEdge in interface GraphControllerpublic Figure drawNode(Object node)
drawNode in interface GraphControllerpublic Figure drawNode(Object node, Object parent)
drawNode in interface GraphControllerpublic abstract EdgeController getEdgeController(Object edge)
getEdgeController in interface GraphControllerpublic abstract NodeController getNodeController(Object node)
getNodeController in interface GraphControllerpublic GraphModel getGraphModel()
getGraphModel in interface GraphControllerpublic GraphPane getGraphPane()
getGraphPane in interface GraphControllerpublic Figure getFigure(Object semanticObj)
getFigure in interface GraphControllerpublic SelectionModel getSelectionModel()
getSelectionModel in interface GraphControllerpublic void removeEdge(Object edge)
removeEdge in interface GraphControllerpublic void removeGraphViewListener(GraphViewListener l)
removeGraphViewListener in interface GraphControllerpublic void removeNode(Object node)
removeNode in interface GraphControllerpublic void rerender()
rerender in interface GraphControllerpublic void rerenderEdge(Object edge)
rerenderEdge in interface GraphControllerpublic void rerenderNode(Object node)
rerenderNode in interface GraphControllerpublic void setGraphModel(GraphModel model)
setGraphModel in interface GraphControllerpublic void setFigure(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()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.