--- /home/cpdev/src/classpath/javax/swing/table/AbstractTableModel.java	2005-07-02 21:04:08.000000000 +0000
+++ javax/swing/table/AbstractTableModel.java	2005-06-30 05:35:20.000000000 +0000
@@ -1,5 +1,5 @@
 /* AbstractTableModel.java --
-   Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -46,8 +46,7 @@
 import javax.swing.event.TableModelListener;
 
 /**
- * A base class that can be used to create implementations of the 
- * {@link TableModel} interface.
+ * AbstractTableModel
  * 
  * @author Andrew Selkirk
  */
@@ -56,60 +55,58 @@
   static final long serialVersionUID = -5798593159423650347L;
 
   /**
-   * Storage for the listeners registered with this model.
+   * listenerList
    */
   protected EventListenerList listenerList = new EventListenerList();
 
   /**
-   * Creates a default instance.
+   * Constructor AbstractTableModel
    */
   public AbstractTableModel()
   {
-    // no setup required here
+    // TODO
   }
 
   /**
-   * Returns the name of the specified column.  This method generates default 
-   * names in a sequence (starting with column 0):  A, B, C, ..., Z, AA, AB, 
-   * AC, ..., AZ, BA, BB, BC, and so on.  Subclasses may override this method
-   * to allow column names to be specified on some other basis. 
+   * Get the name of the column for this index. If you do not override
+   * this methode, you'll get something like: 0, A; 1, B; ...; AA; AB;
+   * ...
    *
-   * @param columnIndex  the column index.
+   * @param columnIndex The index of the column.
    *
    * @return The name of the column.
    */
-  public String getColumnName(int columnIndex)
+  public String getColumnName (int columnIndex)
   {
+    int index = columnIndex + 1;
     StringBuffer buffer = new StringBuffer();
-    while (columnIndex >= 0)
+
+    while (index > 0)
       {
-        buffer.insert (0, (char) ('A' + columnIndex % 26));
-        columnIndex = columnIndex / 26 - 1;
+	buffer.insert (0, (char) ('A' + ((index - 1) % 26)));
+	index = (index - 1) / 26;
       }
+    
+    // Return column name.
     return buffer.toString();
   }
 
   /**
-   * Return the index of the specified column, or <code>-1</code> if there is
-   * no column with the specified name.
+   * Return the index of the given name.
    *
-   * @param columnName  the name of the column (<code>null</code> not permitted).
+   * @param columnName The name of the column.
    *
    * @return The index of the column, -1 if not found.
-   * 
-   * @see #getColumnName(int)
-   * @throws NullPointerException if <code>columnName</code> is 
-   *         <code>null</code>.
    */
-  public int findColumn(String columnName)
+  public int findColumn (String columnName)
   {
     int count = getColumnCount();
     
     for (int index = 0; index < count; index++)
       {
-        String name = getColumnName(index);
+        String name = getColumnName (index);
         
-        if (columnName.equals(name))
+        if (name.equals (columnName))
           return index;
     }
 
@@ -118,162 +115,142 @@
   }
 
   /**
-   * Returns the <code>Class</code> for all <code>Object</code> instances
-   * in the specified column.  
-   * 
-   * @param columnIndex the column index.
-   * 
-   * @return The class.
+   * Returns the class of a comlumn.
+   *
+   * @param columnIndex The index of the column.
+   *
+   * @return The class type of the column.
    */
-  public Class getColumnClass(int columnIndex)
+  public Class getColumnClass (int columnIndex)
   {
     return Object.class;
   }
 
   /**
-   * Returns <code>true</code> if the specified cell is editable, and 
-   * <code>false</code> if it is not.  This implementation returns 
-   * <code>false</code> for all arguments, subclasses should override the 
-   * method if necessary.
+   * Tells whether a cell is editable.
    *
-   * @param rowIndex  the row index of the cell.
-   * @param columnIndex  the column index of the cell.
+   * @param rowIndex The row of the cell.
+   * @param columnIndex The index of the cell.
    *
-   * @return <code>false</code>.
+   * @return True if cell is editable.
    */
-  public boolean isCellEditable(int rowIndex, int columnIndex)
+  public boolean isCellEditable (int rowIndex, int columnIndex)
   {
     return false;
   }
 
   /**
-   * Sets the value of the given cell.  This implementation ignores all 
-   * arguments and does nothing, subclasses should override the 
-   * method if necessary.
-   *
-   * @param value  the new value (<code>null</code> permitted).
-   * @param rowIndex  the row index of the cell.
-   * @param columnIndex  the column index of the cell.
+   * Sets a cell to a value.
+   *
+   * @param value New value of cell.
+   * @param rowIndex The row of the cell.
+   * @param columnIndex The column of the cell.
    */
-  public void setValueAt(Object value, int rowIndex, int columnIndex)
+  public void setValueAt (Object value, int rowIndex, int columnIndex)
   {
     // Do nothing...
   }
 
   /**
-   * Adds a listener to the table model.  The listener will receive notification
-   * of all changes to the table model.
+   * Add a TableModelListener.
    *
-   * @param listener  the listener.
+   * @param listener The listener to add.
    */
