Search this API

y.layout.tree
Interface Processor


public interface Processor

A processor is the possibility for each NodePlacer to prepare (and clean up) the graph for its children.
It is created within NodePlacer.createProcessor(GenericTreeLayouter,y.layout.LayoutGraph,y.base.Node) and called by the GenericTreeLayouter at specific positions of the life-cycle.
The processor may change the values within the DataMaps for its children.


Method Summary
 void postProcess()
          This method is called from the GenericTreeLayouter after the layout has finished.
 void preProcess(DataMap nodePlacerDataProvider, DataMap portAssignmentDataProvider, DataMap childComparatorProvider)
          This method is called before the NodePlacers are called recursively.
 

Method Detail

preProcess

void preProcess(DataMap nodePlacerDataProvider,
                DataMap portAssignmentDataProvider,
                DataMap childComparatorProvider)
This method is called before the NodePlacers are called recursively. A NodePlacer may change different settings within this method. This can be used to specify values for its children, manipulate the graph structure or do anything else that needs to be done.
But only changes for the descendants of current root are allowed.

Parameters:
nodePlacerDataProvider -
portAssignmentDataProvider -
childComparatorProvider -

postProcess

void postProcess()
This method is called from the GenericTreeLayouter after the layout has finished. It can be used for cleanup tasks
. E.g. changes on the graph structure that have been made in preProcess(y.base.DataMap, y.base.DataMap, y.base.DataMap) can be undone here.


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