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

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sat Jan 15 05:05:35 MST 2005


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

Modified Files:
	FormPane.java RowTableModel.java 
Log Message:
general tidy-ups

Index: RowTableModel.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/RowTableModel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** RowTableModel.java	21 Sep 2004 17:45:47 -0000	1.2
--- RowTableModel.java	15 Jan 2005 12:05:33 -0000	1.3
***************
*** 1,73 ****
- /*
-  * 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;
  
  import java.util.List;
  
  import javax.swing.table.AbstractTableModel;
  
  /**
!  * The RowTableModel defines the "model" behaviour for
!  * a RowTable.
   * 
!  * @author DM Smith [ dmsmith555 at yahoo dot com]
   */
  public class RowTableModel extends AbstractTableModel
  {
      /**
-      * Field list contains the objects that can be worked upon
-      */
-     private List list;
- 
-     /**
-      * Field columnModel provides the definition of the structure
-      * of the table
-      */
-     private RowColumns rowColumnModel;
- 
-     /**
-      * Field indexes provides a look-aside for the sorted view of the
-      * table to the row list.
-      */
-     private int[] indexes;
- 
-     /**
-      * Field keys provides the primary or composite key of the table.
-      * It is a local optimization of columnModel.getSortKeys().
-      */
-     private int[] keys;
-     /**
-      * Field sortColumn indicates the column that was last sorted upon.
-      * It is initialized the first value in keys, if present otherwise -1
-      */
-     private int sortColumn;
- 
-     /**
       * Builds a RowTable model for the provided (non-null) row list,
       * using the provided row column definition.
!      * @param aList List
       */
!     public RowTableModel(List aList, RowColumns aRowColumnModel)
      {
!         super();
!         list = aList;
          rowColumnModel = aRowColumnModel;
          keys = rowColumnModel.getSortKeys();
--- 1,46 ----
  package org.crosswire.common.swing;
  
  import java.util.List;
+ import java.util.ArrayList;
  
  import javax.swing.table.AbstractTableModel;
  
  /**
!  * The RowTableModel defines the "model" behaviour for a RowTable.
   * 
!  * <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 RowTableModel extends AbstractTableModel
  {
      /**
       * Builds a RowTable model for the provided (non-null) row list,
       * using the provided row column definition.
!      * @param newList List
       */
!     public RowTableModel(List newList, RowColumns aRowColumnModel)
      {
!         list = new ArrayList();
!         list.addAll(newList);
! 
          rowColumnModel = aRowColumnModel;
          keys = rowColumnModel.getSortKeys();
***************
*** 97,101 ****
  
      /**
!      * Method getValueAt returns the contents of a cell. 
       * @param row int
       * @param column int
--- 70,74 ----
  
      /**
!      * Method getValueAt returns the contents of a cell.
       * @param row int
       * @param column int
***************
*** 342,344 ****
--- 315,350 ----
      }
  
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3761126033281463602L;
+ 
+     /**
+      * Field list contains the objects that can be worked upon
+      */
+     private List list;
+ 
+     /**
+      * Field columnModel provides the definition of the structure
+      * of the table
+      */
+     private RowColumns rowColumnModel;
+ 
+     /**
+      * Field indexes provides a look-aside for the sorted view of the
+      * table to the row list.
+      */
+     private int[] indexes;
+ 
+     /**
+      * Field keys provides the primary or composite key of the table.
+      * It is a local optimization of columnModel.getSortKeys().
+      */
+     private int[] keys;
+ 
+     /**
+      * Field sortColumn indicates the column that was last sorted upon.
+      * It is initialized the first value in keys, if present otherwise -1
+      */
+     private int sortColumn;
  }

Index: FormPane.java
===================================================================
RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/FormPane.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FormPane.java	16 Aug 2004 22:07:35 -0000	1.2
--- FormPane.java	15 Jan 2005 12:05:33 -0000	1.3
***************
*** 34,40 ****
  public class FormPane extends JPanel
  {
-     private static final String SUFFIX_COMP = "_comp"; //$NON-NLS-1$
-     private static final String SUFFIX_LABEL = "_label"; //$NON-NLS-1$
- 
      /**
       * Create a FormPane
--- 34,37 ----
***************
*** 93,100 ****
          int count = getComponentCount() / 2;
          String[] list = new String[count];
!         JLabel label;
          for (int i = 0; i < count; i++)
          {
!             label = (JLabel) getComponent(i * 2);
              list[i] = label.getText();
          }
--- 90,97 ----
          int count = getComponentCount() / 2;
          String[] list = new String[count];
! 
          for (int i = 0; i < count; i++)
          {
!             JLabel label = (JLabel) getComponent(i * 2);
              list[i] = label.getText();
          }
***************
*** 120,123 ****
--- 117,128 ----
      }
  
+     private static final String SUFFIX_COMP = "_comp"; //$NON-NLS-1$
+     private static final String SUFFIX_LABEL = "_label"; //$NON-NLS-1$
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3258135738867790641L;
+ 
      /**
       * A store of the available components



More information about the jsword-svn mailing list