This patch (committed) fixes a few source formatting problems highlighted by 
Checkstyle:

2006-07-01  David Gilbert  <[EMAIL PROTECTED]>

        * javax/swing/AbstractCellEditor.java: Source code formatting,
        * javax/swing/AbstractSpinnerModel.java: Likewise,
        * javax/swing/Box.java: Likewise,
        * javax/swing/BoxLayout.java: Likewise,
        * javax/swing/DefaultListModel.java: Likewise,
        * javax/swing/GrayFilter.java: Likewise,
        * javax/swing/LookAndFeel.java: Likewise,
        * javax/swing/ProgressMonitor.java: Likewise,
        * javax/swing/ProgressMonitorInputStream.java: Likewise,
        * javax/swing/ScrollPaneLayout.java: Likewise,
        * javax/swing/SpringLayout.java: Likewise,
        * javax/swing/event/EventListenerList.java: Likewise,
        * javax/swing/event/MenuEvent.java: Likewise,
        * javax/swing/event/TreeExpansionListener.java: Likewise.

Regards,

Dave
Index: javax/swing/AbstractCellEditor.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/AbstractCellEditor.java,v
retrieving revision 1.14
diff -u -r1.14 AbstractCellEditor.java
--- javax/swing/AbstractCellEditor.java 3 Mar 2006 11:15:02 -0000       1.14
+++ javax/swing/AbstractCellEditor.java 1 Jul 2006 21:25:46 -0000
@@ -134,9 +134,9 @@
    *
    * @param listener the CellEditorListener to add
    */
-  public void addCellEditorListener (CellEditorListener listener)
+  public void addCellEditorListener(CellEditorListener listener)
   {
-    listenerList.add (CellEditorListener.class, listener);
+    listenerList.add(CellEditorListener.class, listener);
   }
 
   /**
@@ -145,9 +145,9 @@
    *
    * @param listener the CellEditorListener to remove
    */
