Treeviz 0.37 2010-10-17

ch.randelshofer.tree.sunray
Class SunrayNode

java.lang.Object
  extended by ch.randelshofer.tree.sunray.SunrayNode
Direct Known Subclasses:
SunrayCompositeNode

public class SunrayNode
extends java.lang.Object

The SunburstNode encapsulatets a TreeNode whithin a SunrayTree.

It holds the computed left, right, depth and internalDepth value of a node.

Version:
1.0 September 18, 2007 Created.
Author:
Werner Randelshofer

Field Summary
protected  long left
          Nested Sets Tree: left preorder sequence number.
protected  int maxScatter
           
protected  long right
          Nested Sets Tree: right preorder sequence number.
protected  int totalScatter
           
 
Constructor Summary
SunrayNode(SunrayNode parent, TreeNode data, int depth)
          Creates a new instance.
 
Method Summary
 java.util.List<SunrayNode> children()
           
 void dump()
           
 SunrayNode findNode(int depth, long number, int scatter)
           
 TreePath2<TreeNode> getDataNodePath()
           
 int getDepth()
           
 long getExtent()
           
 long getLeft()
           
 int getMaxDepth()
           
 int getMaxRayDepth()
           
 int getMaxScatter()
           
 long getRight()
           
 SunrayNode getRoot()
           
 int getScatter()
           
 boolean isDescendant(SunrayNode node)
           
 boolean isLeaf()
           
 void renumber()
           
 void renumber(int maxScatter)
           
protected  int renumber(int depth, int number, int scatter, int maxScatter, int maxDepth)
           
 void setScatter(int newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

left

protected long left
Nested Sets Tree: left preorder sequence number.


right

protected long right
Nested Sets Tree: right preorder sequence number.


maxScatter

protected int maxScatter

totalScatter

protected int totalScatter
Constructor Detail

SunrayNode

public SunrayNode(SunrayNode parent,
                  TreeNode data,
                  int depth)
Creates a new instance.

Method Detail

getDataNodePath

public TreePath2<TreeNode> getDataNodePath()

getRoot

public SunrayNode getRoot()

getMaxScatter

public int getMaxScatter()

getMaxDepth

public int getMaxDepth()

getMaxRayDepth

public int getMaxRayDepth()

renumber

public void renumber()

renumber

public void renumber(int maxScatter)

renumber

protected int renumber(int depth,
                       int number,
                       int scatter,
                       int maxScatter,
                       int maxDepth)

children

public java.util.List<SunrayNode> children()

dump

public void dump()

isLeaf

public boolean isLeaf()

getLeft

public long getLeft()

getRight

public long getRight()

getExtent

public long getExtent()

getDepth

public int getDepth()

getScatter

public int getScatter()

setScatter

public void setScatter(int newValue)

isDescendant

public boolean isDescendant(SunrayNode node)

findNode

public SunrayNode findNode(int depth,
                           long number,
                           int scatter)

Copyright 2007-2008 (c) Werner Randelshofer.
All rights reserved.