treebolic.core
Class LayerOut

java.lang.Object
  extended by treebolic.core.AbstractLayerOut
      extended by treebolic.core.LayerOut

public class LayerOut
extends AbstractLayerOut

Layout agent

Author:
Bernard Bou

Field Summary
private static double ksi
          Constant used in computations, determining compromise between widening and lengthening
 
Fields inherited from class treebolic.core.AbstractLayerOut
clockwise, theDefaultExpansion, theDefaultOrientation, theDefaultRadialRootSweep, theNodeDistance, theNodeSweep, theRadius, theRootOrientation, theRootSweep, theSweepFactor
 
Constructor Summary
LayerOut()
          Contructor
 
Method Summary
private  double computeDistance(int thisChildCount)
          Compute distance
private  double computeOrientation(Complex thisParentCenter, Complex thisCenter, double thisOrientation)
          Compute orientation
private  double computeWedge(double thisNodeDistance, double thisWedge)
          Compute wedge
 void layout(INode thisNode)
          Do layout
 void layout(INode thisNode, Complex thisCenter, double thisHalfWedge, double thisOrientation)
          Do layout
private  void layoutChildren(INode thisNode, double thisHalfWedge, double thisOrientation)
          Lay out children
 
Methods inherited from class treebolic.core.AbstractLayerOut
apply, getChildSweep, getExpansion, getOrientation, getRootSweep, setChildSweep, setDefaultChildSweep, setDefaultRootSweep, setExpansion, setOrientation, setRootSweep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ksi

private static final double ksi
Constant used in computations, determining compromise between widening and lengthening

See Also:
Constant Field Values
Constructor Detail

LayerOut

public LayerOut()
Contructor

Method Detail

layout

public void layout(INode thisNode)
Description copied from class: AbstractLayerOut
Do layout

Specified by:
layout in class AbstractLayerOut

layout

public void layout(INode thisNode,
                   Complex thisCenter,
                   double thisHalfWedge,
                   double thisOrientation)
Description copied from class: AbstractLayerOut
Do layout

Specified by:
layout in class AbstractLayerOut
Parameters:
thisNode - start node
thisCenter - starting point (hyperbolic circle center)
thisHalfWedge - half wedge allocated to layout
thisOrientation - orientation

layoutChildren

private void layoutChildren(INode thisNode,
                            double thisHalfWedge,
                            double thisOrientation)
Lay out children

Parameters:
thisNode - starting node
thisHalfWedge - half wedge allocated to this node
thisOrientation - orientation of this node

computeDistance

private double computeDistance(int thisChildCount)
Compute distance

Parameters:
thisChildCount -
Returns:
distance

computeOrientation

private double computeOrientation(Complex thisParentCenter,
                                  Complex thisCenter,
                                  double thisOrientation)
Compute orientation

Parameters:
thisParentCenter - parent node hypercircle center
thisCenter - this node's hypercircle
thisOrientation - orientation
Returns:
orientation

computeWedge

private double computeWedge(double thisNodeDistance,
                            double thisWedge)
Compute wedge

Parameters:
thisNodeDistance - node distance
thisWedge - wedge
Returns:
wedge