-  public void removeCellEditorListener (CellEditorListener listener)
+  public void removeCellEditorListener(CellEditorListener listener)
   {
-    listenerList.remove (CellEditorListener.class, listener);
+    listenerList.remove(CellEditorListener.class, listener);
   }
        
   /**
@@ -161,8 +161,8 @@
    */
   public CellEditorListener[] getCellEditorListeners()
   {
-    return (CellEditorListener[]) listenerList.getListeners
-      (CellEditorListener.class);
+    return (CellEditorListener[]) listenerList.getListeners(
+        CellEditorListener.class);
   }
 
   /**
Index: javax/swing/AbstractSpinnerModel.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/AbstractSpinnerModel.java,v
retrieving revision 1.5
diff -u -r1.5 AbstractSpinnerModel.java
--- javax/swing/AbstractSpinnerModel.java       19 Oct 2005 15:45:03 -0000      
1.5
+++ javax/swing/AbstractSpinnerModel.java       1 Jul 2006 21:25:46 -0000
@@ -113,7 +113,7 @@
   {
     ChangeListener[] listeners = getChangeListeners();
 
-    for(int i = 0; i < listeners.length; ++i)
+    for (int i = 0; i < listeners.length; ++i)
       listeners[i].stateChanged(changeEvent);
   }
 }
Index: javax/swing/Box.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/Box.java,v
retrieving revision 1.20
diff -u -r1.20 Box.java
--- javax/swing/Box.java        19 Oct 2005 15:45:03 -0000      1.20
+++ javax/swing/Box.java        1 Jul 2006 21:25:46 -0000
@@ -196,9 +196,8 @@
    */
   public static Component createGlue()
   {
-    Filler glue = new Filler(new Dimension(0,0), new Dimension(0,0),
-                             new Dimension(Short.MAX_VALUE,Short.MAX_VALUE)
-                             );
+    Filler glue = new Filler(new Dimension(0, 0), new Dimension(0, 0),
+                             new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
     return glue;
   }
   
@@ -216,9 +215,8 @@
    */
   public static Component createHorizontalGlue()
   {
-    Filler glue = new Filler(new Dimension(0,0), new Dimension(0,0),
-                             new Dimension(Short.MAX_VALUE, 0)
-                             );
+    Filler glue = new Filler(new Dimension(0, 0), new Dimension(0, 0),
+                             new Dimension(Short.MAX_VALUE, 0));
     return glue;
   }
   
Index: javax/swing/BoxLayout.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/BoxLayout.java,v
retrieving revision 1.27
diff -u -r1.27 BoxLayout.java
--- javax/swing/BoxLayout.java  6 Dec 2005 21:26:38 -0000       1.27
+++ javax/swing/BoxLayout.java  1 Jul 2006 21:25:46 -0000
@@ -426,7 +426,7 @@
 
         Insets in = container.getInsets();
         int width = container.getWidth() - in.left - in.right;
-        int height = container.getHeight() - in.top -in.bottom;
+        int height = container.getHeight() - in.top - in.bottom;
 
         if (isHorizontalIn(container))
           {
Index: javax/swing/DefaultListModel.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/DefaultListModel.java,v
retrieving revision 1.12
diff -u -r1.12 DefaultListModel.java
--- javax/swing/DefaultListModel.java   27 Jul 2005 12:41:33 -0000      1.12
+++ javax/swing/DefaultListModel.java   1 Jul 2006 21:25:47 -0000
@@ -184,7 +184,7 @@
 
   /**
    * Inserts an element at a particular index in the list. Each element at
-   * index <code>i >= index</code> is shifted to position <code>i+1</code>.
+   * index <code>i >= index</code> is shifted to position <code>i + 1</code>.
    * If <code>index</code> is equal to <code>size()</code>, this is
    * equivalent to appending an element to the array. Any
    * <code>index</code> greater than <code>size()</code> is illegal.
@@ -420,7 +420,7 @@
 
   /**
    * Inserts an element at a particular index in the list. Each element at
-   * index <code>i >= index</code> is shifted to position <code>i+1</code>.
+   * index <code>i >= index</code> is shifted to position <code>i + 1</code>.
    * If <code>index</code> is equal to <code>size()</code>, this is
    * equivalent to appending an element to the array. Any
    * <code>index</code> greater than <code>size()</code> is illegal.
Index: javax/swing/GrayFilter.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/GrayFilter.java,v
retrieving revision 1.10
diff -u -r1.10 GrayFilter.java
--- javax/swing/GrayFilter.java 27 Jul 2005 12:41:33 -0000      1.10
+++ javax/swing/GrayFilter.java 1 Jul 2006 21:25:47 -0000
@@ -76,9 +76,8 @@
    */
   public static Image createDisabledImage(Image src)
   {
-    return (Toolkit.getDefaultToolkit().
-           createImage(new FilteredImageSource(src.getSource(),
-                                               new GrayFilter(true, 0))));
+    return (Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(
+        src.getSource(), new GrayFilter(true, 0))));
   }
   
   /**
Index: javax/swing/LookAndFeel.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/LookAndFeel.java,v
retrieving revision 1.18
diff -u -r1.18 LookAndFeel.java
--- javax/swing/LookAndFeel.java        5 Apr 2006 15:10:23 -0000       1.18
+++ javax/swing/LookAndFeel.java        1 Jul 2006 21:25:47 -0000
@@ -242,15 +242,15 @@
   {
     if (keys == null)
       return;
-    for (int i = 0; i < keys.length - 1; i+= 2)
+    for (int i = 0; i < keys.length - 1; i += 2)
       {
         Object key = keys[i];
         KeyStroke keyStroke;
         if (key instanceof KeyStroke)
-          keyStroke = (KeyStroke)key;
+          keyStroke = (KeyStroke) key;
         else
-          keyStroke = KeyStroke.getKeyStroke((String)key);
-        retMap.put(keyStroke, keys[i+1]);
+          keyStroke = KeyStroke.getKeyStroke((String) key);
+        retMap.put(keyStroke, keys[i + 1]);
       }
   }
 
@@ -328,15 +328,15 @@
   {
     JTextComponent.KeyBinding[] retBindings = 
       new JTextComponent.KeyBinding[keyBindingList.length / 2];
-    for (int i = 0; i < keyBindingList.length - 1; i+= 2)
+    for (int i = 0; i < keyBindingList.length - 1; i += 2)
       {
         KeyStroke stroke;
         if (keyBindingList[i] instanceof KeyStroke)
-          stroke = (KeyStroke)keyBindingList[i];
+          stroke = (KeyStroke) keyBindingList[i];
         else
-          stroke = KeyStroke.getKeyStroke((String)keyBindingList[i]);
-        retBindings[i/2] = new JTextComponent.KeyBinding(stroke, 
-            (String) keyBindingList[i+1]);
+          stroke = KeyStroke.getKeyStroke((String) keyBindingList[i]);
+        retBindings[i / 2] = new JTextComponent.KeyBinding(stroke, 
+            (String) keyBindingList[i + 1]);
       }
     return retBindings;
   }
Index: javax/swing/ProgressMonitor.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/ProgressMonitor.java,v
retrieving revision 1.8
diff -u -r1.8 ProgressMonitor.java
--- javax/swing/ProgressMonitor.java    16 May 2006 17:43:50 -0000      1.8
+++ javax/swing/ProgressMonitor.java    1 Jul 2006 21:25:47 -0000
@@ -142,12 +142,12 @@
    */
   public void close()
   {
-    if ( progressDialog != null )
+    if (progressDialog != null)
       {
         progressDialog.setVisible(false);
       }
 
-    if ( timer != null )
+    if (timer != null)
       {
         timer.stop();
         timer = null;
@@ -173,7 +173,7 @@
     // Initializes and starts a timer with a task
     // which measures the duration and displays
     // a progress dialog if neccessary.
-    if ( timer == null && progressDialog == null )
+    if (timer == null && progressDialog == null)
       {
         timer = new Timer(25, null);
         timer.addActionListener(new TimerListener());
@@ -182,7 +182,7 @@
 
     // Cancels timer and hides progress dialog if the
     // maximum value is reached.
-    if ( progressBar != null && this.progress >= progressBar.getMaximum() )
+    if (progressBar != null && this.progress >= progressBar.getMaximum())
       {
         // The reason for using progressBar.getMaximum() instead of max is that
         // we want to prevent that changes to the value have any effect after 
the
@@ -326,7 +326,7 @@
    */
   public void setNote(String note)
   {
-    if ( noteLabel != null )
+    if (noteLabel != null)
       {
         noteLabel.setText(note);
       }
@@ -401,18 +401,18 @@
     {
        long now = System.currentTimeMillis();
 
-       if ( first )
+       if (first)
        {
-         if (( now - timestamp ) > millisToDecideToPopup )
+         if ((now - timestamp) > millisToDecideToPopup)
          {
            first = false;
 
 
-           long expected = ( progress - min == 0 ) ? 
-            ( now - timestamp ) * ( max - min ) : 
-            ( now - timestamp ) * ( max - min ) / ( progress - min );
+           long expected = (progress - min == 0) ? 
+            (now - timestamp) * (max - min) : 
+            (now - timestamp) * (max - min) / (progress - min);
 
-           if ( expected > millisToPopup )
+           if (expected > millisToPopup)
            {
              createDialog();
            }
@@ -424,14 +424,14 @@
            return;
          }
        }
-       else if ( progressDialog != null )
+       else if (progressDialog != null)
        {
          // The progress dialog is being displayed. We now calculate
          // whether setting the progress bar to the current progress
          // value would result in a visual difference. 
          int delta = progress - progressBar.getValue();
 
-         if ( ( delta * progressBar.getWidth() / (max - min) ) > 0 )
+         if ((delta * progressBar.getWidth() / (max - min)) > 0)
          {
            // At least one pixel would change.
            progressBar.setValue(progress);
Index: javax/swing/ProgressMonitorInputStream.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/ProgressMonitorInputStream.java,v
retrieving revision 1.7
diff -u -r1.7 ProgressMonitorInputStream.java
--- javax/swing/ProgressMonitorInputStream.java 8 Mar 2006 16:46:09 -0000       
1.7
+++ javax/swing/ProgressMonitorInputStream.java 1 Jul 2006 21:25:47 -0000
@@ -240,7 +240,7 @@
 
   private void checkMonitorCanceled() throws InterruptedIOException
   {
-    if ( monitor.isCanceled() )
+    if (monitor.isCanceled())
       {
         throw new InterruptedIOException("ProgressMonitor was canceled");
       }
Index: javax/swing/ScrollPaneLayout.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/ScrollPaneLayout.java,v
retrieving revision 1.24
diff -u -r1.24 ScrollPaneLayout.java
--- javax/swing/ScrollPaneLayout.java   2 May 2006 20:31:08 -0000       1.24
+++ javax/swing/ScrollPaneLayout.java   1 Jul 2006 21:25:48 -0000
@@ -82,7 +82,8 @@
        // Nothing to do here.
   }
 
-  public void syncWithScrollPane(JScrollPane scrollPane) {
+  public void syncWithScrollPane(JScrollPane scrollPane) 
+  {
     viewport = scrollPane.getViewport();
     rowHead = scrollPane.getRowHeader();
     colHead = scrollPane.getColumnHeader();
@@ -145,7 +146,8 @@
       throw new IllegalArgumentException();
   }
 
-  public void removeLayoutComponent(Component component) {
+  public void removeLayoutComponent(Component component) 
+  {
     if (component == viewport)
       viewport = null;
     else if (component == vsb)
@@ -448,7 +450,8 @@
    * @deprecated As of Swing 1.1 replaced by
    *     [EMAIL PROTECTED] javax.swing.JScrollPane#getViewportBorderBounds}.
    */
-  public Rectangle getViewportBorderBounds(JScrollPane scrollPane) {
+  public Rectangle getViewportBorderBounds(JScrollPane scrollPane) 
+  {
     return null;
   }
 
Index: javax/swing/SpringLayout.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/SpringLayout.java,v
retrieving revision 1.10
diff -u -r1.10 SpringLayout.java
--- javax/swing/SpringLayout.java       17 Mar 2006 18:15:09 -0000      1.10
+++ javax/swing/SpringLayout.java       1 Jul 2006 21:25:48 -0000
@@ -505,7 +505,7 @@
     }
   }
 
-  private static abstract class DeferredDimension extends Spring
+  private abstract static class DeferredDimension extends Spring
   {
     private int value;
 
Index: javax/swing/event/EventListenerList.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/event/EventListenerList.java,v
retrieving revision 1.16
diff -u -r1.16 EventListenerList.java
--- javax/swing/event/EventListenerList.java    31 May 2006 05:10:03 -0000      
1.16
+++ javax/swing/event/EventListenerList.java    1 Jul 2006 21:25:48 -0000
@@ -108,7 +108,7 @@
    * An array with all currently registered listeners.  The array has
    * twice as many elements as there are listeners.  For an even
    * integer <code>i</code>, <code>listenerList[i]</code> indicates
-   * the registered class, and <code>listenerList[i+1]</code> is the
+   * the registered class, and <code>listenerList[i + 1]</code> is the
    * listener.
    */
   protected transient Object[] listenerList = NO_LISTENERS;
Index: javax/swing/event/MenuEvent.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/event/MenuEvent.java,v
retrieving revision 1.3
diff -u -r1.3 MenuEvent.java
--- javax/swing/event/MenuEvent.java    2 Jul 2005 20:32:50 -0000       1.3
+++ javax/swing/event/MenuEvent.java    1 Jul 2006 21:25:48 -0000
@@ -1,5 +1,5 @@
 /* MenuEvent.java --
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2006, Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -37,7 +37,6 @@
 
 package javax.swing.event;
 
-// Imports
 import java.util.EventObject;
 
 /**
@@ -45,15 +44,16 @@
  * @author Andrew Selkirk
  * @author Ronald Veldema
  */
-public class MenuEvent extends EventObject {
+public class MenuEvent extends EventObject 
+{
 
-       /**
-        * Constructor MenuEvent
-        * @param source Source object
-        */
-       public MenuEvent(Object source) {
-               super(source);
-       } // MenuEvent()
+  /**
+   * Constructor MenuEvent
+   * @param source Source object
+   */
+  public MenuEvent(Object source) 
+  {
+    super(source);
+  }
 
-
-} // MenuEvent
+}
Index: javax/swing/event/TreeExpansionListener.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/event/TreeExpansionListener.java,v
retrieving revision 1.4
diff -u -r1.4 TreeExpansionListener.java
--- javax/swing/event/TreeExpansionListener.java        2 Jul 2005 20:32:50 
-0000       1.4
+++ javax/swing/event/TreeExpansionListener.java        1 Jul 2006 21:25:49 
-0000
@@ -37,26 +37,26 @@
 
 package javax.swing.event;
 
-// Imports
 import java.util.EventListener;
 
 /**
  * TreeExpansionListener public interface
  * @author Andrew Selkirk
  */
-public interface TreeExpansionListener extends EventListener {
+public interface TreeExpansionListener extends EventListener 
+{
 
-       /**
-        * Tree collapsed
-        * @param event Tree Expansion Event
-        */
-       void treeCollapsed(TreeExpansionEvent event);
+  /**
+   * Tree collapsed
+   * @param event Tree Expansion Event
+   */
+  void treeCollapsed(TreeExpansionEvent event);
 
-       /**
-        * Tree expanded
-        * @param event Tree Expansion Event
-        */
-       void treeExpanded(TreeExpansionEvent event);
+  /**
+   * Tree expanded
+   * @param event Tree Expansion Event
+   */
+  void treeExpanded(TreeExpansionEvent event);
 
 
-} // TreeExpansionListener
+}

Reply via email to