[jsword-svn] common/java/swing/org/crosswire/common/swing s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sun Nov 28 14:36:33 MST 2004


Update of /cvs/jsword/common/java/swing/org/crosswire/common/swing
In directory www.crosswire.org:/tmp/cvs-serv11368/java/swing/org/crosswire/common/swing

Modified Files:
	ExceptionShelf.java DebugContainerListener.java 
	FieldLayout.java ExceptionPane.java RowTable.java 
	AntiAliasedTextPane.java FontChooser.java FixedSplitPane.java 
	NudgeButton.java MapCellRenderer.java QuickHelpDialog.java 
	AbstractLayout.java NumericDocument.java ListListModel.java 
	SortRenderer.java 
Log Message:
intellij refactor - safe

Index: FixedSplitPane.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/FixedSplitPane.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** FixedSplitPane.java	8 Sep 2004 19:54:24 -0000	1.3
--- FixedSplitPane.java	28 Nov 2004 21:36:31 -0000	1.4
***************
*** 33,37 ****
   * Since the preferred way of managing the sizes of containers is not with
   * pixel counts, the solution here is to set the preferred size to zero.
!  * 
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
--- 33,37 ----
   * Since the preferred way of managing the sizes of containers is not with
   * pixel counts, the solution here is to set the preferred size to zero.
!  *
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
***************
*** 58,67 ****
  public class FixedSplitPane extends JSplitPane
  {
!     /**
       * Constructor for FixedSplitPane
       */
      public FixedSplitPane()
      {
-         super();
      }
  
--- 58,66 ----
  public class FixedSplitPane extends JSplitPane
  {
! 	/**
       * Constructor for FixedSplitPane
       */
      public FixedSplitPane()
      {
      }
  
***************
*** 178,191 ****
       * Sets the divider location as a percentage of the JSplitPane's size.
       */
!     public void setDividerLocation(double newProportionalLocation)
      {
          if (!firstValidate)
          {
              hasProportionalLocation = true;
!             proportionalLocation = newProportionalLocation;
          }
          else
          {
!             super.setDividerLocation(newProportionalLocation);
          }
      }
--- 177,190 ----
       * Sets the divider location as a percentage of the JSplitPane's size.
       */
!     public void setDividerLocation(double newProportionalLoc)
      {
          if (!firstValidate)
          {
              hasProportionalLocation = true;
!             proportionalLocation = newProportionalLoc;
          }
          else
          {
!             super.setDividerLocation(newProportionalLoc);
          }
      }
***************
*** 193,197 ****
      private static final Dimension DOT = new Dimension(0, 0);
      private boolean firstValidate = true;
!     private boolean hasProportionalLocation;
!     private double proportionalLocation;
  }
--- 192,201 ----
      private static final Dimension DOT = new Dimension(0, 0);
      private boolean firstValidate = true;
!     private boolean hasProportionalLocation = false;
!     private double proportionalLocation = 0.0D;
! 
!     /**
!      * Serialization ID
!      */
!     private static final long serialVersionUID = 3761687909593789241L;
  }

Index: DebugContainerListener.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/DebugContainerListener.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DebugContainerListener.java	21 Sep 2004 17:45:47 -0000	1.5
--- DebugContainerListener.java	28 Nov 2004 21:36:31 -0000	1.6
***************
*** 53,57 ****
  
      /**
!      * 
       */
      private void setAlert(Component comp, Color color)
--- 53,57 ----
  
      /**
!      *
       */
      private void setAlert(Component comp, Color color)
***************
*** 66,70 ****
  
      /**
!      * 
       */
      private void addChild(Container parent, Component child)
--- 66,70 ----
  
      /**
!      *
       */
      private void addChild(Container parent, Component child)
***************
*** 117,125 ****
  
      /**
!      * 
       */
      private String toString(Component parent)
      {
!         return ClassUtil.getShortClassName(parent, "Null") + "(" + parent.hashCode() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      }
  
