public class BasicNodeController extends Object implements NodeController
| Constructor and Description |
|---|
BasicNodeController(GraphController controller)
Create a new basic controller with default node and edge interactors.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_drawChildren(Object node)
Draw the children of the given node.
|
protected Figure |
_renderNode(Object node)
Render the given node using the node renderer.
|
void |
addNode(Object node)
Given a node, add it to this graph editor and perform a layout
on the new node.
|
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
and place it where 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 |
clearNode(Object node)
Remove the figure for the given node.
|
Figure |
drawNode(Object node)
Render the given node and add the resulting figure to the foreground
layer of the graph pane.
|
Figure |
drawNode(Object node,
Object parent)
Render the given node and add the resulting figure to the given
node's figure, which is assumed to be a CompositeFigure
in the controller's graph pane.
|
GraphController |
getController()
Return the graph controller containing this controller.
|
Interactor |
getNodeInteractor()
Return the node interactor associated with this controller.
|
NodeRenderer |
getNodeRenderer()
Return the node renderer associated with this controller.
|
void |
removeNode(Object node)
Remove the node.
|
void |
setNodeInteractor(Interactor interactor)
Set the node interactor for this controller
|
void |
setNodeRenderer(NodeRenderer renderer)
Set the node renderer for this controller
|
public BasicNodeController(GraphController controller)
public void addNode(Object node)
addNode in interface NodeControllerpublic void addNode(Object node, double x, double y)
addNode in interface NodeControllerpublic void addNode(Object node, Object parent)
addNode in interface NodeControllerpublic void addNode(Object node, Object parent, double x, double y)
addNode in interface NodeControllerpublic void clearNode(Object node)
clearNode in interface NodeControllerpublic Figure drawNode(Object node)
drawNode in interface NodeControllerpublic Figure drawNode(Object node, Object parent)
drawNode in interface NodeControllerpublic GraphController getController()
getController in interface NodeControllerpublic Interactor getNodeInteractor()
getNodeInteractor in interface NodeControllerpublic NodeRenderer getNodeRenderer()
getNodeRenderer in interface NodeControllerpublic void removeNode(Object node)
removeNode in interface NodeControllerpublic void setNodeInteractor(Interactor interactor)
setNodeInteractor in interface NodeControllerpublic void setNodeRenderer(NodeRenderer renderer)
setNodeRenderer in interface NodeControllerprotected Figure _renderNode(Object node)
protected void _drawChildren(Object node)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.