y.view.hierarchy
Class GroupLayoutConfigurator

java.lang.Object
  extended by y.view.hierarchy.GroupLayoutConfigurator

public class GroupLayoutConfigurator
extends Object

This convenience class helps to prepare a hierarchically grouped Graph2D for an automatic assignment of layout information. Basically, it translates the hierarchy information maintained by an HierarchyManager to data provider-based hierarchy information that is understood by automatic layout algorithms (see GroupingKeys).

 

Nested Class Summary
static class GroupLayoutConfigurator.MinNodeSizeDataProvider
          A dataprovider that returns minimal sizes of node realizers that are provided through the node realizer's SizeConstraintProvider, see NodeRealizer.getSizeConstraintProvider()
 
Constructor Summary
GroupLayoutConfigurator(Graph2D graph)
          Creates a new instance of GroupLayoutConfigurator for a given graph
 
Method Summary
 void prepareAll()
          Convenience method performs all necessary layout preparations on the input graph.
 void prepareAutoBoundsFeatures()
          Disables the auto bounds feature in all NodeRealizers that implement AutoBoundsFeature.
 void prepareGroupDataProviders()
          Binds all data providers to the input graph, that define the hierarchically grouped structure of the graph.
 void prepareGroupNodeInsets()
          Makes the auto bounds insets of group nodes that implement AutoBoundsFeature available for layout algorithms.
 void prepareMinGroupNodeSizes()
          Makes the minimum node bounds available for layout algorithms.
 void restoreAll()
          Cleanup method that undoes the steps performed by prepareAll().
 void restoreAutoBoundsFeatures()
          Cleanup method that undoes the steps performed by prepareAutoBoundsFeatures().
 void restoreGroupDataProviders()
          Cleanup method that undoes the steps performed by prepareGroupDataProviders().
 void restoreGroupNodeInsets()
          Cleanup method that undoes the steps performed by prepareGroupNodeInsets().
 void restoreMinGroupNodeSizes()
          Cleanup method that undoes the steps performed by prepareMinGroupNodeSizes().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupLayoutConfigurator

public GroupLayoutConfigurator(Graph2D graph)
Creates a new instance of GroupLayoutConfigurator for a given graph

Method Detail

prepareGroupDataProviders

public void prepareGroupDataProviders()
Binds all data providers to the input graph, that define the hierarchically grouped structure of the graph.


prepareGroupNodeInsets

public void prepareGroupNodeInsets()
Makes the auto bounds insets of group nodes that implement AutoBoundsFeature available for layout algorithms.


prepareMinGroupNodeSizes

public void prepareMinGroupNodeSizes()
Makes the minimum node bounds available for layout algorithms.


restoreGroupDataProviders

public void restoreGroupDataProviders()
Cleanup method that undoes the steps performed by prepareGroupDataProviders().


prepareAutoBoundsFeatures

public void prepareAutoBoundsFeatures()
Disables the auto bounds feature in all NodeRealizers that implement AutoBoundsFeature. This way an automatic layout algorithm will be able to resize such nodes during the layout process.


restoreGroupNodeInsets

public void restoreGroupNodeInsets()
Cleanup method that undoes the steps performed by prepareGroupNodeInsets().


restoreMinGroupNodeSizes

public void restoreMinGroupNodeSizes()
Cleanup method that undoes the steps performed by prepareMinGroupNodeSizes().


restoreAutoBoundsFeatures

public void restoreAutoBoundsFeatures()
Cleanup method that undoes the steps performed by prepareAutoBoundsFeatures().


prepareAll

public void prepareAll()
Convenience method performs all necessary layout preparations on the input graph.


restoreAll

public void restoreAll()
Cleanup method that undoes the steps performed by prepareAll().


© Copyright 2000-2008,
yWorks GmbH.
All rights reserved.