JTreeVue Sample

This sample is located in \Samples\afc102\JTreeVue.

Description
Using the Sample
Key Project Files
Technologies Demonstrated

Description

The JTreeVue applet parses a tree.htm file generated in the Javadoc format and displays it as a hierarchical tree of classes. Nodes for classes that implement interfaces have an Implements menu button that displays a list of those interfaces. Nodes for interfaces that extend other interfaces have an Extends menu button that displays a list of those interfaces.

The currently selected class or interface appears in a status bar below the scrollable viewer that contains the class hierarchy tree.

Using the Sample

To use the sample

You can view the items in the tree by performing any of the following actions:

Key Project Files

JTreeVue.java

This class extends AwtUIApplet. It contains the main applet code, which constructs the basic user interface and the overall class hierarchy graphics.

JTreeNode.java

This class extends UIPanel and implements JTreeConsts. It parses and tokenizes the HTML file that contains the class hierarchy.

JTreeVuePanel.java

This class extends UIPanel and implements JTreeConsts and JTCallbacks. It handles mouse events so that the focus shifts to the selected item.

JTreeNodeInfo.java

This class implements JTreeConsts. It distinguishes between a class and an interface and constructs the user interface accordingly.

JTreeNodeItem.java

This class extends UIItem and implements JTreeConsts. It constructs the package nodes of the user interface.

Technologies Demonstrated

AFC

© 1999 Microsoft Corporation. All rights reserved. Terms of use.