KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > adwt > TestList


1 /*
2  * EJTools, the Enterprise Java Tools
3  *
4  * Distributable under LGPL license.
5  * See terms of license at www.gnu.org.
6  */

7 package test.adwt;
8
9 import java.awt.event.WindowAdapter JavaDoc;
10 import java.awt.event.WindowEvent JavaDoc;
11
12 import org.ejtools.adwt.BeanContextList;
13 import org.ejtools.adwt.BeanContextListModel;
14 import org.ejtools.adwt.service.AboutServiceProvider;
15 import org.ejtools.adwt.service.SDIFrameServiceProvider;
16 import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport;
17
18 /**
19  * Description of the Class
20  *
21  * @author Laurent Etiemble
22  * @version $Revision: 1.2 $
23  */

24 public class TestList extends CustomBeanContextServicesSupport
25 {
26    /** Constructor for the TestTree object */
27    public TestList()
28    {
29       SDIFrameServiceProvider frameService = new SDIFrameServiceProvider();
30       AboutServiceProvider aboutProvider = new AboutServiceProvider();
31
32       // Add a window hook
33
frameService.addWindowListener(
34          new WindowAdapter JavaDoc()
35          {
36             public void windowClosing(WindowEvent JavaDoc e)
37             {
38                super.windowClosing(e);
39                System.exit(0);
40             }
41          });
42
43       BeanContextListModel model = new BeanContextListModel(this);
44       BeanContextList tree = new BeanContextList(model);
45       frameService.setContent(tree);
46
47       this.add(frameService);
48       this.add(aboutProvider);
49    }
50
51
52    /**
53     * The main program for the TestTree class
54     *
55     * @param args The command line arguments
56     */

57    public static void main(String JavaDoc[] args)
58    {
59       TestList test = new TestList();
60    }
61 }
62
Popular Tags