[Ejtools-cvs] libraries/adwt/src/test/test/adwt TestList.java,NONE,1.1 TestTree.java,NONE,1.1 TestTr
Brought to you by:
letiemble
|
From: <let...@us...> - 2003-09-15 22:37:22
|
Update of /cvsroot/ejtools/libraries/adwt/src/test/test/adwt In directory sc8-pr-cvs1:/tmp/cvs-serv24196/adwt/src/test/test/adwt Added Files: TestList.java TestTree.java TestTreePanel.java Log Message: Adjust Eclipse build files Adjust some Javadoc Review the models for TreeView and ListView : much more lightweight Convert resources files to UTF-8 to avoid loosing accents --- NEW FILE: TestList.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package test.adwt; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import org.ejtools.adwt.BeanContextList; import org.ejtools.adwt.BeanContextListModel; import org.ejtools.adwt.service.AboutServiceProvider; import org.ejtools.adwt.service.SDIFrameServiceProvider; import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; /** * Description of the Class * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public class TestList extends CustomBeanContextServicesSupport { /** Constructor for the TestTree object */ public TestList() { SDIFrameServiceProvider frameService = new SDIFrameServiceProvider(); AboutServiceProvider aboutProvider = new AboutServiceProvider(); // Add a window hook frameService.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { super.windowClosing(e); System.exit(0); } }); BeanContextListModel model = new BeanContextListModel(this); BeanContextList tree = new BeanContextList(model); frameService.setContent(tree); this.add(frameService); this.add(aboutProvider); } /** * The main program for the TestTree class * * @param args The command line arguments */ public static void main(String[] args) { TestList test = new TestList(); } } --- NEW FILE: TestTree.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package test.adwt; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.net.URL; import org.ejtools.adwt.BeanContextTree; import org.ejtools.adwt.BeanContextTreeModel; import org.ejtools.adwt.service.AboutServiceProvider; import org.ejtools.adwt.service.HistoryService; import org.ejtools.adwt.service.HistoryServiceProvider; import org.ejtools.adwt.service.SDIFrameServiceProvider; import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; /** * Description of the Class * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public class TestTree extends CustomBeanContextServicesSupport { /** Constructor for the TestTree object */ public TestTree() { SDIFrameServiceProvider frameService = new SDIFrameServiceProvider(); HistoryServiceProvider historyProvider = new HistoryServiceProvider( new HistoryService.Holder() { public void loadResource(URL url, Object context) { } }, 4); AboutServiceProvider aboutProvider = new AboutServiceProvider(); // Add a window hook frameService.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { super.windowClosing(e); System.exit(0); } }); BeanContextTreeModel model = new BeanContextTreeModel(this); BeanContextTree tree = new BeanContextTree(model); frameService.setContent(tree); this.add(frameService); this.add(aboutProvider); this.add(historyProvider); } /** * The main program for the TestTree class * * @param args The command line arguments * @exception Exception Description of the Exception */ public static void main(String[] args) throws Exception { final TestTree test = new TestTree(); Thread t = new Thread() { public void run() { try { for (int i = 0; i < 10; i++) { Thread.sleep(1000); test.add(new AboutServiceProvider()); } } catch (Exception e) { } } }; t.start(); } } --- NEW FILE: TestTreePanel.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package test.adwt; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.net.URL; import org.ejtools.adwt.BeanContextTreePanel; import org.ejtools.adwt.service.AboutServiceProvider; import org.ejtools.adwt.service.HistoryService; import org.ejtools.adwt.service.HistoryServiceProvider; import org.ejtools.adwt.service.SDIFrameServiceProvider; import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; /** * Description of the Class * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public class TestTreePanel extends CustomBeanContextServicesSupport { /** Constructor for the TestTree object */ public TestTreePanel() { SDIFrameServiceProvider frameService = new SDIFrameServiceProvider(); HistoryServiceProvider historyProvider = new HistoryServiceProvider( new HistoryService.Holder() { public void loadResource(URL url, Object context) { } }, 4); AboutServiceProvider aboutProvider = new AboutServiceProvider(); // Add a window hook frameService.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { super.windowClosing(e); System.exit(0); } }); BeanContextTreePanel panel = new BeanContextTreePanel(this); frameService.setContent(panel); this.add(frameService); this.add(aboutProvider); this.add(historyProvider); } /** * The main program for the TestTree class * * @param args The command line arguments * @exception Exception Description of the Exception */ public static void main(String[] args) throws Exception { final TestTreePanel test = new TestTreePanel(); Thread t = new Thread() { public void run() { try { for (int i = 0; i < 10; i++) { Thread.sleep(1000); test.add(new AboutServiceProvider()); } } catch (Exception e) { } } }; t.start(); } } |