UC Berkeley Group for User Interface Research
Updated November 17, 2000

edu.berkeley.guir.lib.graphs
Class PathTreeFormatterDefault

java.lang.Object
  |
  +--edu.berkeley.guir.lib.graphs.PathTreeFormatterDefault
All Implemented Interfaces:
PathTreeFormatter

public class PathTreeFormatterDefault
extends Object
implements PathTreeFormatter

Formats a Path Tree to be displayed via text.

This software is distributed under the Berkeley Software License.

 Revisions:  - GUIRLib-v1.0-1.0.0, Dec 01 1997, JH
               Created class
             - GUIRLib-v1.0-1.1.0, Feb 24 2000, JH
               Updated for JDK1.3RC1 to use the Collections
             - GUIRLib-v1.2-1.0.0, Jun 22 2000, JH
               Touched for GUIRLib release
             - GUIRLib-v1.3-1.0.0, Aug 11 2000, JH
               Touched for GUIRLib release
             - GUIRLib-v1.4-1.0.0, Aug 31 2000, JH
               Touched for GUIRLib release
 

Since:
1.1.4
Version:
GUIRLib-v1.4-1.0.0, Aug 31 2000
Author:
Jason Hong ( jasonh@cs.berkeley.edu)

Constructor Summary
PathTreeFormatterDefault()
           
 
Method Summary
 void onBacktrack(PrintWriter pwriter, int depth)
          This method is called after we have traversed the children and before we start to traverse the siblings of the current node.
 void onEndOfNode(PrintWriter pwriter, int depth)
          This method is called after we have traversed all of the children and siblings of the node.
 void onFinish(PrintWriter pwriter)
          This method is called after all traversing is done.
 void onLeaf(PrintWriter pwriter, Object data, int depth)
          This method is called when we reach a leaf node.
 void onNode(PrintWriter pwriter, Object data, int depth)
          This method is called just before we start traversing the children.
 void onStart(PrintWriter pwriter)
          This method is called before any traversing is done.
 void onStartOfNode(PrintWriter pwriter, int depth)
          This method is called when we first traverse to a new node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathTreeFormatterDefault

public PathTreeFormatterDefault()
Method Detail

onStart

public void onStart(PrintWriter pwriter)
This method is called before any traversing is done.
Specified by:
onStart in interface PathTreeFormatter
Parameters:
pwriter - is the PrintWriter to print out to.

onStartOfNode

public void onStartOfNode(PrintWriter pwriter,
                          int depth)
This method is called when we first traverse to a new node.
Specified by:
onStartOfNode in interface PathTreeFormatter
Parameters:
pwriter - is the PrintWriter to print out to.
depth - is the current depth we are at relative to the root.

onEndOfNode

public void onEndOfNode(PrintWriter pwriter,
                        int depth)
This method is called after we have traversed all of the children and siblings of the node.
Specified by:
onEndOfNode in interface PathTreeFormatter
Parameters:
pwriter - is the PrintWriter to print out to.
depth - is the current depth we are at relative to the root.

onBacktrack

public void onBacktrack(PrintWriter pwriter,
                        int depth)
This method is called after we have traversed the children and before we start to traverse the siblings of the current node.
Specified by:
onBacktrack in interface PathTreeFormatter
Parameters:
pwriter - is the PrintWriter to print out to.
depth - is the current depth we are at relative to the root.

onLeaf

public void onLeaf(PrintWriter pwriter,
                   Object data,
                   int depth)
This method is called when we reach a leaf node.
Specified by:
onLeaf in interface PathTreeFormatter
Parameters:
pwriter - is the PrintWriter to print out to.
depth - is the current depth we are at relative to the root.

onNode

public void onNode(PrintWriter pwriter,
                   Object data,
                   int depth)
This method is called just before we start traversing the children.
Specified by:
onNode in interface PathTreeFormatter
Parameters:
pwriter - is the PrintWriter to print out to.
depth - is the current depth we are at relative to the root.

onFinish

public void onFinish(PrintWriter pwriter)
This method is called after all traversing is done.
Specified by:
onFinish in interface PathTreeFormatter
Parameters:
pwriter - is the PrintWriter to print out to.

Copyright Information