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

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Wed Jun 6 13:40:14 MST 2007


Author: dmsmith
Date: 2007-06-06 13:40:13 -0700 (Wed, 06 Jun 2007)
New Revision: 1386

Modified:
   trunk/common-swing/src/main/java/org/crosswire/common/swing/FontChooser.java
Log:
Eliminated redundant code.

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/FontChooser.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/FontChooser.java	2007-06-06 12:14:43 UTC (rev 1385)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/FontChooser.java	2007-06-06 20:40:13 UTC (rev 1386)
@@ -31,8 +31,6 @@
 import java.awt.event.ActionListener;
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
 
 import javax.swing.AbstractListModel;
 import javax.swing.BorderFactory;
@@ -204,28 +202,6 @@
     }
 
     /**
-     * Interface for people to be notified of changes to the
-     * current Font.
-     * @param li The new listener class
-     */
-    /* @Override */
-    public void addPropertyChangeListener(PropertyChangeListener li)
-    {
-        listeners.addPropertyChangeListener(li);
-    }
-
-    /**
-     * Interface for people to be notified of changes to the
-     * current Font.
-     * @param li The listener class to be deleted
-     */
-    /* @Override */
-    public void removePropertyChangeListener(PropertyChangeListener li)
-    {
-        listeners.removePropertyChangeListener(li);
-    }
-
-    /**
      * When something chenages we must inform out listeners.
      */
     protected void fireStateChange()
@@ -235,7 +211,7 @@
 
         if (!suppressEvents)
         {
-            listeners.firePropertyChange("style", old, font); //$NON-NLS-1$
+            firePropertyChange(PROPERTY_STYLE, old, font);
         }
     }
 
@@ -355,6 +331,8 @@
         private static final long serialVersionUID = 3256726195025358905L;
     }
 
+    public static final String PROPERTY_STYLE = "style"; // //$NON-NLS-1$
+
     /**
      * A label that we can use to get defaults
      */
@@ -366,11 +344,6 @@
     protected JDialog dialog;
 
     /**
-     * People that want to know about font changes
-     */
-    protected PropertyChangeSupport listeners = new PropertyChangeSupport(this);
-
-    /**
      * The current font
      */
     protected Font font;




More information about the jsword-svn mailing list