This page presents two tutorials. The general frame for both tutorials is :
Your company has just bought the following two Java components from different tier suppliers :
- A tree viewer : A generic tree viewer developed by a company name Nice. It expands any root object which implements the javax.swing.tree.TreeNode interface. It also allows the modification of the objects implementing the javax.swing.tree.MutableTreeNode.
- A Java source analyzer : It breaks a Java source into individual statements, and then generates a tree structure where the root is the source file itself, each statement is a leaf and the middle nodes are the brackets which group the statements. It was developed by a company named Cannes.
Your job is to integrate both components. The idea is to use the tree viewer to visualize the tree generated by the Java source analyzer. That sounds great !. The only problem is that the objects generated by the Java source analyzer do not support the TreeNode interface and you can not help it because you do not have access to the source files of these two components.
That is the starting point for the tutorials :
The Dynamic Implementation tutorial explains how you can use DJBinder to implement the TreeNode interface for the objects generated by the Java source analyzer.
The Dynamic Access tutorial explains how you can use DJBinder to implement the MutableTreeNode interface for the leaf objects. The extra difficulty is that to implement this interface you have to access a protected method.
A coming tutorial will explain how to integrate these components within an Applet.