|
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>
org.netbeans.api.visual.graph.layout.GridGraphLayout<N,E>
public final class GridGraphLayout<N,E>
This class represents a graph-oriented layout which organizes nodes into a grid.
You can call setChecker method to enable checker style. If the parameter is true, that the layout uses only half of nodes on a grid like a single color on a chess board.
You can define horizontal and vertical gaps between nodes using the setGaps method.
| Constructor Summary | |
|---|---|
GridGraphLayout()
Creates a grid graph layout. |
|
| Method Summary | |
|---|---|
protected void |
performGraphLayout(UniversalGraph<N,E> graph)
Performs the grid graph layout on an universal graph. |
protected void |
performNodesLayout(UniversalGraph<N,E> graph,
Collection<N> nodes)
Should perform nodes layout. |
GridGraphLayout<N,E> |
setChecker(boolean checker)
Sets a checker style. |
GridGraphLayout<N,E> |
setGaps(int horizontalGap,
int verticalGap)
Sets horizontal and vertical gap between nodes. |
| Methods inherited from class org.netbeans.api.visual.graph.layout.GraphLayout |
|---|
addGraphLayoutListener, isAnimated, layoutGraph, layoutGraph, layoutNodes, layoutNodes, removeGraphLayoutListener, setAnimated, setResolvedNodeLocation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GridGraphLayout()
| Method Detail |
|---|
public GridGraphLayout<N,E> setChecker(boolean checker)
checker - if true, then checker style is enabled and nodes are organized like a single color on a chess board.
public GridGraphLayout<N,E> setGaps(int horizontalGap, int verticalGap)
horizontalGap - the horizontal gapverticalGap - the vertical gap
protected void performGraphLayout(UniversalGraph<N,E> graph)
performGraphLayout in class GraphLayout<N,E>graph - the universal graphprotected void performNodesLayout(UniversalGraph<N,E> graph, Collection<N> nodes)
performNodesLayout in class GraphLayout<N,E>graph - the universal graphnodes - the collection of nodes to resolve
|
org.netbeans.api.visual 2.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||