-----------------------------------------
JDots - Java Dynamic Object Tree System
JDots is a small library which enables the Java programmer to construct a tree of Java objects which can communicate with each other. An object can send a method call to it's parent(s) or children. The parameters are controlled using TagLists which can contain any form of data.
JDots is the Java implementation of the original BEAST project for the Amiga system.
-----------------------------------------
Download
Goto http://sourceforge.net/projects/jdots to download the latest release of JDots.
-----------------------------------------
How does it work?
In the downloaded archive there is a test1_JDots.java file. In order to be a JDots object a Java object should implement the JD_Objectable interface. It is also enough to extends from the JD_Object. It is now possible to build the object tree.
The test program creates the following tree of JD_Objectable objects.
        
    test1_JDots t1 = new test1_JDots( "t1" );
    test1_JDots t2 = new test1_JDots( "t2");
    test1_JDots t25 = new test1_JDots( "t2.5");
    test1_JDots t3 = new test1_JDots( "t3");
    test1_JDots t4 = new test1_JDots( "t4");
    test1_JDots t5 = new test1_JDots( "t5");
    test1_JDots t6 = new test1_JDots( "t6");
    t1.JD_addObject(t2);
    t2.JD_addObject(t25);
    t25.JD_addObject(t3);
    t25.JD_addObject(t4);
    t25.JD_addObject(t5);
    t5.JD_addObject(t6);
        

To call the JDots methods a method must have the following signature;
   public int [method name]( JD_Taglist pTags ) [throws JD_Exception] {
   
The return parameter is currently not being used, and a method may or may not throw a JD_Exception. There is always 1 parameter and that is a JD_Taglist object. In this JD_Taglist object the input and output values can be stored using the putData and getData methods.

There are a number of ways to call and propegate/delegate methods through the tree. The simplest is;
   t25.JD_doMethod( "test", null, 0 );
   
It just call the test method of the t25 object.
   t25.JD_doMethod( "test", null, JD_TO_PARENT );
   
does the same but also propegates the method call to the parents.

Run the demo program to see what other options there are and what their effects are.

For more information contact: Jacco van Weert at