--- 117,125 ----
  
      /**
!      *
       */
      private String toString(Component parent)
      {
!         return ClassUtil.getShortClassName(parent, "Null") + '(' + parent.hashCode() + ')'; //$NON-NLS-1$
      }
  

Index: FieldLayout.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/FieldLayout.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FieldLayout.java	21 Sep 2004 17:45:47 -0000	1.6
--- FieldLayout.java	28 Nov 2004 21:36:31 -0000	1.7
***************
*** 35,39 ****
  public class FieldLayout extends AbstractLayout
  {
!     /**
       * A default FieldLayout with intercomponent
       * spacing of 0.
--- 35,39 ----
  public class FieldLayout extends AbstractLayout
  {
! 	/**
       * A default FieldLayout with intercomponent
       * spacing of 0.
***************
*** 185,187 ****
--- 185,192 ----
          }
      }
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3617576015757719097L;
  }

Index: AntiAliasedTextPane.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/AntiAliasedTextPane.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AntiAliasedTextPane.java	2 Oct 2004 23:50:52 -0000	1.1
--- AntiAliasedTextPane.java	28 Nov 2004 21:36:31 -0000	1.2
***************
*** 34,38 ****
  public class AntiAliasedTextPane extends JTextPane
  {
!     /* (non-Javadoc)
       * @see javax.swing.JComponent#paintComponent(java.awt.Graphics)
       */
--- 34,38 ----
  public class AntiAliasedTextPane extends JTextPane
  {
! 	/* (non-Javadoc)
       * @see javax.swing.JComponent#paintComponent(java.awt.Graphics)
       */
***************
*** 67,70 ****
--- 67,75 ----
  
      /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3256728398477734965L;
+ 
+     /**
       * Do we anti-alias the text box?
       */

Index: ExceptionShelf.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/ExceptionShelf.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ExceptionShelf.java	8 Sep 2004 19:54:24 -0000	1.5
--- ExceptionShelf.java	28 Nov 2004 21:36:31 -0000	1.6
***************
*** 48,52 ****
  public class ExceptionShelf extends JPanel
  {
!     /**
       *
       */
--- 48,52 ----
  public class ExceptionShelf extends JPanel
  {
! 	/**
       *
       */
***************
*** 402,405 ****
--- 402,410 ----
  
      /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3976741375951647288L;
+ 
+     /**
       * A class to listen to Exceptions
       */

Index: AbstractLayout.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/AbstractLayout.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AbstractLayout.java	21 Sep 2004 17:45:47 -0000	1.6
--- AbstractLayout.java	28 Nov 2004 21:36:31 -0000	1.7
***************
*** 9,13 ****
  /**
   * AbstractLayout - support for DeckLayout.
!  * 
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
--- 9,13 ----
  /**
   * AbstractLayout - support for DeckLayout.
!  *
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
***************
*** 37,41 ****
       * Defaults the horizontal and vertical gaps to 0
       */
!     public AbstractLayout()
      {
          this(0, 0);
--- 37,41 ----
       * Defaults the horizontal and vertical gaps to 0
       */
!     protected AbstractLayout()
      {
          this(0, 0);
***************
*** 45,49 ****
       * Constructor that specifies the horizontal and vertical gaps
       */
!     public AbstractLayout(int hgap, int vgap)
      {
          setHgap(hgap);
--- 45,49 ----
       * Constructor that specifies the horizontal and vertical gaps
       */
!     protected AbstractLayout(int hgap, int vgap)
      {
          setHgap(hgap);
***************
*** 54,58 ****
       * Get the horizontal gap between components.
       */
!     public int getHgap()
      {
          return hgap;
--- 54,58 ----
       * Get the horizontal gap between components.
       */
!     public final int getHgap()
      {
          return hgap;
***************
*** 62,66 ****
       * Get the vertical gap between components.
       */
!     public int getVgap()
      {
          return vgap;
--- 62,66 ----
       * Get the vertical gap between components.
       */
!     public final int getVgap()
      {
          return vgap;
***************
*** 71,75 ****
       * @param gap The horizontal gap to be set
       */
!     public void setHgap(int gap)
      {
          hgap = gap;
--- 71,75 ----
       * @param gap The horizontal gap to be set
       */
!     public final void setHgap(int gap)
      {
          hgap = gap;
***************
*** 80,84 ****
       * @param gap The vertical gap to be set
       */
!     public void setVgap(int gap)
      {
          vgap = gap;
--- 80,84 ----
       * @param gap The vertical gap to be set
       */
!     public final void setVgap(int gap)
      {
          vgap = gap;
***************
*** 164,168 ****
      public String toString()
      {
!         return getClass().getName() + "[hgap=" + hgap + ",vgap=" + vgap + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      }
  
--- 164,168 ----
      public String toString()
      {
!         return getClass().getName() + "[hgap=" + hgap + ",vgap=" + vgap + ']'; //$NON-NLS-1$ //$NON-NLS-2$
      }
  

Index: FontChooser.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/FontChooser.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FontChooser.java	8 Sep 2004 19:54:24 -0000	1.6
--- FontChooser.java	28 Nov 2004 21:36:31 -0000	1.7
***************
*** 55,59 ****
  public class FontChooser extends JPanel
  {
!     /**
       * Create a FontChooser.
       */
--- 55,59 ----
  public class FontChooser extends JPanel
  {
! 	/**
       * Create a FontChooser.
       */
***************
*** 239,243 ****
      static class CustomComboBoxModel extends AbstractListModel implements ComboBoxModel
      {
!         /**
           * Create a custom data model for a JComboBox
           */
--- 239,243 ----
      static class CustomComboBoxModel extends AbstractListModel implements ComboBoxModel
      {
! 		/**
           * Create a custom data model for a JComboBox
           */
***************
*** 296,299 ****
--- 296,304 ----
           */
          private Object selection;
+ 
+         /**
+          * Serialization ID
+          */
+         private static final long serialVersionUID = 3258129150505071664L;
      }
  
***************
*** 304,308 ****
      private static class CustomListCellRenderer extends DefaultListCellRenderer
      {
!         /* (non-Javadoc)
           * @see javax.swing.ListCellRenderer#getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)
           */
--- 309,313 ----
      private static class CustomListCellRenderer extends DefaultListCellRenderer
      {
! 		/* (non-Javadoc)
           * @see javax.swing.ListCellRenderer#getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)
           */
***************
*** 323,326 ****
--- 328,336 ----
              return this;
          }
+ 
+         /**
+          * Serialization ID
+          */
+         private static final long serialVersionUID = 3256726195025358905L;
      }
  
***************
*** 374,376 ****
--- 384,391 ----
       */
      protected boolean suppressEvents;
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3978992071925250097L;
  }

Index: ExceptionPane.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/ExceptionPane.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ExceptionPane.java	21 Sep 2004 17:45:47 -0000	1.6
--- ExceptionPane.java	28 Nov 2004 21:36:31 -0000	1.7
***************
*** 36,40 ****
  
  import org.crosswire.common.util.FileUtil;
- import org.crosswire.common.util.LucidException;
  import org.crosswire.common.util.Reporter;
  import org.crosswire.common.util.ReporterEvent;
--- 36,39 ----
***************
*** 44,48 ****
  /**
   * A simple way of reporting problems to the user.
!  * 
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
--- 43,47 ----
  /**
   * A simple way of reporting problems to the user.
!  *
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
***************
*** 68,72 ****
  public class ExceptionPane extends JPanel
  {
!     /**
       * Use showExceptionDialog for the time being
       */
--- 67,71 ----
  public class ExceptionPane extends JPanel
  {
! 	/**
       * Use showExceptionDialog for the time being
       */
***************
*** 110,115 ****
              public void itemStateChanged(ItemEvent ev)
              {
-                 System.err.println("In itemStateChanged"); //$NON-NLS-1$
- 
                  changeDetail();
              }
--- 109,112 ----
***************
*** 247,255 ****
      /**
       * Set the directories to search for source files.
!      * @param source_path A string array of the source directories
       */
!     public static void setSourcePath(File[] source_path)
      {
!         ExceptionPane.sources = source_path;
      }
  
--- 244,252 ----
      /**
       * Set the directories to search for source files.
!      * @param sourcePath A string array of the source directories
       */
!     public static void setSourcePath(File[] sourcePath)
      {
!         ExceptionPane.sources = (File[]) sourcePath.clone();
      }
  
***************
*** 332,343 ****
  
          // If this is a LucidException with a nested Exception
!         if (ex instanceof LucidException)
          {
!             Throwable nex = ((LucidException) ex).getCause();
!             if (nex != null)
!             {
!                 retcode.append("<p><br><font size=\"-1\">" + Msg.CAUSED_BY + "</font>"); //$NON-NLS-1$ //$NON-NLS-2$
!                 retcode.append(getHTMLDescription(nex));
!             }
          }
  
--- 329,337 ----
  
          // If this is a LucidException with a nested Exception
!         Throwable nex = ex.getCause();
!         if (nex != null)
          {
!             retcode.append("<p><br><font size=\"-1\">" + Msg.CAUSED_BY + "</font>"); //$NON-NLS-1$ //$NON-NLS-2$
!             retcode.append(getHTMLDescription(nex));
          }
  
***************
*** 557,559 ****
--- 551,558 ----
       */
      private static ExceptionPaneReporterListener li;
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3258126947203495219L;
  }

Index: NumericDocument.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/NumericDocument.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NumericDocument.java	16 Aug 2004 22:07:35 -0000	1.2
--- NumericDocument.java	28 Nov 2004 21:36:31 -0000	1.3
***************
*** 1,3 ****
- 
  package org.crosswire.common.swing;
  
--- 1,2 ----
***************
*** 34,40 ****
  public class NumericDocument extends PlainDocument
  {
!     public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
      {
!         if (str == null) return;
  
          char[] upper = str.toCharArray();
--- 33,45 ----
  public class NumericDocument extends PlainDocument
  {
! 	/* (non-Javadoc)
! 	 * @see javax.swing.text.Document#insertString(int, java.lang.String, javax.swing.text.AttributeSet)
! 	 */
! 	public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
      {
!         if (str == null)
!         {
!             return;
!         }
  
          char[] upper = str.toCharArray();
***************
*** 48,50 ****
--- 53,60 ----
          super.insertString(offs, clear.toString(), a);
      }
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3761973765420102192L;
  }

Index: NudgeButton.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/NudgeButton.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NudgeButton.java	20 Apr 2004 21:16:06 -0000	1.1
--- NudgeButton.java	28 Nov 2004 21:36:31 -0000	1.2
***************
*** 37,43 ****
  public class NudgeButton extends JPanel
  {
!     /**
!     *
!     */
      public NudgeButton()
      {
--- 37,43 ----
  public class NudgeButton extends JPanel
  {
! 	/**
!      *
!      */
      public NudgeButton()
      {
***************
*** 49,54 ****
  
      /**
!     *
!     */
      public void setUpEnabled(boolean active)
      {
--- 49,54 ----
  
      /**
!      *
!      */
      public void setUpEnabled(boolean active)
      {
***************
*** 57,62 ****
  
      /**
!     *
!     */
      public void setDownEnabled(boolean active)
      {
--- 57,62 ----
  
      /**
!      *
!      */
      public void setDownEnabled(boolean active)
      {
***************
*** 65,70 ****
  
      /**
!     *
!     */
      public boolean getUpEnabled()
      {
--- 65,70 ----
  
      /**
!      *
!      */
      public boolean getUpEnabled()
      {
***************
*** 73,78 ****
  
      /**
!     *
!     */
      public boolean getDownEnabled()
      {
--- 73,78 ----
  
      /**
!      *
!      */
      public boolean getDownEnabled()
      {
***************
*** 81,86 ****
  
      /**
!     *
!     */
      public void addUpActionListener(ActionListener al)
      {
--- 81,86 ----
  
      /**
!      *
!      */
      public void addUpActionListener(ActionListener al)
      {
***************
*** 89,94 ****
  
      /**
!     *
!     */
      public void removeUpActionListener(ActionListener al)
      {
--- 89,94 ----
  
      /**
!      *
!      */
      public void removeUpActionListener(ActionListener al)
      {
***************
*** 97,102 ****
  
      /**
!     *
!     */
      public void addDownActionListener(ActionListener al)
      {
--- 97,102 ----
  
      /**
!      *
!      */
      public void addDownActionListener(ActionListener al)
      {
***************
*** 105,110 ****
  
      /**
!     *
!     */
      public void removeDownActionListener(ActionListener al)
      {
--- 105,110 ----
  
      /**
!      *
!      */
      public void removeDownActionListener(ActionListener al)
      {
***************
*** 112,119 ****
      }
  
!     /** The up button */
      private JButton up = new javax.swing.plaf.basic.BasicArrowButton(SwingConstants.NORTH);
  
!     /** The down button */
      private JButton down = new javax.swing.plaf.basic.BasicArrowButton(SwingConstants.SOUTH);
  }
--- 112,128 ----
      }
  
!     /**
!      * The up button
!      */
      private JButton up = new javax.swing.plaf.basic.BasicArrowButton(SwingConstants.NORTH);
  
!     /**
!      * The down button
!      */
      private JButton down = new javax.swing.plaf.basic.BasicArrowButton(SwingConstants.SOUTH);
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3257008748156499508L;
  }

Index: QuickHelpDialog.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/QuickHelpDialog.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** QuickHelpDialog.java	1 Oct 2004 22:49:31 -0000	1.1
--- QuickHelpDialog.java	28 Nov 2004 21:36:31 -0000	1.2
***************
*** 44,48 ****
  public class QuickHelpDialog extends JDialog
  {
!     /**
       * This is the default constructor
       */
--- 44,48 ----
  public class QuickHelpDialog extends JDialog
  {
! 	/**
       * This is the default constructor
       */
***************
*** 140,142 ****
--- 140,147 ----
  
      private JEditorPane txtHelp = null;
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3690752899747557426L;
  }

Index: MapCellRenderer.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/MapCellRenderer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MapCellRenderer.java	21 Sep 2004 17:45:47 -0000	1.3
--- MapCellRenderer.java	28 Nov 2004 21:36:31 -0000	1.4
***************
*** 37,41 ****
  public class MapCellRenderer extends JTextArea implements TableCellRenderer
  {
!     /**
       * Create a MapCellRenderer
       */
--- 37,41 ----
  public class MapCellRenderer extends JTextArea implements TableCellRenderer
  {
! 	/**
       * Create a MapCellRenderer
       */
***************
*** 158,160 ****
--- 158,165 ----
       */
      private Color unselectedBackground;
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3258130254177448499L;
  }

Index: SortRenderer.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/SortRenderer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SortRenderer.java	21 Sep 2004 17:45:47 -0000	1.2
--- SortRenderer.java	28 Nov 2004 21:36:31 -0000	1.3
***************
*** 1,22 ****
- /*
-  * Distribution Licence:
-  * JSword is free software; you can redistribute it
-  * and/or modify it under the terms of the GNU General Public License,
-  * version 2 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 General Public License for more details.
-  * The License is available on the internet at:
-  *     http://www.gnu.org/copyleft/gpl.html,
-  * or by writing to:
-  *     Free Software Foundation, Inc.
-  *     59 Temple Place - Suite 330
-  *     Boston, MA 02111-1307, USA
-  * 
-  * The copyright to this program is held by it's authors
-  * Copyright: 2004
-  */
  package org.crosswire.common.swing;
  
--- 1,2 ----
***************
*** 34,51 ****
   * A SortRenderer indicates the column that is sorted by italizing it.
   * 
!  * @author DM Smith [ dmsmith555 at yahoo dot com]
   */
  public class SortRenderer extends DefaultTableCellRenderer
  {
- 
-     /**
-      * Field pressedColumn
-      */
-     private TableColumn pressedColumn;
-     /**
-      * Field model
-      */
-     private RowTableModel model;
- 
      /**
       * Constructor for SortRenderer
--- 14,41 ----
   * A SortRenderer indicates the column that is sorted by italizing it.
   * 
!  * <p><table border='1' cellPadding='3' cellSpacing='0'>
!  * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
!  *
!  * Distribution Licence:<br />
!  * JSword is free software; you can redistribute it
!  * and/or modify it under the terms of the GNU General Public License,
!  * version 2 as published by the Free Software Foundation.<br />
!  * 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
!  * General Public License for more details.<br />
!  * The License is available on the internet
!  * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, or by writing to:
!  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
!  * MA 02111-1307, USA<br />
!  * The copyright to this program is held by it's authors.
!  * </font></td></tr></table>
!  * @see gnu.gpl.Licence
!  * @author DM Smith [dmsmith555 at yahoo dot com]
!  * @author Joe Walker [joe at eireneh dot com]
!  * @version $Id$
   */
  public class SortRenderer extends DefaultTableCellRenderer
  {
      /**
       * Constructor for SortRenderer
***************
*** 115,117 ****
--- 105,121 ----
      }
  
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3977303200573765939L;
+ 
+     /**
+      * Field pressedColumn
+      */
+     private TableColumn pressedColumn;
+ 
+     /**
+      * Field model
+      */
+     private RowTableModel model;
  }

Index: RowTable.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/RowTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** RowTable.java	21 Sep 2004 17:45:47 -0000	1.2
--- RowTable.java	28 Nov 2004 21:36:31 -0000	1.3
***************
*** 1,22 ****
- /*
-  * Distribution Licence:
-  * JSword is free software; you can redistribute it
-  * and/or modify it under the terms of the GNU General Public License,
-  * version 2 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 General Public License for more details.
-  * The License is available on the internet at:
-  *     http://www.gnu.org/copyleft/gpl.html,
-  * or by writing to:
-  *     Free Software Foundation, Inc.
-  *     59 Temple Place - Suite 330
-  *     Boston, MA 02111-1307, USA
-  * 
-  * The copyright to this program is held by it's authors
-  * Copyright: 2004
-  */
  package org.crosswire.common.swing;
  
--- 1,2 ----
***************
*** 40,61 ****
   * Presents a table of items to a user in a table.
   * 
!  * @author DM Smith [ dmsmith555 at yahoo dot com]
   */
  public class RowTable extends JTable
  {
      /**
-      * Field ONE_STANDARD_CHARACTER
-      */
-     private static final String ONE_STANDARD_CHARACTER = "M"; //$NON-NLS-1$
-     /**
-      * Field TWO_STANDARD_CHARACTERS
-      */
-     private static final String TWO_STANDARD_CHARACTERS = "MM"; //$NON-NLS-1$
-     /**
-      * Field PADDING
-      */
-     private static final int PADDING = 3;
- 
-     /**
       * Constructor for RowTable
       * @param aList
--- 20,48 ----
   * Presents a table of items to a user in a table.
   * 
!  * <p><table border='1' cellPadding='3' cellSpacing='0'>
!  * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
!  *
!  * Distribution Licence:<br />
!  * JSword is free software; you can redistribute it
!  * and/or modify it under the terms of the GNU General Public License,
!  * version 2 as published by the Free Software Foundation.<br />
!  * 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
!  * General Public License for more details.<br />
!  * The License is available on the internet
!  * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, or by writing to:
!  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
!  * MA 02111-1307, USA<br />
!  * The copyright to this program is held by it's authors.
!  * </font></td></tr></table>
!  * @see gnu.gpl.Licence
!  * @author DM Smith [dmsmith555 at yahoo dot com]
!  * @author Joe Walker [joe at eireneh dot com]
!  * @version $Id$
   */
  public class RowTable extends JTable
  {
      /**
       * Constructor for RowTable
       * @param aList
***************
*** 116,125 ****
          final RowTableModel tm = (RowTableModel) aTable.getModel();
          // reset the selection
!         Object obj = null;
!         int where = -1;
          for (int i = 0; i < objs.size(); i++)
          {
!             obj = objs.get(i);
!             where = tm.getRow(obj);
              if (where != -1)
              {
--- 103,111 ----
          final RowTableModel tm = (RowTableModel) aTable.getModel();
          // reset the selection
! 
          for (int i = 0; i < objs.size(); i++)
          {
!             Object obj = objs.get(i);
!             int where = tm.getRow(obj);
              if (where != -1)
              {
***************
*** 205,214 ****
          //  that the text needs to not display ...
          final int margins = (tcm.getColumnMargin() << 1) + PADDING;
!         TableColumn tc = null;
!         int width = -1;
          for (int i = 0; i < widths.length; i++)
          {
!             tc = tcm.getColumn(i);
!             width = widths[i] * mWidth + margins;
              if (fixed[i])
              {
--- 191,199 ----
          //  that the text needs to not display ...
          final int margins = (tcm.getColumnMargin() << 1) + PADDING;
! 
          for (int i = 0; i < widths.length; i++)
          {
!             TableColumn tc = tcm.getColumn(i);
!             int width = widths[i] * mWidth + margins;
              if (fixed[i])
              {
***************
*** 232,239 ****
          final TableColumnModel model = getColumnModel();
          final int colCount = model.getColumnCount();
!         TableColumn tc = null;
          for (int i = 0; i < colCount; i++)
          {
!             tc = model.getColumn(i);
              tc.setHeaderRenderer(sortRenderer);
          }
--- 217,224 ----
          final TableColumnModel model = getColumnModel();
          final int colCount = model.getColumnCount();
! 
          for (int i = 0; i < colCount; i++)
          {
!             TableColumn tc = model.getColumn(i);
              tc.setHeaderRenderer(sortRenderer);
          }
***************
*** 291,294 ****
--- 276,282 ----
       * @param col int
       */
+     /**
+      * @param col
+      */
      public void sort(int col)
      {
***************
*** 300,303 ****
--- 288,292 ----
              renderer.setPressedColumn(tc);
          }
+ 
          final List objs = saveSelection(this);
          getSelectionModel().clearSelection();
***************
*** 306,309 ****
--- 295,301 ----
      }
  
+     /**
+      * 
+      */
      public void reset()
      {
***************
*** 315,317 ****
--- 307,328 ----
      }
  
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3761407508275081783L;
+ 
+     /**
+      * Field ONE_STANDARD_CHARACTER
+      */
+     private static final String ONE_STANDARD_CHARACTER = "M"; //$NON-NLS-1$
+ 
+     /**
+      * Field TWO_STANDARD_CHARACTERS
+      */
+     private static final String TWO_STANDARD_CHARACTERS = "MM"; //$NON-NLS-1$
+ 
+     /**
+      * Field PADDING
+      */
+     private static final int PADDING = 3;
  }

Index: ListListModel.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/ListListModel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ListListModel.java	20 Apr 2004 21:16:06 -0000	1.1
--- ListListModel.java	28 Nov 2004 21:36:31 -0000	1.2
***************
*** 32,36 ****
  public class ListListModel extends AbstractListModel implements ListModel
  {
!     /**
       * Constructor for ListListModel.
       */
--- 32,36 ----
  public class ListListModel extends AbstractListModel implements ListModel
  {
! 	/**
       * Constructor for ListListModel.
       */
***************
*** 57,59 ****
--- 57,64 ----
  
      private List list;
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3977863977273209144L;
  }



More information about the jsword-svn mailing list