-  public void addTableModelListener(TableModelListener listener)
+  public void addTableModelListener (TableModelListener listener)
   {
-    listenerList.add(TableModelListener.class, listener);
+    listenerList.add (TableModelListener.class, listener);
   }
 
   /**
-   * Removes a listener from the table model so that it will no longer receive
-   * notification of changes to the table model.
+   * Removes a TableModelListener.
    *
-   * @param listener  the listener to remove.
+   * @param listener The listener to remove.
    */
-  public void removeTableModelListener(TableModelListener listener)
+  public void removeTableModelListener (TableModelListener listener)
   {
-    listenerList.remove(TableModelListener.class, listener);
+    listenerList.remove (TableModelListener.class, listener);
   }
 
   /**
-   * Returns an array containing the listeners that have been added to the
-   * table model.
+   * Return all registered TableModelListener objects.
    *
-   * @return Array of {@link TableModelListener} objects.
+   * @return Array of TableModelListener objects.
    *
    * @since 1.4
    */
   public TableModelListener[] getTableModelListeners()
   {
     return (TableModelListener[])
-      listenerList.getListeners(TableModelListener.class);
+      listenerList.getListeners (TableModelListener.class);
   }
 
   /**
-   * Sends a {@link TableModelEvent} to all registered listeners to inform
-   * them that the table data has changed.
+   * fireTableDataChanged
    */
   public void fireTableDataChanged()
   {
-    fireTableChanged(new TableModelEvent(this, 0, Integer.MAX_VALUE));
+    fireTableChanged (new TableModelEvent (this));
   }
 
   /**
-   * Sends a {@link TableModelEvent} to all registered listeners to inform
-   * them that the table structure has changed.
+   * fireTableStructureChanged
    */
   public void fireTableStructureChanged()
   {
-    fireTableChanged(new TableModelEvent(this, TableModelEvent.HEADER_ROW));
+    fireTableChanged (new TableModelEvent (this, TableModelEvent.HEADER_ROW));
   }
 
   /**
-   * Sends a {@link TableModelEvent} to all registered listeners to inform
-   * them that some rows have been inserted into the model.
-   * 
-   * @param firstRow  the index of the first row.
-   * @param lastRow  the index of the last row.
+   * fireTableRowsInserted
+   * @param value0 TODO
+   * @param value1 TODO
    */
   public void fireTableRowsInserted (int firstRow, int lastRow)
   {
-    fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
-                                         TableModelEvent.ALL_COLUMNS,
-                                         TableModelEvent.INSERT));
+    fireTableChanged (new TableModelEvent (this, firstRow, lastRow,
+                                           TableModelEvent.ALL_COLUMNS,
+                                           TableModelEvent.INSERT));
   }
 
   /**
-   * Sends a {@link TableModelEvent} to all registered listeners to inform
-   * them that some rows have been updated.
-   * 
-   * @param firstRow  the index of the first row.
-   * @param lastRow  the index of the last row.
+   * fireTableRowsUpdated
+   * @param value0 TODO
+   * @param value1 TODO
    */
   public void fireTableRowsUpdated (int firstRow, int lastRow)
   {
-    fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
-                                         TableModelEvent.ALL_COLUMNS,
-                                         TableModelEvent.UPDATE));
+    fireTableChanged (new TableModelEvent (this, firstRow, lastRow,
+                                           TableModelEvent.ALL_COLUMNS,
+                                           TableModelEvent.UPDATE));
   }
 
   /**
-   * Sends a {@link TableModelEvent} to all registered listeners to inform
-   * them that some rows have been deleted from the model.
-   * 
-   * @param firstRow  the index of the first row.
-   * @param lastRow  the index of the last row.
+   * fireTableRowsDeleted
+   * @param value0 TODO
+   * @param value1 TODO
    */
   public void fireTableRowsDeleted(int firstRow, int lastRow)
   {
-    fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
-                                         TableModelEvent.ALL_COLUMNS,
-                                         TableModelEvent.DELETE));
+    fireTableChanged (new TableModelEvent (this, firstRow, lastRow,
+                                           TableModelEvent.ALL_COLUMNS,
+                                           TableModelEvent.DELETE));
   }
 
   /**
-   * Sends a {@link TableModelEvent} to all registered listeners to inform
-   * them that a single cell has been updated.
-   * 
-   * @param row  the row index.
-   * @param column  the column index.
+   * fireTableCellUpdated
+   * @param value0 TODO
+   * @param value1 TODO
    */
   public void fireTableCellUpdated (int row, int column)
   {
-    fireTableChanged(new TableModelEvent(this, row, row, column));
+    fireTableChanged (new TableModelEvent (this, row, row, column));
   }
 
   /**
-   * Sends the specified event to all registered listeners.
-   * 
-   * @param event  the event to send.
+   * fireTableChanged
+   * @param value0 TODO
    */
-  public void fireTableChanged(TableModelEvent event)
+  public void fireTableChanged (TableModelEvent event)
   {
     int	index;
     TableModelListener listener;
@@ -287,15 +264,12 @@
   }
 
   /**
-   * Returns an array of listeners of the given type that are registered with
-   * this model.
-   * 
-   * @param listenerType  the listener class.
-   * 
-   * @return An array of listeners (possibly empty).
+   * getListeners
+   * @param value0 TODO
+   * @return EventListener[]
    */
-  public EventListener[] getListeners(Class listenerType)
+  public EventListener[] getListeners (Class listenerType)
   {
-    return listenerList.getListeners(listenerType);
+    return listenerList.getListeners (listenerType);
   }
 }
