org.netbeans.api.visual 2.23.1

org.netbeans.api.visual.graph.layout
Class GraphLayoutFactory

java.lang.Object
  extended by org.netbeans.api.visual.graph.layout.GraphLayoutFactory

public class GraphLayoutFactory
extends Object

The factory class of all built-in GraphLayout based implementations.

Since:
2.4

Constructor Summary
GraphLayoutFactory()
           
 
Method Summary
static
<N,E> GraphLayout<N,E>
createHierarchicalGraphLayout(GraphScene<N,E> graphScene, boolean animate)
           
static
<N,E> GraphLayout<N,E>
createHierarchicalGraphLayout(GraphScene<N,E> graphScene, boolean animate, boolean inverted)
           
static
<N,E> GraphLayout<N,E>
createHierarchicalGraphLayout(GraphScene<N,E> graphScene, boolean animate, boolean inverted, int xOffset, int layerOffset)
           
static
<N,E> GraphLayout<N,E>
createOrthogonalGraphLayout(GraphScene<N,E> graphScene, boolean animate)
           
static
<N,E> GraphLayout<N,E>
createTreeGraphLayout(int originX, int originY, int verticalGap, int horizontalGap, boolean vertical)
          Creates a tree graph layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphLayoutFactory

public GraphLayoutFactory()
Method Detail

createTreeGraphLayout

public static <N,E> GraphLayout<N,E> createTreeGraphLayout(int originX,
                                                           int originY,
                                                           int verticalGap,
                                                           int horizontalGap,
                                                           boolean vertical)
Creates a tree graph layout. Use GraphLayoutSupport.setTreeGraphLayoutRootNode method to set the root node of the graph. If not set/found, then layout is not executed. Note: Use GraphLayoutSupport.setTreeGraphLayoutProperties method to set the parameters of the layout later.

Parameters:
originX - the x-axis origin
originY - the y-axis origin
verticalGap - the vertical gap between cells
horizontalGap - the horizontal gap between cells
vertical - if true, then layout organizes the graph vertically; if false, then horizontally
Returns:
the tree graph layout
Since:
2.4

createOrthogonalGraphLayout

public static <N,E> GraphLayout<N,E> createOrthogonalGraphLayout(GraphScene<N,E> graphScene,
                                                                 boolean animate)
Type Parameters:
N - the node class for the nodes in the graph.
E - the edge class for the edges in the graph.
Parameters:
graphScene - the GraphScene on which the layout is to be invoked.
animate - if true, the layout will animate the nodes into their new positions.
Returns:
a GraphLayout to be invoked from the calling class.

createHierarchicalGraphLayout

public static <N,E> GraphLayout<N,E> createHierarchicalGraphLayout(GraphScene<N,E> graphScene,
                                                                   boolean animate)
Type Parameters:
N - the node class for the nodes in the graph.
E - the edge class for the edges in the graph.
Parameters:
graphScene - the GraphScene on which the layout is to be invoked.
animate - if true, the layout will animate the nodes into their new positions.
Returns:
a GraphLayout to be invoked from the calling class.

createHierarchicalGraphLayout

public static <N,E> GraphLayout<N,E> createHierarchicalGraphLayout(GraphScene<N,E> graphScene,
                                                                   boolean animate,
                                                                   boolean inverted)
Type Parameters:
N - the node class for the nodes in the graph.
E - the edge class for the edges in the graph.
Parameters:
graphScene - the GraphScene on which the layout is to be invoked.
animate - if true, the layout will animate the nodes into their new positions.
inverted - if true, the target nodes of an edge will be poisitioned in a layer higher than its source node.
Returns:
a GraphLayout to be invoked from the calling class.

createHierarchicalGraphLayout

public static <N,E> GraphLayout<N,E> createHierarchicalGraphLayout(GraphScene<N,E> graphScene,
                                                                   boolean animate,
                                                                   boolean inverted,
                                                                   int xOffset,
                                                                   int layerOffset)
Type Parameters:
N - the node class for the nodes in the graph.
E - the edge class for the edges in the graph.
Parameters:
graphScene - the GraphScene on which the layout is to be invoked.
animate - if true, the layout will animate the nodes into their new positions.
inverted - if true, the target nodes of an edge will be poisitioned in a layer higher than its source node.
xOffset - the horizontal distance or gutter between the nodes.
layerOffset - the vertical distance between the layers of nodes.
Returns:
a GraphLayout to be invoked from the calling class.

org.netbeans.api.visual 2.23.1

Built on February 9 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.