This patch (committed) fixes some formatting issues in javax.swing.table.*:

2006-05-17  David Gilbert  <[EMAIL PROTECTED]>

        * javax/swing/table/AbstractTableModel.java: Formatting fixes,
        * javax/swing/table/DefaultTableModel.java: Likewise,
        * javax/swing/table/TableCellEditor.java: Likewise,
        * javax/swing/table/TableCellRenderer.java: Likewise.

Regards,

Dave
Index: javax/swing/table/AbstractTableModel.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/table/AbstractTableModel.java,v
retrieving revision 1.14
diff -u -r1.14 AbstractTableModel.java
--- javax/swing/table/AbstractTableModel.java   2 Jul 2005 20:32:51 -0000       
1.14
+++ javax/swing/table/AbstractTableModel.java   17 May 2006 20:48:33 -0000
@@ -1,5 +1,5 @@
 /* AbstractTableModel.java --
-   Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005, 2006,  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -83,7 +83,7 @@
     StringBuffer buffer = new StringBuffer();
     while (columnIndex >= 0)
       {
-        buffer.insert (0, (char) ('A' + columnIndex % 26));
+        buffer.insert(0, (char) ('A' + columnIndex % 26));
         columnIndex = columnIndex / 26 - 1;
       }
     return buffer.toString();
@@ -221,7 +221,7 @@
    * @param firstRow  the index of the first row.
    * @param lastRow  the index of the last row.
    */
