GraphLibraryGraphLayoutAPIReview

Graph Library Graph Layout API Review

Submitter: Kris.Richards@Sun.COM

Type: Fast Track

Short Description

Adding static methods createOrthogonalLayout(GraphScene scene) and createHierarchicalLayout(GraphScene scene) to the GraphLayoutFactory class. These calls will each return a GraphLayout on which the user calls layoutGraph() to perform the actual layout.

Target Milestone

NetBeans 6.2

Dependencies

None

Change in Current Architecture

The only API change is to add the static methods createOrthogonalLayout(GraphScene scene) and createHierarchicalLayout(GraphScene scene) to the GraphLayoutFactory class. The implementations are not in the API.

Use Cases

User has created a GraphScene with multiple nodes and edges and desires to lay them out in a tree or orthogonal manner. The following code would layout the graph:

   GraphLayout graphLayout =  GraphLayoutFactory.createOrthogonalLayout (graphScene) ;
   graphLayout.layoutGraph() ;

apichanges.xml

        <change>
            <api name="general"/>
            <summary>GraphLayoutFactory.createOrthogonalGraphLayout added</summary>
            <version major="2" minor="12"/>
            <date day="12" month="3" year="2008"/>
            <author login="krichard"/>
            <compatibility addition="yes"/>
            <description>
                OrthogonalGraphLayout added.
            </description>
            <class package="org.netbeans.api.visual.graph.layout" name="GraphLayoutFactory" link="yes"/>
            <issue number="129948"/>
        </change>
        <change>
            <api name="general"/>
            <summary>GraphLayoutFactory.createHierarchicalGraphLayout added</summary>
            <version major="2" minor="12"/>
            <date day="12" month="3" year="2008"/>
            <author login="krichard"/>
            <compatibility addition="yes"/>
            <description>
                HierarchicalGraphLayout added.
            </description>
            <class package="org.netbeans.api.visual.graph.layout" name="GraphLayoutFactory" link="yes"/>
            <issue number="129948"/>
        </change>

Impacted Interfaces

None

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo