public class BasicEdgeController extends Object implements EdgeController
| Modifier and Type | Class and Description |
|---|---|
protected class |
BasicEdgeController.EdgeDropper
An inner class that handles interactive changes to connectivity.
|
| Constructor and Description |
|---|
BasicEdgeController(GraphController controller)
Create a new edge controller with basic interaction.
|
| 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 |
clearEdge(Object edge)
Remove the figure for the given edge, but do not remove the
edge from the graph model.
|
Figure |
drawEdge(Object edge)
Draw the edge and add it to the layer, establishing
a two-way correspondence between the model and the
view.
|
ConnectorTarget |
getConnectorTarget()
Get the target used to find sites on nodes to connect to.
|
GraphController |
getController()
Get the graph controller that this controller is contained in.
|
Interactor |
getEdgeInteractor()
Get the interactor given to edge figures.
|
EdgeRenderer |
getEdgeRenderer()
Return the edge renderer for this view.
|
void |
removeEdge(Object edge)
Remove the edge.
|
Connector |
render(Object edge,
FigureLayer layer,
Site tailSite,
Site headSite)
Render the edge on the given layer between the two sites.
|
void |
setConnectorTarget(ConnectorTarget t)
Set the target used to find sites on nodes to connect to.
|
void |
setEdgeInteractor(Interactor interactor)
Set the interactor given to edge figures.
|
void |
setEdgeRenderer(EdgeRenderer er)
Set the edge renderer for this view.
|
public BasicEdgeController(GraphController controller)
public void addEdge(Object edge, Object node, int end, double x, double y)
addEdge in interface EdgeControllerGraphException - If the connector target cannot return a
valid site on the node's figure.ConnectorEventpublic void addEdge(Object edge, Object tail, Object head)
addEdge in interface EdgeControllerpublic void clearEdge(Object edge)
clearEdge in interface EdgeControllerpublic Figure drawEdge(Object edge)
drawEdge in interface EdgeControllerpublic ConnectorTarget getConnectorTarget()
getConnectorTarget in interface EdgeControllerpublic GraphController getController()
getController in interface EdgeControllerpublic Interactor getEdgeInteractor()
getEdgeInteractor in interface EdgeControllerpublic EdgeRenderer getEdgeRenderer()
getEdgeRenderer in interface EdgeControllerpublic void removeEdge(Object edge)
removeEdge in interface EdgeControllerpublic void setConnectorTarget(ConnectorTarget t)
setConnectorTarget in interface EdgeControllerpublic void setEdgeInteractor(Interactor interactor)
setEdgeInteractor in interface EdgeControllerpublic void setEdgeRenderer(EdgeRenderer er)
setEdgeRenderer in interface EdgeControllerpublic Connector render(Object edge, FigureLayer layer, Site tailSite, Site headSite)
render in interface EdgeControllerCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.