-  public void fireTableRowsInserted (int firstRow, int lastRow)
+  public void fireTableRowsInserted(int firstRow, int lastRow)
   {
     fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
                                          TableModelEvent.ALL_COLUMNS,
@@ -235,7 +235,7 @@
    * @param firstRow  the index of the first row.
    * @param lastRow  the index of the last row.
    */
-  public void fireTableRowsUpdated (int firstRow, int lastRow)
+  public void fireTableRowsUpdated(int firstRow, int lastRow)
   {
     fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
                                          TableModelEvent.ALL_COLUMNS,
@@ -263,7 +263,7 @@
    * @param row  the row index.
    * @param column  the column index.
    */
-  public void fireTableCellUpdated (int row, int column)
+  public void fireTableCellUpdated(int row, int column)
   {
     fireTableChanged(new TableModelEvent(this, row, row, column));
   }
@@ -282,7 +282,7 @@
     for (index = 0; index < list.length; index += 2)
       {
         listener = (TableModelListener) list [index + 1];
-        listener.tableChanged (event);
+        listener.tableChanged(event);
       }
   }
 
Index: javax/swing/table/DefaultTableModel.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/table/DefaultTableModel.java,v
retrieving revision 1.15
diff -u -r1.15 DefaultTableModel.java
--- javax/swing/table/DefaultTableModel.java    8 May 2006 13:37:49 -0000       
1.15
+++ javax/swing/table/DefaultTableModel.java    17 May 2006 20:48:34 -0000
@@ -1,5 +1,5 @@
 /* DefaultTableModel.java --
-   Copyright (C) 2002, 2004, 2005,  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005, 2006, Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -249,7 +249,7 @@
   public void setColumnIdentifiers(Vector columnIdentifiers) 
   {
     this.columnIdentifiers = columnIdentifiers;
-    setColumnCount((columnIdentifiers == null ? 0 : columnIdentifiers.size()));
+    setColumnCount(columnIdentifiers == null ? 0 : columnIdentifiers.size());
   }
   
   /**
@@ -289,13 +289,13 @@
     if (rowCount < existingRowCount) 
     {
       dataVector.setSize(rowCount);
-      fireTableRowsDeleted(rowCount,existingRowCount-1);      
+      fireTableRowsDeleted(rowCount, existingRowCount - 1);      
     }
     else 
     {
       int rowsToAdd = rowCount - existingRowCount;
       addExtraRows(rowsToAdd, columnIdentifiers.size());
-      fireTableRowsInserted(existingRowCount,rowCount-1);
+      fireTableRowsInserted(existingRowCount, rowCount - 1);
     }
   }
 
@@ -353,7 +353,8 @@
    * @param columnName the column name (<code>null</code> permitted).
    * @param columnData the column data.
    */
-  public void addColumn(Object columnName, Object[] columnData) {
+  public void addColumn(Object columnName, Object[] columnData) 
+  {
     if (columnData != null)
     {
       // check columnData array for cases where the number of items
@@ -384,7 +385,8 @@
    * 
    * @param rowData the row data (<code>null</code> permitted).
    */
-  public void addRow(Vector rowData) {
+  public void addRow(Vector rowData) 
+  {
     int rowIndex = dataVector.size();
     dataVector.add(rowData);
     newRowsAdded(new TableModelEvent(
@@ -398,7 +400,8 @@
    * 
    * @param rowData the row data (<code>null</code> permitted).
    */
-  public void addRow(Object[] rowData) {
+  public void addRow(Object[] rowData) 
+  {
     addRow(convertToVector(rowData));
   }
 
@@ -408,9 +411,10 @@
    * @param row the row index.
    * @param rowData the row data.
    */
-  public void insertRow(int row, Vector rowData) {
+  public void insertRow(int row, Vector rowData) 
+  {
     dataVector.add(row, rowData);
-    fireTableRowsInserted(row,row);
+    fireTableRowsInserted(row, row);
   }
 
   /**
@@ -419,7 +423,8 @@
    * @param row the row index.
    * @param rowData the row data.
    */
-  public void insertRow(int row, Object[] rowData) {
+  public void insertRow(int row, Object[] rowData) 
+  {
     insertRow(row, convertToVector(rowData));
   }
 
@@ -431,7 +436,8 @@
    * @param endIndex the end row.
    * @param toIndex the row to move to.
    */
-  public void moveRow(int startIndex, int endIndex, int toIndex) {
+  public void moveRow(int startIndex, int endIndex, int toIndex) 
+  {
     Vector removed = new Vector();
     for (int i = endIndex; i >= startIndex; i--)
     {
@@ -452,9 +458,10 @@
    * 
    * @param row the row index.
    */
-  public void removeRow(int row) {
+  public void removeRow(int row) 
+  {
     dataVector.remove(row);
-    fireTableRowsDeleted(row,row);
+    fireTableRowsDeleted(row, row);
   }
 
   /**
@@ -462,7 +469,8 @@
    * 
    * @return The row count.
    */
-  public int getRowCount() {
+  public int getRowCount() 
+  {
     return dataVector.size();
   }
 
@@ -471,8 +479,9 @@
    * 
    * @return The column count.
    */
-  public int getColumnCount() {
-    return (columnIdentifiers == null ? 0 : columnIdentifiers.size());
+  public int getColumnCount() 
+  {
+    return columnIdentifiers == null ? 0 : columnIdentifiers.size();
   }
 
   /**
@@ -485,7 +494,8 @@
    * 
    * @return The column name.
    */
-  public String getColumnName(int column) {
+  public String getColumnName(int column)
+  {
     String result = "";
     if (columnIdentifiers == null) 
       result = super.getColumnName(column);
@@ -516,7 +526,8 @@
    * 
    * @return <code>true</code> in all cases.
    */
-  public boolean isCellEditable(int row, int column) {
+  public boolean isCellEditable(int row, int column) 
+  {
     return true;
   }
 
@@ -529,7 +540,8 @@
    * @return The value (<code>Object</code>, possibly <code>null</code>) at 
    *         the specified cell in the table.
    */
-  public Object getValueAt(int row, int column) {
+  public Object getValueAt(int row, int column) 
+  {
     return ((Vector) dataVector.get(row)).get(column);
   }
 
@@ -541,9 +553,10 @@
    * @param row the row index.
    * @param column the column index.
    */
-  public void setValueAt(Object value, int row, int column) {
+  public void setValueAt(Object value, int row, int column) 
+  {
     ((Vector) dataVector.get(row)).set(column, value);
-    fireTableCellUpdated(row,column);
+    fireTableCellUpdated(row, column);
   }
 
   /**
@@ -554,7 +567,8 @@
    * @return A vector (or <code>null</code> if the data array 
    *         is <code>null</code>).
    */
-  protected static Vector convertToVector(Object[] data) {
+  protected static Vector convertToVector(Object[] data) 
+  {
     if (data == null)
       return null;
     Vector vector = new Vector(data.length);
@@ -571,7 +585,8 @@
    * @return A vector (or <code>null</code> if the data array 
    *         is <code>null</code>.
    */
-  protected static Vector convertToVector(Object[][] data) {
+  protected static Vector convertToVector(Object[][] data) 
+  {
     if (data == null)
       return null;
     Vector vector = new Vector(data.length);
Index: javax/swing/table/TableCellEditor.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/table/TableCellEditor.java,v
retrieving revision 1.5
diff -u -r1.5 TableCellEditor.java
--- javax/swing/table/TableCellEditor.java      2 Jul 2005 20:32:51 -0000       
1.5
+++ javax/swing/table/TableCellEditor.java      17 May 2006 20:48:34 -0000
@@ -47,19 +47,19 @@
  * TableCellEditor public interface
  * @author Andrew Selkirk
  */
-public interface TableCellEditor extends CellEditor {
+public interface TableCellEditor extends CellEditor 
+{
 
-       /**
-        * Get table cell editor component
-        * @param table JTable
-        * @param value Value of cell
-        * @param isSelected Cell selected
-        * @param row Row of cell
-        * @param column Column of cell
-        * @returns Component
-        */
-       Component getTableCellEditorComponent(JTable table,
-                       Object value, boolean isSelected, int row, int column);
+  /**
+   * Get table cell editor component
+   * @param table JTable
+   * @param value Value of cell
+   * @param isSelected Cell selected
+   * @param row Row of cell
+   * @param column Column of cell
+   * @return Component
+   */
+  Component getTableCellEditorComponent(JTable table, Object value, 
+      boolean isSelected, int row, int column);
 
-
-} // TableCellEditor
+}
Index: javax/swing/table/TableCellRenderer.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/table/TableCellRenderer.java,v
retrieving revision 1.5
diff -u -r1.5 TableCellRenderer.java
--- javax/swing/table/TableCellRenderer.java    2 Jul 2005 20:32:51 -0000       
1.5
+++ javax/swing/table/TableCellRenderer.java    17 May 2006 20:48:34 -0000
@@ -46,21 +46,21 @@
  * TableCellRenderer public interface
  * @author Andrew Selkirk
  */
-public interface TableCellRenderer {
+public interface TableCellRenderer 
+{
 
-       /**
-        * Get table cell renderer component
-        * @param table JTable
-        * @param value Value of cell
-        * @param isSelected Cell selected
-        * @param hasFocus Cell has focus
-        * @param row Row of cell
-        * @param column Column of cell
-        * @returns Component
-        */
-       Component getTableCellRendererComponent(JTable table,
-                       Object value, boolean isSelected, boolean hasFocus,
-                       int row, int column);
+  /**
+   * Get table cell renderer component
+   * @param table JTable
+   * @param value Value of cell
+   * @param isSelected Cell selected
+   * @param hasFocus Cell has focus
+   * @param row Row of cell
+   * @param column Column of cell
+   * @return Component
+   */
+  Component getTableCellRendererComponent(JTable table, Object value, 
+      boolean isSelected, boolean hasFocus, int row, int column);
 
 
-} // TableCellRenderer
+}

Reply via email to