Thread: [Ejtools-cvs] CVS: applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser AboutDialo
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-04-30 21:13:22
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser In directory usw-pr-cvs1:/tmp/cvs-serv6009/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser Modified Files: AboutDialog.java JNDIBrowser.java Main.java SelectFactoryAction.java SplashWindow.java Log Message: Add getTitle support for I18N Pretty print source code Index: AboutDialog.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/AboutDialog.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AboutDialog.java 22 Apr 2002 17:38:25 -0000 1.1 --- AboutDialog.java 30 Apr 2002 21:13:19 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser; - // Standard Imports import java.awt.BorderLayout; import java.awt.Color; --- 7,10 ---- *************** *** 17,21 **** import javax.swing.JPanel; - // Other Imports import net.sourceforge.ejtools.awt.action.Command; import net.sourceforge.ejtools.awt.action.help.AboutAction; --- 16,19 ---- *************** *** 40,44 **** /** Constructor for the AboutServiceProvider object */ ! public AboutDialog() { } --- 38,44 ---- /** Constructor for the AboutServiceProvider object */ ! public AboutDialog() ! { ! } *************** *** 55,58 **** --- 55,69 ---- } return panel; + } + + + /** + * Getter for the title attribute + * + * @return The value of title attribute + */ + public String getTitle() + { + return res.getString("title.about.dialog"); } Index: JNDIBrowser.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/JNDIBrowser.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JNDIBrowser.java 28 Apr 2002 13:00:03 -0000 1.2 --- JNDIBrowser.java 30 Apr 2002 21:13:19 -0000 1.3 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser; ! // Standard Imports import java.beans.beancontext.BeanContextServicesSupport; import java.util.ResourceBundle; --- 7,12 ---- package net.sourceforge.ejtools.jndibrowser; ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; import java.beans.beancontext.BeanContextServicesSupport; import java.util.ResourceBundle; *************** *** 13,17 **** import javax.swing.ImageIcon; - // Other Imports import net.sourceforge.ejtools.awt.BeanContextTreePanel; import net.sourceforge.ejtools.awt.action.Command; --- 14,17 ---- *************** *** 46,50 **** { /** 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"); --- 46,50 ---- { /** Description of the Field */ ! private static Category logger = Category.getInstance(JNDIBrowser.class); /** Description of the Field */ private final static ResourceBundle res = ResourceBundle.getBundle("ApplicationResources"); *************** *** 57,61 **** /** Description of the Field */ ConnectionServiceProvider connectionService; - /** Description of the Field */ FrameServiceProvider frameService; --- 57,60 ---- *************** *** 74,78 **** splash.show(); ! cat.debug("JNDIBrowser starting..."); frameService = new FrameServiceProvider("SDI"); --- 73,77 ---- splash.show(); ! logger.debug("JNDIBrowser starting..."); frameService = new FrameServiceProvider("SDI"); *************** *** 94,98 **** splash.progress("Adding MenuBar Service..."); ! // add(toolBarService); // add(statusBarService); --- 93,97 ---- splash.progress("Adding MenuBar Service..."); ! add(toolBarService); // add(statusBarService); *************** *** 106,109 **** --- 105,114 ---- splash.progress("Adding Server Entry Point..."); + frameService.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent evt) { + quit(); + } + }); + add(new ExitAction( new Command() *************** *** 111,115 **** public void execute() { ! System.exit(0); } } --- 116,120 ---- public void execute() { ! quit(); } } *************** *** 149,156 **** catch (RuntimeException e) { ! cat.warn("Error occured " + e.getMessage()); throw e; } } } --- 154,165 ---- catch (RuntimeException e) { ! logger.fatal("Error occured " + e.getMessage()); throw e; } } + + public void quit() { + System.exit(0); + } } Index: Main.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/Main.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Main.java 22 Apr 2002 17:40:31 -0000 1.1 --- Main.java 30 Apr 2002 21:13:19 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser; - // Standard Imports import java.io.File; import java.net.URL; --- 7,10 ---- *************** *** 16,19 **** --- 15,20 ---- import java.util.LinkedList; + import org.apache.log4j.Category; + /** * Description of the Class *************** *** 26,29 **** --- 27,32 ---- public class Main { + private final static Category logger = Category.getInstance(Main.class); + /** * The main program for the Main class *************** *** 34,52 **** public static void main(String[] args) throws Exception { ! File pluginDir = new File("../lib/ext"); LinkedList list = new LinkedList(); ! File[] plugins = pluginDir.listFiles(); for (int i = 0; i < plugins.length; i++) { System.out.println(plugins[i].toURL()); list.add(plugins[i].toURL()); } ! pluginDir = new File("../lib"); plugins = pluginDir.listFiles(); for (int i = 0; i < plugins.length; i++) { ! System.out.println(plugins[i].toURL()); list.add(plugins[i].toURL()); } URL[] pluginURLs = (URL[]) list.toArray(new URL[list.size()]); --- 37,65 ---- public static void main(String[] args) throws Exception { ! File pluginDir; ! File[] plugins; LinkedList list = new LinkedList(); ! ! logger.debug("Building classpath..."); ! ! logger.debug("Scanning lib directory..."); ! pluginDir = new File("../lib"); ! plugins = pluginDir.listFiles(); for (int i = 0; i < plugins.length; i++) { + logger.debug("Found " + plugins[i].toURL()); System.out.println(plugins[i].toURL()); list.add(plugins[i].toURL()); } ! ! logger.debug("Scanning lib/ext directory..."); ! pluginDir = new File("../lib/ext"); plugins = pluginDir.listFiles(); for (int i = 0; i < plugins.length; i++) { ! logger.debug("Found " + plugins[i].toURL()); list.add(plugins[i].toURL()); } + URL[] pluginURLs = (URL[]) list.toArray(new URL[list.size()]); *************** *** 65,68 **** --- 78,82 ---- }); + logger.debug("Launching JNDIBrowser"); AccessController.doPrivileged( new PrivilegedExceptionAction() Index: SelectFactoryAction.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/SelectFactoryAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SelectFactoryAction.java 22 Apr 2002 17:41:37 -0000 1.1 --- SelectFactoryAction.java 30 Apr 2002 21:13:19 -0000 1.2 *************** *** 7,14 **** package net.sourceforge.ejtools.jndibrowser; - // Standard Imports import java.util.ResourceBundle; - // Other Imports import net.sourceforge.ejtools.awt.action.Command; import net.sourceforge.ejtools.awt.action.CommandAction; --- 7,12 ---- Index: SplashWindow.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/SplashWindow.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SplashWindow.java 22 Apr 2002 17:50:35 -0000 1.1 --- SplashWindow.java 30 Apr 2002 21:13:19 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser; - // Standard Imports import java.awt.BorderLayout; import java.awt.Dimension; --- 7,10 ---- |