[jsword-svn] r1774 - trunk/common-swing/src/main/java/org/crosswire/common/progress/swing

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Sat Mar 8 09:45:55 MST 2008


Author: dmsmith
Date: 2008-03-08 09:45:54 -0700 (Sat, 08 Mar 2008)
New Revision: 1774

Added:
   trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobCancelListener.java
Modified:
   trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsViewPane.java
Log:
More i18n work.

Added: trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobCancelListener.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobCancelListener.java	                        (rev 0)
+++ trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobCancelListener.java	2008-03-08 16:45:54 UTC (rev 1774)
@@ -0,0 +1,55 @@
+/**
+ * Distribution License:
+ * JSword is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License, version 2.1 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * The License is available on the internet at:
+ *       http://www.gnu.org/copyleft/lgpl.html
+ * or by writing to:
+ *      Free Software Foundation, Inc.
+ *      59 Temple Place - Suite 330
+ *      Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2008
+ *     The copyright to this program is held by it's authors.
+ *
+ * ID: $Id: CancelListener.java 1523 2007-07-24 20:51:33Z dmsmith $
+ */
+package org.crosswire.common.progress.swing;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import org.crosswire.common.progress.Progress;
+
+/**
+ * Listen for cancel events and do the cancel.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+final class JobCancelListener implements ActionListener
+{
+    /**
+     * @param theJob
+     */
+    public JobCancelListener(Progress theJob)
+    {
+        job = theJob;
+    }
+
+    /* (non-Javadoc)
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+     */
+    public void actionPerformed(ActionEvent ev)
+    {
+        job.cancel();
+    }
+
+    private Progress job;
+}
\ No newline at end of file

Modified: trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsViewPane.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsViewPane.java	2008-03-08 03:09:18 UTC (rev 1773)
+++ trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsViewPane.java	2008-03-08 16:45:54 UTC (rev 1774)
@@ -26,8 +26,6 @@
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -149,7 +147,7 @@
         {
             cancel.setEnabled(false);
         }
-        cancel.addActionListener(new CancelListener(job));
+        cancel.addActionListener(new JobCancelListener(job));
 
         jobsPanel.add(label, new GridBagConstraints(0, i, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_END, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
         jobsPanel.add(progress, new GridBagConstraints(1, i, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
@@ -326,29 +324,6 @@
     }
 
     /**
-     * Listen for cancel events and do the cancel.
-     */
-    private static final class CancelListener implements ActionListener
-    {
-        /**
-         * @param theJob
-         */
-        public CancelListener(Progress theJob)
-        {
-            job = theJob;
-        }
-
-        /* (non-Javadoc)
-         * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
-         */
-        public void actionPerformed(ActionEvent ev)
-        {
-            job.cancel();
-        }
-
-        private Progress job;
-    }
-    /**
      * A simple struct to group information about a Job
      */
     private static class JobData




More information about the jsword-svn mailing list