treebolic.core
Class AbstractLayerOut

java.lang.Object
  extended by treebolic.core.AbstractLayerOut
Direct Known Subclasses:
LayerOut

public abstract class AbstractLayerOut
extends java.lang.Object

Layout agent

Author:
Bernard Bou

Field Summary
protected  boolean clockwise
          Whether node space is allocated clockwise
protected static double theDefaultExpansion
          Default expansion
protected static Complex theDefaultOrientation
          Default orientation
private static double theDefaultOrientedChildSweep
          Default oriented (non-radial) child sweep
private static double theDefaultOrientedRootSweep
          Default oriented (non-radial) root sweep
private static double theDefaultRadialChildSweep
          Default radial child sweep
protected static double theDefaultRadialRootSweep
          Default root radial sweep
protected  double theNodeDistance
          Node distance
protected  double theNodeSweep
          Node sweep
protected  double theRadius
          Radius
protected  Complex theRootOrientation
          Root orientation
protected  double theRootSweep
          Root sweep
protected  double theSweepFactor
          Sweep factor
 
Constructor Summary
AbstractLayerOut()
          Contructor
 
Method Summary
 void apply(Settings theseSettings)
          Apply settings
 double getChildSweep()
          Get sweep angle allocated to children
 double getExpansion()
          Get expansion factor
 Complex getOrientation()
          Get layout orientation
 double getRootSweep()
          Set root sweep angle allocated to layout
abstract  void layout(INode thisNode)
          Do layout
abstract  void layout(INode thisNode, Complex thisCenter, double thisHalfWedge, double thisOrientation)
          Do layout
 void setChildSweep(double thisSweep)
          Set sweep angle allocated to children
 void setDefaultChildSweep(boolean radial)
          Set child sweep to default
private  void setDefaultExpansion()
          Set expansion to default
private  boolean setDefaultOrientation()
          Set orientation to default
 void setDefaultRootSweep(boolean radial)
          Set root sweep to default
 void setExpansion(double thisExpansion)
          Set expansion factor
 void setOrientation(Complex thisOrientation)
          Set layout orientation
 void setRootSweep(double thisSweep)
          Get root sweep angle allocated to layout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theDefaultOrientation

protected static final Complex theDefaultOrientation
Default orientation


theDefaultExpansion

protected static final double theDefaultExpansion
Default expansion

See Also:
Constant Field Values

theDefaultRadialRootSweep

protected static final double theDefaultRadialRootSweep
Default root radial sweep

See Also:
Constant Field Values

theDefaultOrientedRootSweep

private static final double theDefaultOrientedRootSweep
Default oriented (non-radial) root sweep

See Also:
Constant Field Values

theDefaultRadialChildSweep

private static final double theDefaultRadialChildSweep
Default radial child sweep

See Also:
Constant Field Values

theDefaultOrientedChildSweep

private static final double theDefaultOrientedChildSweep
Default oriented (non-radial) child sweep

See Also:
Constant Field Values

theRootOrientation

protected Complex theRootOrientation
Root orientation


theRootSweep

protected double theRootSweep
Root sweep


theNodeDistance

protected double theNodeDistance
Node distance


theSweepFactor

protected double theSweepFactor
Sweep factor


theRadius

protected double theRadius
Radius


theNodeSweep

protected double theNodeSweep
Node sweep


clockwise

protected boolean clockwise
Whether node space is allocated clockwise

Constructor Detail

AbstractLayerOut

public AbstractLayerOut()
Contructor

Method Detail

layout

public abstract void layout(INode thisNode)
Do layout


layout

public abstract void layout(INode thisNode,
                            Complex thisCenter,
                            double thisHalfWedge,
                            double thisOrientation)
Do layout

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

getOrientation

public Complex getOrientation()
Get layout orientation

Returns:
orientation

setOrientation

public void setOrientation(Complex thisOrientation)
Set layout orientation

Parameters:
thisOrientation -

getExpansion

public double getExpansion()
Get expansion factor

Returns:
expansion factor

setExpansion

public void setExpansion(double thisExpansion)
Set expansion factor

Parameters:
thisExpansion - expansion factor

getRootSweep

public double getRootSweep()
Set root sweep angle allocated to layout

Returns:
sweep angle allocated to layout

setRootSweep

public void setRootSweep(double thisSweep)
Get root sweep angle allocated to layout

Parameters:
thisSweep - sweep angle allocated to layout

getChildSweep

public double getChildSweep()
Get sweep angle allocated to children

Returns:
sweep angle allocated to children

setChildSweep

public void setChildSweep(double thisSweep)
Set sweep angle allocated to children

Parameters:
thisSweep - sweep angle allocated to children

setDefaultRootSweep

public void setDefaultRootSweep(boolean radial)
Set root sweep to default

Parameters:
radial - true if layout is radial

setDefaultChildSweep

public void setDefaultChildSweep(boolean radial)
Set child sweep to default

Parameters:
radial - true if layout is radial

setDefaultOrientation

private boolean setDefaultOrientation()
Set orientation to default

Returns:
true if default orientation is radial

setDefaultExpansion

private void setDefaultExpansion()
Set expansion to default


apply

public void apply(Settings theseSettings)
Apply settings

Parameters:
theseSettings - settings