[Ejtools-cvs] CVS: applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser JNDIBrowse
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-04-22 18:02:58
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser In directory usw-pr-cvs1:/tmp/cvs-serv29379/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser Added Files: JNDIBrowser.java Log Message: Initial Import --- NEW FILE: JNDIBrowser.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.jndibrowser; // Standard Imports import java.beans.beancontext.BeanContextServicesSupport; import java.util.ResourceBundle; import java.util.Vector; import javax.swing.ImageIcon; // Other Imports import com.dreambean.awt.BeanContextPanel; import net.sourceforge.ejtools.awt.action.Command; import net.sourceforge.ejtools.awt.action.CommandAction; import net.sourceforge.ejtools.awt.action.file.ExitAction; import net.sourceforge.ejtools.awt.action.file.NewAction; import net.sourceforge.ejtools.awt.action.file.OpenAction; import net.sourceforge.ejtools.awt.action.file.SaveAction; import net.sourceforge.ejtools.awt.action.file.SaveAsAction; import net.sourceforge.ejtools.awt.services.AboutServiceProvider; import net.sourceforge.ejtools.awt.services.FrameServiceProvider; import net.sourceforge.ejtools.awt.services.MenuBarServiceProvider; import net.sourceforge.ejtools.awt.services.StatusBarService; import net.sourceforge.ejtools.awt.services.StatusBarServiceProvider; import net.sourceforge.ejtools.awt.services.ToolBarServiceProvider; import net.sourceforge.ejtools.jndibrowser.model.Server; import net.sourceforge.ejtools.jndibrowser.model.jms.ConnectionService; import net.sourceforge.ejtools.jndibrowser.model.jms.ConnectionServiceProvider; import org.apache.log4j.Category; /** * Description of the Class * * @author letiembl * @created 21 mars 2002 * @todo Javadoc to complete * @todo Add log4j logs * @todo I18N to complete * @todo Clean services used */ public class JNDIBrowser extends BeanContextServicesSupport { /** Description of the Field */ private static Category cat = Category.getInstance(JNDIBrowser.class.getName()); /** Description of the Field */ private final static ResourceBundle res = ResourceBundle.getBundle("ApplicationResources"); /** Description of the Field */ private static Vector factories; /** Description of the Field */ CommandAction action = null; /** Description of the Field */ AboutServiceProvider aboutService; /** Description of the Field */ ConnectionServiceProvider connectionService; /** Description of the Field */ FrameServiceProvider frameService; /** Description of the Field */ MenuBarServiceProvider menuBarService; /** Description of the Field */ StatusBarServiceProvider statusBarService; /** Description of the Field */ ToolBarServiceProvider toolBarService; /** Constructor for the EJX object */ public JNDIBrowser() { SplashWindow splash = new SplashWindow("JNDIBrowser starting...", 14); splash.show(); cat.debug("JNDIBrowser starting..."); frameService = new FrameServiceProvider("SDI"); splash.progress("Creating Frame Service..."); aboutService = new AboutServiceProvider(new AboutDialog()); splash.progress("Creating About Service..."); menuBarService = new MenuBarServiceProvider(); splash.progress("Creating MenuBar Service..."); toolBarService = new ToolBarServiceProvider(); splash.progress("Creating ToolBar Service..."); statusBarService = new StatusBarServiceProvider(); splash.progress("Creating StatusBar Service..."); connectionService = new ConnectionServiceProvider(); splash.progress("Creating Connection Service..."); try { add(menuBarService); splash.progress("Adding MenuBar Service..."); // add(toolBarService); // add(statusBarService); add(connectionService); splash.progress("Adding Connection Service..."); frameService.setTitle(res.getString("title.application")); final Server server = new Server(); add(server); frameService.setContent(new BeanContextPanel(server)); splash.progress("Adding Server Entry Point..."); add(new ExitAction( new Command() { public void execute() { System.exit(0); } } )); splash.progress("Adding Exit Action..."); add(new SelectFactoryAction("action.options.selectQueueFactory", new Command() { public void execute() { connectionService.selectFactory(ConnectionService.QUEUE_CONNECTION_FACTORY); } } )); splash.progress("Adding Action..."); add(new SelectFactoryAction("action.options.selectTopicFactory", new Command() { public void execute() { connectionService.selectFactory(ConnectionService.TOPIC_CONNECTION_FACTORY); } } )); splash.progress("Adding Action..."); add(frameService); splash.progress("Adding Frame Service..."); add(aboutService); splash.progress("Adding About Service..."); splash.dispose(); } catch (RuntimeException e) { cat.warn("Error occured " + e.getMessage()); throw e; } } } |