V
- E
- public interface GraphBackend<V,E extends Edge<V>>
Modifier and Type | Method and Description |
---|---|
boolean |
addEdgeInBackend(E edge)
Add an edge to the graph.
|
boolean |
addNodeInBackend(V node)
Add a node to the graph.
|
boolean |
containsEdge(V from,
V to) |
boolean |
containsNode(V node) |
void |
damage(Object o)
Declare an object visual setting change
|
EdgeViewInfo<V,E> |
ensureEdgeViewInfo(E edge)
Get raw view information for an edge, create it if needed.
|
E |
getEdge(V source,
V target) |
Collection<E> |
getEdges() |
EdgeViewInfo<V,E> |
getEdgeViewInfo(E edge)
Get raw view information for an edge.
|
V |
getExistingNode(V node) |
Collection<E> |
getIncomingEdges(V node) |
V |
getNodeByName(String id)
Give access to the node named with the given name
|
int |
getNodeCount() |
Collection<V> |
getNodes() |
NodeViewInfo |
getNodeViewInfo(V node)
Get the Raw view info for a node.
|
Collection<E> |
getOutgoingEdges(V node) |
List<E> |
getShortestPath(V source,
V target)
Find the shortest path between the two given vertices
|
List<Set<V>> |
getStronglyConnectedComponents()
Return a list of set of node, each set containing a strongly connected component of the graph
|
boolean |
removeEdge(E edge)
remove an edge from the graph.
|
boolean |
removeNode(V node)
remove a node from the graph.
|
void |
repaint()
Trigger a repaint of the damaged areas
|
void |
setDefaultEdgeStyle(EdgeStyle<V,E> style) |
void |
setViewListener(GraphViewListener l) |
boolean addNodeInBackend(V node)
node
- boolean addEdgeInBackend(E edge)
edge
- boolean containsNode(V node)
node
- V getExistingNode(V node)
node
- boolean containsEdge(V from, V to)
from
- to
- boolean removeNode(V node)
node
- boolean removeEdge(E edge)
edge
- Collection<V> getNodes()
V getNodeByName(String id)
id
- name of a nodeint getNodeCount()
E getEdge(V source, V target)
source
- target
- Collection<E> getEdges()
Collection<E> getIncomingEdges(V node)
node
- Collection<E> getOutgoingEdges(V node)
node
- NodeViewInfo getNodeViewInfo(V node)
node
- EdgeViewInfo<V,E> getEdgeViewInfo(E edge)
edge
- EdgeViewInfo<V,E> ensureEdgeViewInfo(E edge)
edge
- List<E> getShortestPath(V source, V target)
source
- the node at the beginning of the searched pathtarget
- the node at the end of the searched pathList<Set<V>> getStronglyConnectedComponents()
void setViewListener(GraphViewListener l)
void damage(Object o)
o
- void repaint()
Copyright © 2005–2020. All rights reserved.