1 /*2 * EJTools, the Enterprise Java Tools3 *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 ;10 import java.awt.event.WindowEvent ;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 Class20 *21 * @author Laurent Etiemble22 * @version $Revision: 1.2 $23 */24 public class TestList extends CustomBeanContextServicesSupport25 {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 hook33 frameService.addWindowListener(34 new WindowAdapter ()35 {36 public void windowClosing(WindowEvent 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 class54 *55 * @param args The command line arguments56 */57 public static void main(String [] args)58 {59 TestList test = new TestList();60 }61 }62