|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.graph.BasicEdgeController
public class BasicEdgeController
A basic implementation of EdgeController, which works with graphs that have edges connecting simple nodes.
Red |
Nested Class Summary | |
---|---|
protected class |
BasicEdgeController.EdgeDropper
An inner class that handles interactive changes to connectivity. |
Field Summary | |
---|---|
private ConnectorTarget |
_connectorTarget
The connector target |
private GraphController |
_controller
|
private Interactor |
_interactor
|
private EdgeRenderer |
_renderer
|
Constructor Summary | |
---|---|
BasicEdgeController(GraphController controller)
Create a new edge controller with basic interaction. |
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 |
clearEdge(java.lang.Object edge)
Remove the figure for the given edge, but do not remove the edge from the graph model. |
Figure |
drawEdge(java.lang.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(java.lang.Object edge)
Remove the edge. |
Connector |
render(java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ConnectorTarget _connectorTarget
private Interactor _interactor
private EdgeRenderer _renderer
private GraphController _controller
Constructor Detail |
---|
public BasicEdgeController(GraphController controller)
Method Detail |
---|
public void addEdge(java.lang.Object edge, java.lang.Object node, int end, double x, double y)
addEdge
in interface EdgeController
GraphException
- If the connector target cannot return a
valid site on the node's figure.ConnectorEvent
public void addEdge(java.lang.Object edge, java.lang.Object tail, java.lang.Object head)
addEdge
in interface EdgeController
public void clearEdge(java.lang.Object edge)
clearEdge
in interface EdgeController
public Figure drawEdge(java.lang.Object edge)
drawEdge
in interface EdgeController
public ConnectorTarget getConnectorTarget()
getConnectorTarget
in interface EdgeController
public GraphController getController()
getController
in interface EdgeController
public Interactor getEdgeInteractor()
getEdgeInteractor
in interface EdgeController
public EdgeRenderer getEdgeRenderer()
getEdgeRenderer
in interface EdgeController
public void removeEdge(java.lang.Object edge)
removeEdge
in interface EdgeController
public void setConnectorTarget(ConnectorTarget t)
setConnectorTarget
in interface EdgeController
public void setEdgeInteractor(Interactor interactor)
setEdgeInteractor
in interface EdgeController
public void setEdgeRenderer(EdgeRenderer er)
setEdgeRenderer
in interface EdgeController
public Connector render(java.lang.Object edge, FigureLayer layer, Site tailSite, Site headSite)
render
in interface EdgeController
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |