|
org.netbeans.api.visual 2.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.api.visual.graph.layout.GraphLayout<N,E>
public abstract class GraphLayout<N,E>
This class represents a graph-orinted layout. The layout is invoked using layoutGraph methods. The layoutNodes method could be called for resolving locations of a sub-set of all nodes.
Internally the invoked method creates an UniversalGraph from the scene in the arguments. Then it calls the particular (performGraphLayout or performNodesLayout) methods with the UniversalGraph as a parameter. These protected methods are implemented by the GraphLayout based class and performs particular layout using an UniversalGraph.
| Constructor Summary | |
|---|---|
GraphLayout()
|
|
| Method Summary | |
|---|---|
void |
addGraphLayoutListener(GraphLayoutListener<N,E> listener)
Adds a graph layout listener. |
boolean |
isAnimated()
Returns whether the layout uses animations. |
void |
layoutGraph(GraphPinScene<N,E,?> graphPinScene)
Invokes graph-oriented layout on a GraphPinScene. |
void |
layoutGraph(GraphScene<N,E> graphScene)
Invokes graph-oriented layout on a GraphScene. |
void |
layoutNodes(GraphPinScene<N,E,?> graphPinScene,
Collection<N> nodes)
Invokes resolving of locations for a collection of nodes in a GraphPinScene. |
void |
layoutNodes(GraphScene<N,E> graphScene,
Collection<N> nodes)
Invokes resolving of locations for a collection of nodes in a GraphScene. |
protected abstract void |
performGraphLayout(UniversalGraph<N,E> graph)
Implements and performs particular graph-oriented algorithm of a UniversalGraph. |
protected abstract void |
performNodesLayout(UniversalGraph<N,E> graph,
Collection<N> nodes)
Implements and performs particular location resolution of a collection of nodes in a UniversalGraph. |
void |
removeGraphLayoutListener(GraphLayoutListener<N,E> listener)
Removes a graph layout listener. |
void |
setAnimated(boolean animated)
Sets whether the layout is animated. |
protected void |
setResolvedNodeLocation(UniversalGraph<N,E> graph,
N node,
Point newPreferredLocation)
Should be called to set a new resolved preferred location of a node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphLayout()
| Method Detail |
|---|
public final boolean isAnimated()
public final void setAnimated(boolean animated)
animated - if true, then the layout is animatedpublic final void addGraphLayoutListener(GraphLayoutListener<N,E> listener)
listener - the graph layout listenerpublic final void removeGraphLayoutListener(GraphLayoutListener<N,E> listener)
listener - the graph layout listenerpublic final void layoutGraph(GraphScene<N,E> graphScene)
graphScene - the graph scenepublic final void layoutGraph(GraphPinScene<N,E,?> graphPinScene)
graphPinScene - the graph pin scenepublic final void layoutNodes(GraphScene<N,E> graphScene, Collection<N> nodes)
graphScene - the graph scenenodes - the collection of nodes to resolvepublic final void layoutNodes(GraphPinScene<N,E,?> graphPinScene, Collection<N> nodes)
graphPinScene - the graph pin scenenodes - the collection of nodes to resolveprotected final void setResolvedNodeLocation(UniversalGraph<N,E> graph, N node, Point newPreferredLocation)
graph - the universal graphnode - the node with resolved locationnewPreferredLocation - the new resolved locationprotected abstract void performGraphLayout(UniversalGraph<N,E> graph)
GraphLayout.setResolvedNodeLocation method for setting the resolved node location.
graph - the universal graph on which the layout should be performedprotected abstract void performNodesLayout(UniversalGraph<N,E> graph, Collection<N> nodes)
GraphLayout.setResolvedNodeLocation method for setting the resolved node location.
graph - the universal graph on which the nodes should be resolvednodes - the collection of nodes to be resolved
|
org.netbeans.api.visual 2.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||