Index: graph/lib/apichanges.xml =================================================================== RCS file: /cvs/graph/lib/apichanges.xml,v retrieving revision 1.33 diff -u -r1.33 apichanges.xml --- graph/lib/apichanges.xml 1 Aug 2007 08:13:34 -0000 1.33 +++ graph/lib/apichanges.xml 1 Aug 2007 14:56:59 -0000 @@ -444,6 +444,20 @@ + + + + GraphLayouSupport.setTreeGraphLayoutProperties method introduced + + + + + + The GraphLayouSupport.setTreeGraphLayoutProperties method allows change properties of tree graph layout i.e. originX, originY, verticalGap, horizontalGap, vertical. + + + + Index: graph/lib/manifest.mf =================================================================== RCS file: /cvs/graph/lib/manifest.mf,v retrieving revision 1.14 diff -u -r1.14 manifest.mf --- graph/lib/manifest.mf 1 Aug 2007 07:31:49 -0000 1.14 +++ graph/lib/manifest.mf 1 Aug 2007 14:56:59 -0000 @@ -1,4 +1,4 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.api.visual OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visual/resources/Bundle.properties -OpenIDE-Module-Specification-Version: 2.6 +OpenIDE-Module-Specification-Version: 2.8 Index: graph/lib/src/org/netbeans/api/visual/graph/layout/GraphLayoutFactory.java =================================================================== RCS file: /cvs/graph/lib/src/org/netbeans/api/visual/graph/layout/GraphLayoutFactory.java,v retrieving revision 1.1 diff -u -r1.1 GraphLayoutFactory.java --- graph/lib/src/org/netbeans/api/visual/graph/layout/GraphLayoutFactory.java 8 Jun 2007 08:09:05 -0000 1.1 +++ graph/lib/src/org/netbeans/api/visual/graph/layout/GraphLayoutFactory.java 1 Aug 2007 14:56:59 -0000 @@ -32,6 +32,7 @@ * 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. * @param originX the x-axis origin * @param originY the y-axis origin * @param verticalGap the vertical gap between cells Index: graph/lib/src/org/netbeans/api/visual/widget/doc-files/documentation.html =================================================================== RCS file: /cvs/graph/lib/src/org/netbeans/api/visual/widget/doc-files/documentation.html,v retrieving revision 1.23 diff -u -r1.23 documentation.html --- graph/lib/src/org/netbeans/api/visual/widget/doc-files/documentation.html 1 Aug 2007 14:55:18 -0000 1.23 +++ graph/lib/src/org/netbeans/api/visual/widget/doc-files/documentation.html 1 Aug 2007 14:56:59 -0000 @@ -1762,6 +1762,9 @@ The layout can be created using GraphLayoutFactory.createTreeGraphLayout factory method. For proper work, you have to specify a root node using GraphLayoutSupport.setTreeGraphLayoutRootNode method. See test.graphlayout.TreeGraphLayoutTest example for usages. +

+Using GraphLayoutSupport.setTreeGraphLayoutProperties method you can set all parameters of the tree graph layout that has been specified in the factory method. +

GridGraphLayout

Index: graph/lib/src/org/netbeans/modules/visual/graph/layout/TreeGraphLayout.java =================================================================== RCS file: /cvs/graph/lib/src/org/netbeans/modules/visual/graph/layout/TreeGraphLayout.java,v retrieving revision 1.2 diff -u -r1.2 TreeGraphLayout.java --- graph/lib/src/org/netbeans/modules/visual/graph/layout/TreeGraphLayout.java 26 Jul 2007 12:54:37 -0000 1.2 +++ graph/lib/src/org/netbeans/modules/visual/graph/layout/TreeGraphLayout.java 1 Aug 2007 14:56:59 -0000 @@ -50,6 +50,14 @@ this.rootNode = rootNode; } + public void setProperties (int originX, int originY, int verticalGap, int horizontalGap, boolean vertical) { + this.originX = originX; + this.originY = originY; + this.verticalGap = verticalGap; + this.horizontalGap = horizontalGap; + this.vertical = vertical; + } + protected void performGraphLayout (UniversalGraph graph) { if (rootNode == null) return;