[cp-patches] FYI: Fixed Checkstyle warnings in javax.swing.plaf.basic.*

David Gilbert david.gilbert at object-refinery.com
Tue Jun 13 09:30:39 UTC 2006


This patch (committed) fixes some Checkstyle warnings regarding source code 
formattings in javax.swing.plaf.basic.*:

2006-06-13  David Gilbert  <david.gilbert at object-refinery.com>

	* javax/swing/plaf/basic/BasicCheckBoxUI.java: Source code formatting
	changes only,
	* javax/swing/plaf/basic/BasicComboBoxUI.java: Likewise,
	* javax/swing/plaf/basic/BasicComboPopup.java: Likewise,
	* javax/swing/plaf/basic/BasicFileChooserUI.java: Likewise,
	* javax/swing/plaf/basic/BasicInternalFrameUI.java: Likewise,
	* javax/swing/plaf/basic/BasicLookAndFeel.java: Likewise,
	* javax/swing/plaf/basic/BasicMenuItemUI.java: Likewise,
	* javax/swing/plaf/basic/BasicOptionPaneUI.java: Likewise,
	* javax/swing/plaf/basic/BasicProgressBarUI.java: Likewise,
	* javax/swing/plaf/basic/BasicRadioButtonUI.java: Likewise,
	* javax/swing/plaf/basic/BasicScrollBarUI.java: Likewise,
	* javax/swing/plaf/basic/BasicSliderUI.java: Likewise,
	* javax/swing/plaf/basic/BasicTableHeaderUI.java: Likewise,
	* javax/swing/plaf/basic/BasicTableUI.java: Likewise,
	* javax/swing/plaf/basic/BasicTextUI.java: Likewise,
	* javax/swing/plaf/basic/BasicToolBarUI.java: Likewise,
	* javax/swing/plaf/basic/BasicTreeUI.java: Likewise.

Regards,

Dave
-------------- next part --------------
Index: javax/swing/plaf/basic/BasicCheckBoxUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicCheckBoxUI.java,v
retrieving revision 1.14
diff -u -r1.14 BasicCheckBoxUI.java
--- javax/swing/plaf/basic/BasicCheckBoxUI.java	11 May 2006 09:25:18 -0000	1.14
+++ javax/swing/plaf/basic/BasicCheckBoxUI.java	13 Jun 2006 09:15:23 -0000
@@ -57,7 +57,8 @@
    *     
    * @return A new instance of <code>BasicCheckBoxUI</code>.
    */
-  public static ComponentUI createUI(JComponent c)  {
+  public static ComponentUI createUI(JComponent c)
+  {
     return new BasicCheckBoxUI();
   }
 
Index: javax/swing/plaf/basic/BasicComboBoxUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,v
retrieving revision 1.36
diff -u -r1.36 BasicComboBoxUI.java
--- javax/swing/plaf/basic/BasicComboBoxUI.java	24 May 2006 17:19:56 -0000	1.36
+++ javax/swing/plaf/basic/BasicComboBoxUI.java	13 Jun 2006 09:15:24 -0000
@@ -921,8 +921,8 @@
     Object prototype = comboBox.getPrototypeDisplayValue();
     if (prototype != null)
       {
-        Component comp = renderer.getListCellRendererComponent
-          (listBox, prototype, -1, false, false);
+        Component comp = renderer.getListCellRendererComponent(listBox, 
+            prototype, -1, false, false);
         currentValuePane.add(comp);
         comp.setFont(comboBox.getFont());
         Dimension renderSize = comp.getPreferredSize();
@@ -938,8 +938,8 @@
           {
             for (int i = 0; i < size; ++i)
               {
-                Component comp = renderer.getListCellRendererComponent
-                (listBox, model.getElementAt(i), -1, false, false);
+                Component comp = renderer.getListCellRendererComponent(listBox, 
+                    model.getElementAt(i), -1, false, false);
                 currentValuePane.add(comp);
                 comp.setFont(comboBox.getFont());
                 Dimension renderSize = comp.getPreferredSize();
Index: javax/swing/plaf/basic/BasicComboPopup.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicComboPopup.java,v
retrieving revision 1.18
diff -u -r1.18 BasicComboPopup.java
--- javax/swing/plaf/basic/BasicComboPopup.java	16 May 2006 18:57:33 -0000	1.18
+++ javax/swing/plaf/basic/BasicComboPopup.java	13 Jun 2006 09:15:25 -0000
@@ -677,7 +677,7 @@
   {
     Point point = SwingUtilities.convertPoint((Component) e.getSource(),
                                               e.getPoint(), list);
-    MouseEvent newEvent= new MouseEvent((Component) e.getSource(),
+    MouseEvent newEvent = new MouseEvent((Component) e.getSource(),
                                         e.getID(), e.getWhen(),
                                         e.getModifiers(), point.x, point.y,
                                         e.getModifiers(),
Index: javax/swing/plaf/basic/BasicFileChooserUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicFileChooserUI.java,v
retrieving revision 1.25
diff -u -r1.25 BasicFileChooserUI.java
--- javax/swing/plaf/basic/BasicFileChooserUI.java	1 Jun 2006 05:17:02 -0000	1.25
+++ javax/swing/plaf/basic/BasicFileChooserUI.java	13 Jun 2006 09:15:26 -0000
@@ -699,10 +699,10 @@
   String fileDescText;
 
   /** Is a directory selected? */
-  boolean dirSelected = false;
+  boolean dirSelected;
 
   /** The current directory. */
-  File currDir = null;
+  File currDir;
 
   // FIXME: describe what is contained in the bottom panel
   /** The bottom panel. */
Index: javax/swing/plaf/basic/BasicInternalFrameUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java,v
retrieving revision 1.37
diff -u -r1.37 BasicInternalFrameUI.java
--- javax/swing/plaf/basic/BasicInternalFrameUI.java	6 Jun 2006 12:21:21 -0000	1.37
+++ javax/swing/plaf/basic/BasicInternalFrameUI.java	13 Jun 2006 09:15:28 -0000
@@ -179,10 +179,10 @@
     protected final int RESIZE_NONE = 0;
 
     /** The x offset from the top left corner of the JInternalFrame. */
-    private transient int xOffset = 0;
+    private transient int xOffset;
 
     /** The y offset from the top left corner of the JInternalFrame. */
-    private transient int yOffset = 0;
+    private transient int yOffset;
 
     /** The direction that the resize is occuring in. */
     private transient int direction = -1;
@@ -314,7 +314,7 @@
           frame.setCursor(Cursor.getDefaultCursor());
           showingCursor = Cursor.DEFAULT_CURSOR;
         }
-      else if (e.getSource()==frame && frame.isResizable())
+      else if (e.getSource() == frame && frame.isResizable())
         {
           setCursor(e);
         }
Index: javax/swing/plaf/basic/BasicLookAndFeel.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v
retrieving revision 1.92
diff -u -r1.92 BasicLookAndFeel.java
--- javax/swing/plaf/basic/BasicLookAndFeel.java	9 Jun 2006 11:17:09 -0000	1.92
+++ javax/swing/plaf/basic/BasicLookAndFeel.java	13 Jun 2006 09:15:31 -0000
@@ -509,7 +509,7 @@
           return BasicIconFactory.getMenuItemCheckIcon();
         }
       },
-      "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2),
+      "CheckBox.margin", new InsetsUIResource(2, 2, 2, 2),
       "CheckBox.textIconGap", new Integer(4),
       "CheckBox.textShiftOffset", new Integer(0),
       "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog",
@@ -599,7 +599,7 @@
         "ctrl F4", "close",
         "KP_DOWN", "down",
         "ctrl F10", "maximize",
-        "ctrl alt shift F6","selectPreviousFrame"
+        "ctrl alt shift F6", "selectPreviousFrame"
       }),
       "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null,
                                                                           null),
@@ -1091,7 +1091,7 @@
       "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
         "PAGE_UP", "scrollUp",
         "KP_LEFT", "unitScrollLeft",
-        "ctrl PAGE_DOWN","scrollRight",
+        "ctrl PAGE_DOWN", "scrollRight",
         "PAGE_DOWN", "scrollDown",
         "KP_RIGHT", "unitScrollRight",
         "LEFT",  "unitScrollLeft",
@@ -1167,7 +1167,7 @@
       "SplitPaneDivider.border", BasicBorders.getSplitPaneDividerBorder(),
       "SplitPaneDivider.draggingColor", new ColorUIResource(Color.DARK_GRAY),
       "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
-        "ctrl PAGE_DOWN","navigatePageDown",
+        "ctrl PAGE_DOWN", "navigatePageDown",
         "ctrl PAGE_UP", "navigatePageUp",
         "ctrl UP", "requestFocus",
         "ctrl KP_UP", "requestFocus"
@@ -1220,13 +1220,13 @@
         "COPY", "copy",
         "ctrl KP_UP", "selectPreviousRowChangeLead",
         "PASTE", "paste",
-        "shift PAGE_DOWN","scrollDownExtendSelection",
+        "shift PAGE_DOWN", "scrollDownExtendSelection",
         "PAGE_DOWN", "scrollDownChangeSelection",
         "END",  "selectLastColumn",
         "shift END", "selectLastColumnExtendSelection",
         "HOME",  "selectFirstColumn",
         "ctrl END", "selectLastRow",
-        "ctrl shift END","selectLastRowExtendSelection",
+        "ctrl shift END", "selectLastRowExtendSelection",
         "LEFT",  "selectPreviousColumn",
         "shift HOME", "selectFirstColumnExtendSelection",
         "UP",  "selectPreviousRow",
@@ -1234,7 +1234,7 @@
         "ctrl HOME", "selectFirstRow",
         "shift LEFT", "selectPreviousColumnExtendSelection",
         "DOWN",  "selectNextRow",
-        "ctrl shift HOME","selectFirstRowExtendSelection",
+        "ctrl shift HOME", "selectFirstRowExtendSelection",
         "shift UP", "selectPreviousRowExtendSelection",
         "F2",  "startEditing",
         "shift RIGHT", "selectNextColumnExtendSelection",
Index: javax/swing/plaf/basic/BasicMenuItemUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java,v
retrieving revision 1.46
diff -u -r1.46 BasicMenuItemUI.java
--- javax/swing/plaf/basic/BasicMenuItemUI.java	29 Mar 2006 14:22:41 -0000	1.46
+++ javax/swing/plaf/basic/BasicMenuItemUI.java	13 Jun 2006 09:15:32 -0000
@@ -239,9 +239,10 @@
     {
       if (e.getPropertyName() == "accelerator")
         {
-          InputMap map = SwingUtilities.getUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW);
+          InputMap map = SwingUtilities.getUIInputMap(menuItem, 
+              JComponent.WHEN_IN_FOCUSED_WINDOW);
           if (map != null)
-            map.remove((KeyStroke)e.getOldValue());
+            map.remove((KeyStroke) e.getOldValue());
           else
             map = new ComponentInputMapUIResource(menuItem);
 
@@ -499,7 +500,8 @@
    */
   public Dimension getPreferredSize(JComponent c)
   {
-    return getPreferredMenuItemSize(c, checkIcon, arrowIcon, defaultTextIconGap);
+    return getPreferredMenuItemSize(c, checkIcon, arrowIcon, 
+                                    defaultTextIconGap);
   }
 
   /**
@@ -535,8 +537,10 @@
                                      prefix + ".foreground", prefix + ".font");
     menuItem.setMargin(UIManager.getInsets(prefix + ".margin"));
     acceleratorFont = UIManager.getFont(prefix + ".acceleratorFont");
-    acceleratorForeground = UIManager.getColor(prefix + ".acceleratorForeground");
-    acceleratorSelectionForeground = UIManager.getColor(prefix + ".acceleratorSelectionForeground");
+    acceleratorForeground = UIManager.getColor(prefix 
+        + ".acceleratorForeground");
+    acceleratorSelectionForeground = UIManager.getColor(prefix 
+        + ".acceleratorSelectionForeground");
     selectionBackground = UIManager.getColor(prefix + ".selectionBackground");
     selectionForeground = UIManager.getColor(prefix + ".selectionForeground");
     acceleratorDelimiter = UIManager.getString(prefix + ".acceleratorDelimiter");
@@ -551,13 +555,15 @@
    */
   protected void installKeyboardActions()
   {
-    InputMap focusedWindowMap = SwingUtilities.getUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW);
+    InputMap focusedWindowMap = SwingUtilities.getUIInputMap(menuItem, 
+        JComponent.WHEN_IN_FOCUSED_WINDOW);
     if (focusedWindowMap == null)
       focusedWindowMap = new ComponentInputMapUIResource(menuItem);
     KeyStroke accelerator = menuItem.getAccelerator();
     if (accelerator != null)
       focusedWindowMap.put(accelerator, "doClick");
-    SwingUtilities.replaceUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW, focusedWindowMap);
+    SwingUtilities.replaceUIInputMap(menuItem, 
+        JComponent.WHEN_IN_FOCUSED_WINDOW, focusedWindowMap);
     
     ActionMap UIActionMap = SwingUtilities.getUIActionMap(menuItem);
     if (UIActionMap == null)
@@ -1268,8 +1274,8 @@
     Insets insets = m.getInsets();
     viewRect.x += insets.left;
     viewRect.y += insets.top;
-    viewRect.width -= (insets.left + insets.right);
-    viewRect.height -= (insets.top + insets.bottom);
+    viewRect.width -= insets.left + insets.right;
+    viewRect.height -= insets.top + insets.bottom;
 
     // Fetch the fonts.
     Font font = m.getFont();
Index: javax/swing/plaf/basic/BasicOptionPaneUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java,v
retrieving revision 1.30
diff -u -r1.30 BasicOptionPaneUI.java
--- javax/swing/plaf/basic/BasicOptionPaneUI.java	1 Jun 2006 05:17:02 -0000	1.30
+++ javax/swing/plaf/basic/BasicOptionPaneUI.java	13 Jun 2006 09:15:34 -0000
@@ -139,8 +139,8 @@
 	((JDialog) owner).dispose();
 
       //else we probably have some kind of internal frame.
-      JInternalFrame inf = (JInternalFrame) SwingUtilities.getAncestorOfClass(JInternalFrame.class,
-                                                                              optionPane);
+      JInternalFrame inf = (JInternalFrame) SwingUtilities.getAncestorOfClass(
+          JInternalFrame.class, optionPane);
       if (inf != null)
         {
           try
@@ -433,7 +433,7 @@
   public static final int MinimumHeight = 90;
 
   /** Whether the JOptionPane contains custom components. */
-  protected boolean hasCustomComponents = false;
+  protected boolean hasCustomComponents;
 
   // The initialFocusComponent seems to always be set to a button (even if 
   // I try to set initialSelectionValue). This is different from what the 
@@ -821,8 +821,8 @@
     if (remainder.length() == 0)
       return;
 
-    // Recursivly call ourselves to burst the remainder of the string, 
-    if ((remainder.length() > maxll || remainder.contains("\n")))
+    // Recursively call ourselves to burst the remainder of the string, 
+    if (remainder.length() > maxll || remainder.contains("\n"))
       burstStringInto(c, remainder, maxll);
     else
       // Add the remainder to the container and be done.
@@ -979,7 +979,7 @@
       case JOptionPane.DEFAULT_OPTION:
         return (optionPane.getWantsInput()) ?
                new Object[] { OK_STRING, CANCEL_STRING } :
-               ( optionPane.getMessageType() == JOptionPane.QUESTION_MESSAGE ) ?
+               (optionPane.getMessageType() == JOptionPane.QUESTION_MESSAGE) ?
                new Object[] { YES_STRING, NO_STRING, CANCEL_STRING } :
                // ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, PLAIN_MESSAGE
                new Object[] { OK_STRING };
Index: javax/swing/plaf/basic/BasicProgressBarUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicProgressBarUI.java,v
retrieving revision 1.17
diff -u -r1.17 BasicProgressBarUI.java
--- javax/swing/plaf/basic/BasicProgressBarUI.java	8 Jun 2006 14:27:44 -0000	1.17
+++ javax/swing/plaf/basic/BasicProgressBarUI.java	13 Jun 2006 09:15:34 -0000
@@ -384,7 +384,7 @@
       }
 
     int index = getAnimationIndex();
-    if (animationIndex > (numFrames) / 2)
+    if (animationIndex > numFrames / 2)
       index = numFrames - getAnimationIndex();
 
     if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)
@@ -671,7 +671,8 @@
 	else
 	  {
 	    g.setColor(c.getForeground());
-	    g.fillRect(vr.x, vr.y + vr.height - amountFull, vr.width, amountFull);
+	    g.fillRect(vr.x, vr.y + vr.height - amountFull, vr.width, 
+                       amountFull);
 	  }
 
     if (progressBar.isStringPainted() && !progressBar.getString().equals(""))
Index: javax/swing/plaf/basic/BasicRadioButtonUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java,v
retrieving revision 1.17
diff -u -r1.17 BasicRadioButtonUI.java
--- javax/swing/plaf/basic/BasicRadioButtonUI.java	11 May 2006 08:37:19 -0000	1.17
+++ javax/swing/plaf/basic/BasicRadioButtonUI.java	13 Jun 2006 09:15:35 -0000
@@ -70,7 +70,8 @@
    *
    * @return a new instance of <code>BasicRadioButtonUI</code>
    */
-  public static ComponentUI createUI(final JComponent c)  {
+  public static ComponentUI createUI(final JComponent c)  
+  {
     return new BasicRadioButtonUI();
   }
 
@@ -155,8 +156,8 @@
       currentIcon = b.getDisabledIcon();
 
     SwingUtilities.calculateInnerArea(b, vr);
-    String text = SwingUtilities.layoutCompoundLabel
-      (c, g.getFontMetrics(f), b.getText(), currentIcon,
+    String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f), 
+       b.getText(), currentIcon,
        b.getVerticalAlignment(), b.getHorizontalAlignment(),
        b.getVerticalTextPosition(), b.getHorizontalTextPosition(),
        vr, ir, tr, b.getIconTextGap() + defaultTextShiftOffset);
Index: javax/swing/plaf/basic/BasicScrollBarUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java,v
retrieving revision 1.34
diff -u -r1.34 BasicScrollBarUI.java
--- javax/swing/plaf/basic/BasicScrollBarUI.java	9 Jun 2006 11:17:09 -0000	1.34
+++ javax/swing/plaf/basic/BasicScrollBarUI.java	13 Jun 2006 09:15:36 -0000
@@ -400,9 +400,9 @@
         return false;
       
       if (direction == POSITIVE_SCROLL)
-	return (value > scrollbar.getValue());
+	return value > scrollbar.getValue();
       else
-	return (value < scrollbar.getValue());
+	return value < scrollbar.getValue();
     }
   }
 
@@ -727,7 +727,7 @@
     int orientation = scrollbar.getOrientation();
     switch (orientation)
       {
-      case (JScrollBar.HORIZONTAL):
+      case JScrollBar.HORIZONTAL:
         incrButton = createIncreaseButton(EAST);
         decrButton = createDecreaseButton(WEST);
         break;
@@ -1357,9 +1357,9 @@
     // If the length is 0, you shouldn't be able to even see where the thumb is.
     // This really shouldn't ever happen, but just in case, we'll return the middle.
     if (len == 0)
-      return ((max - min) / 2);
+      return (max - min) / 2;
 
-    value = ((yPos - trackRect.y) * (max - min) / len + min);
+    value = (yPos - trackRect.y) * (max - min) / len + min;
 
     // If this isn't a legal value, then we'll have to move to one now.
     if (value > max)
@@ -1390,9 +1390,9 @@
     // If the length is 0, you shouldn't be able to even see where the slider is.
     // This really shouldn't ever happen, but just in case, we'll return the middle.
     if (len == 0)
-      return ((max - min) / 2);
+      return (max - min) / 2;
 
-    value = ((xPos - trackRect.x) * (max - min) / len + min);
+    value = (xPos - trackRect.x) * (max - min) / len + min;
 
     // If this isn't a legal value, then we'll have to move to one now.
     if (value > max)
Index: javax/swing/plaf/basic/BasicSliderUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicSliderUI.java,v
retrieving revision 1.30
diff -u -r1.30 BasicSliderUI.java
--- javax/swing/plaf/basic/BasicSliderUI.java	17 May 2006 15:31:39 -0000	1.30
+++ javax/swing/plaf/basic/BasicSliderUI.java	13 Jun 2006 09:15:38 -0000
@@ -68,7 +68,6 @@
 import javax.swing.JLabel;
 import javax.swing.JSlider;
 import javax.swing.LookAndFeel;
-import javax.swing.RepaintManager;
 import javax.swing.SwingUtilities;
 import javax.swing.Timer;
 import javax.swing.UIManager;
@@ -483,9 +482,9 @@
         value = valueForYPosition(currentMouseY);
 
       if (direction == POSITIVE_SCROLL)
-        return (value > slider.getValue());
+        return value > slider.getValue();
       else
-        return (value < slider.getValue());
+        return value < slider.getValue();
     }
   }
 
@@ -1298,7 +1297,7 @@
         tickRect.x = trackRect.x;
         tickRect.y = trackRect.y + trackRect.height;
         tickRect.width = trackRect.width;
-        tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0);
+        tickRect.height = slider.getPaintTicks() ? getTickLength() : 0;
 
         if (tickRect.y + tickRect.height > contentRect.y + contentRect.height)
           tickRect.height = contentRect.y + contentRect.height - tickRect.y;
@@ -1307,7 +1306,7 @@
       {
         tickRect.x = trackRect.x + trackRect.width;
         tickRect.y = trackRect.y;
-        tickRect.width = (slider.getPaintTicks() ? getTickLength() : 0);
+        tickRect.width = slider.getPaintTicks() ? getTickLength() : 0;
         tickRect.height = trackRect.height;
 
         if (tickRect.x + tickRect.width > contentRect.x + contentRect.width)
@@ -2226,12 +2225,12 @@
     // is.  This really shouldn't ever happen, but just in case, we'll return 
     // the middle.
     if (len == 0)
-      return ((max - min) / 2);
+      return (max - min) / 2;
 
     if (! drawInverted())
-      value = ((len - (yPos - trackRect.y)) * (max - min) / len + min);
+      value = (len - (yPos - trackRect.y)) * (max - min) / len + min;
     else
-      value = ((yPos - trackRect.y) * (max - min) / len + min);
+      value = (yPos - trackRect.y) * (max - min) / len + min;
 
     // If this isn't a legal value, then we'll have to move to one now.
     if (value > max)
@@ -2262,12 +2261,12 @@
     // is.  This really shouldn't ever happen, but just in case, we'll return 
     // the middle.
     if (len == 0)
-      return ((max - min) / 2);
+      return (max - min) / 2;
 
     if (! drawInverted())
-      value = ((xPos - trackRect.x) * (max - min) / len + min);
+      value = (xPos - trackRect.x) * (max - min) / len + min;
     else
-      value = ((len - (xPos - trackRect.x)) * (max - min) / len + min);
+      value = (len - (xPos - trackRect.x)) * (max - min) / len + min;
 
     // If this isn't a legal value, then we'll have to move to one now.
     if (value > max)
Index: javax/swing/plaf/basic/BasicTableHeaderUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicTableHeaderUI.java,v
retrieving revision 1.22
diff -u -r1.22 BasicTableHeaderUI.java
--- javax/swing/plaf/basic/BasicTableHeaderUI.java	19 May 2006 18:57:08 -0000	1.22
+++ javax/swing/plaf/basic/BasicTableHeaderUI.java	13 Jun 2006 09:15:39 -0000
@@ -249,11 +249,11 @@
 
 		  originalCursor = header.getCursor();
                   if (p < x)
-                    header.setCursor(Cursor.getPredefinedCursor
-                                     (Cursor.W_RESIZE_CURSOR));
+                    header.setCursor(Cursor.getPredefinedCursor(
+                        Cursor.W_RESIZE_CURSOR));
                   else
-                    header.setCursor(Cursor.getPredefinedCursor
-                                     (Cursor.E_RESIZE_CURSOR));
+                    header.setCursor(Cursor.getPredefinedCursor(
+                        Cursor.E_RESIZE_CURSOR));
                 }
               else
                 {
@@ -368,7 +368,7 @@
       int x = e.getX();
       int p = 0;
       
-      int col = model.getColumnCount()-1;
+      int col = model.getColumnCount() - 1;
       int n = model.getColumnCount();
 
       // This loop does not find the column if the mouse if out of the 
@@ -504,7 +504,7 @@
             comp.setBackground(header.getBackground());
             comp.setForeground(header.getForeground());
             if (comp instanceof JComponent)
-              ((JComponent)comp).setBorder(cellBorder);
+              ((JComponent) comp).setBorder(cellBorder);
             rendererPane.paintComponent(gfx, comp, header, bounds.x, bounds.y,
                                         bounds.width, bounds.height);
           }
@@ -513,11 +513,11 @@
     // This displays a running rectangle that is much simplier than the total
     // animation, as it is seen in Sun's application.
     // TODO animate the collumn dragging like in Sun's jre.
-    if (draggingHeaderRect!=null)
+    if (draggingHeaderRect != null)
       {
         gfx.setColor(header.getForeground()); 
-        gfx.drawRect(draggingHeaderRect.x, draggingHeaderRect.y+2,
-                     draggingHeaderRect.width-1, draggingHeaderRect.height-6);
+        gfx.drawRect(draggingHeaderRect.x, draggingHeaderRect.y + 2,
+            draggingHeaderRect.width - 1, draggingHeaderRect.height - 6);
       }
   }
   
@@ -533,7 +533,7 @@
     TableColumnModel cmod = header.getColumnModel();
     TableCellRenderer defaultRend = header.getDefaultRenderer();
     int ncols = cmod.getColumnCount();    
-    Dimension ret = new Dimension(0,0);
+    Dimension ret = new Dimension(0, 0);
     int spacing = 0;
 
     if (header.getTable() != null 
@@ -556,7 +556,7 @@
         comp.setBackground(header.getBackground());
         comp.setForeground(header.getForeground());
         if (comp instanceof JComponent)
-          ((JComponent)comp).setBorder(cellBorder);
+          ((JComponent) comp).setBorder(cellBorder);
 
         Dimension d = comp.getPreferredSize();
         ret.width += spacing;
Index: javax/swing/plaf/basic/BasicTableUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicTableUI.java,v
retrieving revision 1.53
diff -u -r1.53 BasicTableUI.java
--- javax/swing/plaf/basic/BasicTableUI.java	6 Jun 2006 09:39:07 -0000	1.53
+++ javax/swing/plaf/basic/BasicTableUI.java	13 Jun 2006 09:15:41 -0000
@@ -269,8 +269,8 @@
           begin = new Point(e.getX(), e.getY());
           curr = new Point(e.getX(), e.getY());
           //if control is pressed and the cell is already selected, deselect it
-          if (e.isControlDown() && table.
-              isCellSelected(table.rowAtPoint(begin),table.columnAtPoint(begin)))
+          if (e.isControlDown() && table.isCellSelected(
+              table.rowAtPoint(begin), table.columnAtPoint(begin)))
             {                                       
               table.getSelectionModel().
               removeSelectionInterval(table.rowAtPoint(begin), 
@@ -467,22 +467,21 @@
     // Register key bindings in the UI InputMap-ActionMap pair
     for (int i = 0; i < keys.length; i++)
       {
-        KeyStroke stroke = (KeyStroke)keys[i];
+        KeyStroke stroke = (KeyStroke) keys[i];
         String actionString = (String) ancestorMap.get(stroke);
 
         parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(),
                                                   stroke.getModifiers()),
                            actionString);
 
-        parentActionMap.put (actionString, 
-                             new ActionListenerProxy (action, actionString));
+        parentActionMap.put(actionString, 
+                            new ActionListenerProxy(action, actionString));
 
       }
     // Set the UI InputMap-ActionMap pair to be the parents of the
     // JTable's InputMap-ActionMap pair
-    parentInputMap.setParent
-      (table.getInputMap
-       (JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).getParent());
+    parentInputMap.setParent(table.getInputMap(
+        JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).getParent());
     parentActionMap.setParent(table.getActionMap().getParent());
     table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).
       setParent(parentInputMap);
@@ -532,10 +531,12 @@
      *
      * @param e the ActionEvent that caused this action.
      */
-    public void actionPerformed (ActionEvent e)
+    public void actionPerformed(ActionEvent e)
     {
-      DefaultListSelectionModel rowModel = (DefaultListSelectionModel) table.getSelectionModel();
-      DefaultListSelectionModel colModel = (DefaultListSelectionModel) table.getColumnModel().getSelectionModel();
+      DefaultListSelectionModel rowModel 
+          = (DefaultListSelectionModel) table.getSelectionModel();
+      DefaultListSelectionModel colModel 
+          = (DefaultListSelectionModel) table.getColumnModel().getSelectionModel();
 
       int rowLead = rowModel.getLeadSelectionIndex();
       int rowMax = table.getModel().getRowCount() - 1;
@@ -556,7 +557,7 @@
       else if (command.equals("startEditing"))
         {
           if (table.isCellEditable(rowLead, colLead))
-            table.editCellAt(rowLead,colLead);
+            table.editCellAt(rowLead, colLead);
         }
       else if (command.equals("selectFirstRowExtendSelection"))
         {              
@@ -572,7 +573,7 @@
         }      
       else if (command.equals("selectLastRow"))
         {
-          rowModel.setSelectionInterval(rowMax,rowMax);
+          rowModel.setSelectionInterval(rowMax, rowMax);
         }
       else if (command.equals("selectNextRowExtendSelection"))
         {
@@ -580,7 +581,7 @@
         }
       else if (command.equals("selectFirstRow"))
         {
-          rowModel.setSelectionInterval(0,0);
+          rowModel.setSelectionInterval(0, 0);
         }
       else if (command.equals("selectNextColumnExtendSelection"))
         {
@@ -603,9 +604,8 @@
         {
           int target;
           if (rowLead == getFirstVisibleRowIndex())
-            target = Math.max
-              (0, rowLead - (getLastVisibleRowIndex() - 
-                             getFirstVisibleRowIndex() + 1));
+            target = Math.max(0, rowLead - (getLastVisibleRowIndex() 
+                - getFirstVisibleRowIndex() + 1));
           else
             target = getFirstVisibleRowIndex();
           
@@ -621,9 +621,8 @@
         {
           int target;
           if (colLead == getLastVisibleColumnIndex())
-            target = Math.min
-              (colMax, colLead + (getLastVisibleColumnIndex() -
-                                  getFirstVisibleColumnIndex() + 1));
+            target = Math.min(colMax, colLead + (getLastVisibleColumnIndex() 
+                - getFirstVisibleColumnIndex() + 1));
           else
             target = getLastVisibleColumnIndex();
           
@@ -639,9 +638,8 @@
         {
           int target;
           if (colLead == getFirstVisibleColumnIndex())
-            target = Math.max
-              (0, colLead - (getLastVisibleColumnIndex() -
-                             getFirstVisibleColumnIndex() + 1));
+            target = Math.max(0, colLead - (getLastVisibleColumnIndex() 
+                - getFirstVisibleColumnIndex() + 1));
           else
             target = getFirstVisibleColumnIndex();
           
@@ -701,12 +699,10 @@
             {
               if (command.indexOf("Column") != -1) 
                 advanceSingleSelection(colModel, colMax, rowModel, rowMax, 
-                                       (command.equals
-                                        ("selectPreviousColumnCell")));
+                    command.equals("selectPreviousColumnCell"));
               else
                 advanceSingleSelection(rowModel, rowMax, colModel, colMax, 
-                                       (command.equals 
-                                        ("selectPreviousRowCell")));
+                    command.equals("selectPreviousRowCell"));
               return;
             }
           
@@ -728,15 +724,13 @@
           // cell and wrap at the edges of the selection.  
           if (command.indexOf("Column") != -1) 
             advanceMultipleSelection(colModel, colMinSelected, colMaxSelected, 
-                                     rowModel, rowMinSelected, rowMaxSelected, 
-                                     (command.equals
-                                      ("selectPreviousColumnCell")), true);
+                rowModel, rowMinSelected, rowMaxSelected, 
+                command.equals("selectPreviousColumnCell"), true);
           
           else
             advanceMultipleSelection(rowModel, rowMinSelected, rowMaxSelected, 
-                                     colModel, colMinSelected, colMaxSelected, 
-                                     (command.equals 
-                                      ("selectPreviousRowCell")), false);
+                colModel, colMinSelected, colMaxSelected, 
+                command.equals("selectPreviousRowCell"), false);
         }
       else if (command.equals("selectNextColumn"))
         {
@@ -747,9 +741,8 @@
         {
           int target;
           if (colLead == getFirstVisibleColumnIndex())
-            target = Math.max
-              (0, colLead - (getLastVisibleColumnIndex() -
-                             getFirstVisibleColumnIndex() + 1));
+            target = Math.max(0, colLead - (getLastVisibleColumnIndex() 
+                - getFirstVisibleColumnIndex() + 1));
           else
             target = getFirstVisibleColumnIndex();
           
@@ -760,9 +753,8 @@
         {
           int target;
           if (rowLead == getLastVisibleRowIndex())
-            target = Math.min
-              (rowMax, rowLead + (getLastVisibleRowIndex() - 
-                                  getFirstVisibleRowIndex() + 1));
+            target = Math.min(rowMax, rowLead + (getLastVisibleRowIndex() 
+                - getFirstVisibleRowIndex() + 1));
           else
             target = getLastVisibleRowIndex();
           
@@ -773,9 +765,8 @@
         {
           int target;
           if (colLead == getLastVisibleColumnIndex())
-            target = Math.min
-              (colMax, colLead + (getLastVisibleColumnIndex() -
-                                  getFirstVisibleColumnIndex() + 1));
+            target = Math.min(colMax, colLead + (getLastVisibleColumnIndex() 
+                - getFirstVisibleColumnIndex() + 1));
           else
             target = getLastVisibleColumnIndex();
           
@@ -795,9 +786,8 @@
         {
           int target;
           if (rowLead == getLastVisibleRowIndex())
-            target = Math.min
-              (rowMax, rowLead + (getLastVisibleRowIndex() - 
-                                  getFirstVisibleRowIndex() + 1));
+            target = Math.min(rowMax, rowLead + (getLastVisibleRowIndex() 
+                - getFirstVisibleRowIndex() + 1));
           else
             target = getLastVisibleRowIndex();
           
@@ -808,9 +798,8 @@
         {
           int target;
           if (rowLead == getFirstVisibleRowIndex())
-            target = Math.max
-              (0, rowLead - (getLastVisibleRowIndex() - 
-                             getFirstVisibleRowIndex() + 1));
+            target = Math.max(0, rowLead - (getLastVisibleRowIndex() 
+                - getFirstVisibleRowIndex() + 1));
           else
             target = getFirstVisibleRowIndex();
           
@@ -819,34 +808,37 @@
         }
       else if (command.equals("selectNextRowChangeLead"))
           {
-            if (rowModel.getSelectionMode() != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+            if (rowModel.getSelectionMode() 
+                != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
               {
                 // just "selectNextRow"
                 rowModel.setSelectionInterval(Math.min(rowLead + 1, rowMax),
                                               Math.min(rowLead + 1, rowMax));
-                colModel.setSelectionInterval(colLead,colLead);
+                colModel.setSelectionInterval(colLead, colLead);
               }
             else
               rowModel.moveLeadSelectionIndex(Math.min(rowLead + 1, rowMax));
           }
       else if (command.equals("selectPreviousRowChangeLead"))
         {
-          if (rowModel.getSelectionMode() != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+          if (rowModel.getSelectionMode() 
+              != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
             {
               // just selectPreviousRow
               rowModel.setSelectionInterval(Math.max(rowLead - 1, 0),
-                                            Math.min(rowLead -1, 0));
-              colModel.setSelectionInterval(colLead,colLead);
+                                            Math.min(rowLead - 1, 0));
+              colModel.setSelectionInterval(colLead, colLead);
             }
           else
             rowModel.moveLeadSelectionIndex(Math.max(rowLead - 1, 0));
         }
       else if (command.equals("selectNextColumnChangeLead"))
         {
-          if (colModel.getSelectionMode() != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)            
+          if (colModel.getSelectionMode() 
+              != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)            
             {
               // just selectNextColumn
-              rowModel.setSelectionInterval(rowLead,rowLead);
+              rowModel.setSelectionInterval(rowLead, rowLead);
               colModel.setSelectionInterval(Math.min(colLead + 1, colMax),
                                             Math.min(colLead + 1, colMax));
             }
@@ -855,10 +847,11 @@
         }
       else if (command.equals("selectPreviousColumnChangeLead"))
         {
-          if (colModel.getSelectionMode() != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)            
+          if (colModel.getSelectionMode() 
+              != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)            
             {
               // just selectPreviousColumn
-              rowModel.setSelectionInterval(rowLead,rowLead);
+              rowModel.setSelectionInterval(rowLead, rowLead);
               colModel.setSelectionInterval(Math.max(colLead - 1, 0),
                                             Math.max(colLead - 1, 0));
               
@@ -924,9 +917,9 @@
           && command != "addToSelection")
         table.editingStopped(new ChangeEvent("update"));
             
-      table.scrollRectToVisible
-        (table.getCellRect(rowModel.getLeadSelectionIndex(), 
-                           colModel.getLeadSelectionIndex(), false));
+      table.scrollRectToVisible(table.getCellRect(
+          rowModel.getLeadSelectionIndex(), colModel.getLeadSelectionIndex(), 
+          false));
     }
     
     /**
@@ -1010,13 +1003,13 @@
      * @param reverse true if shift was held for the event
      * @param eventIsTab true if TAB was pressed, false if ENTER pressed
      */
-    void advanceMultipleSelection (ListSelectionModel firstModel, int firstMin,
-                                   int firstMax, ListSelectionModel secondModel, 
-                                   int secondMin, int secondMax, boolean reverse,
-                                   boolean eventIsTab)
+    void advanceMultipleSelection(ListSelectionModel firstModel, int firstMin,
+                                  int firstMax, ListSelectionModel secondModel, 
+                                  int secondMin, int secondMax, boolean reverse,
+                                  boolean eventIsTab)
     {
-      // If eventIsTab, all the "firsts" correspond to columns, otherwise, to rows
-      // "seconds" correspond to the opposite
+      // If eventIsTab, all the "firsts" correspond to columns, otherwise, to 
+      // rows "seconds" correspond to the opposite
       int firstLead = firstModel.getLeadSelectionIndex();
       int secondLead = secondModel.getLeadSelectionIndex();
       int numFirsts = eventIsTab ? 
@@ -1115,9 +1108,9 @@
      * @param reverse true if SHIFT was pressed for the event
      */
 
-    void advanceSingleSelection (ListSelectionModel firstModel, int firstMax, 
-                                 ListSelectionModel secondModel, int secondMax, 
-                                 boolean reverse)
+    void advanceSingleSelection(ListSelectionModel firstModel, int firstMax, 
+                                ListSelectionModel secondModel, int secondMax, 
+                                boolean reverse)
     {
       // for TABs, "first" corresponds to columns and "seconds" to rows.
       // the opposite is true for ENTERs
@@ -1136,8 +1129,8 @@
       
       // do we have to wrap the "seconds"?
       if (reverse && (firstLead == 0) || !reverse && (firstLead == firstMax))
-        secondModel.setSelectionInterval((secondLead + 1)%(secondMax + 1), 
-                                         (secondLead + 1)%(secondMax + 1));
+        secondModel.setSelectionInterval((secondLead + 1) % (secondMax + 1), 
+                                         (secondLead + 1) % (secondMax + 1));
       // if not, just reselect the current lead
       else
         secondModel.setSelectionInterval(secondLead, secondLead);
@@ -1152,8 +1145,8 @@
           firstLead -= 2;
         }
       // select the next "first"
-      firstModel.setSelectionInterval ((firstLead + 1)%(firstMax + 1), 
-                                       (firstLead + 1)%(firstMax + 1));
+      firstModel.setSelectionInterval((firstLead + 1) % (firstMax + 1), 
+                                      (firstLead + 1) % (firstMax + 1));
     }
   }
 
@@ -1212,7 +1205,7 @@
 
   public void installUI(JComponent comp) 
   {
-    table = (JTable)comp;
+    table = (JTable) comp;
     rendererPane = new CellRendererPane();
     table.add(rendererPane);
 
@@ -1282,8 +1275,8 @@
     int rowMargin = table.getRowMargin();
 
     TableColumnModel cmodel = table.getColumnModel();
-    int [] widths = new int[cn+1];
-    for (int i = c0; i <=cn ; i++)
+    int[] widths = new int[cn + 1];
+    for (int i = c0; i <= cn; i++)
       {
         widths[i] = cmodel.getColumn(i).getWidth() - columnMargin;
       }
Index: javax/swing/plaf/basic/BasicTextUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v
retrieving revision 1.85
diff -u -r1.85 BasicTextUI.java
--- javax/swing/plaf/basic/BasicTextUI.java	6 Jun 2006 10:46:43 -0000	1.85
+++ javax/swing/plaf/basic/BasicTextUI.java	13 Jun 2006 09:15:42 -0000
@@ -603,10 +603,12 @@
     // Fetch the colors for enabled/disabled text components.
     background = UIManager.getColor(prefix + ".background");
     inactiveBackground = UIManager.getColor(prefix + ".inactiveBackground");
-    textComponent.setDisabledTextColor
-                         (UIManager.getColor(prefix + ".inactiveForeground"));
-    textComponent.setSelectedTextColor(UIManager.getColor(prefix + ".selectionForeground"));
-    textComponent.setSelectionColor(UIManager.getColor(prefix + ".selectionBackground"));    
+    textComponent.setDisabledTextColor(UIManager.getColor(prefix 
+        + ".inactiveForeground"));
+    textComponent.setSelectedTextColor(UIManager.getColor(prefix 
+        + ".selectionForeground"));
+    textComponent.setSelectionColor(UIManager.getColor(prefix 
+        + ".selectionBackground"));    
   }
 
   /**
@@ -639,7 +641,8 @@
                 Clipboard cb = Toolkit.getDefaultToolkit().getSystemSelection();
                 if (cb != null)
                   {
-                    StringSelection selection = new StringSelection(textComponent.getSelectedText());
+                    StringSelection selection = new StringSelection(
+                        textComponent.getSelectedText());
                     cb.setContents(selection, selection);
                   }
               }
@@ -853,7 +856,8 @@
    */
   protected void uninstallKeyboardActions()
   {
-    SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED, null);
+    SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED, 
+                                     null);
     SwingUtilities.replaceUIActionMap(textComponent, null);
   }
 
@@ -1114,13 +1118,14 @@
                        && Utilities.getRowStart(t, nextPosBelow) != p1RowStart)
                   {
                     posBelow = nextPosBelow;
-                    nextPosBelow = Utilities.getPositionBelow(t, posBelow, l1.x);
+                    nextPosBelow = Utilities.getPositionBelow(t, posBelow, 
+                                                              l1.x);
                     
                     if (posBelow == nextPosBelow)
                       break;
                   }
-                // Now posBelow is an offset on the last line which has to be damaged
-                // completely. (newPosBelow is on the same line as p1)
+                // Now posBelow is an offset on the last line which has to be 
+                // damaged completely. (newPosBelow is on the same line as p1)
                  
                 // Retrieve the rectangle of posBelow and use its y and height
                 // value to calculate the final height of the multiple line
Index: javax/swing/plaf/basic/BasicToolBarUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicToolBarUI.java,v
retrieving revision 1.24
diff -u -r1.24 BasicToolBarUI.java
--- javax/swing/plaf/basic/BasicToolBarUI.java	19 May 2006 09:03:06 -0000	1.24
+++ javax/swing/plaf/basic/BasicToolBarUI.java	13 Jun 2006 09:15:45 -0000
@@ -417,8 +417,8 @@
     int w = 0;
     int h = 0;
 
-    boolean tmp = ((loc == SwingConstants.NORTH)
-                  || (loc == SwingConstants.SOUTH) || (loc == -1));
+    boolean tmp = (loc == SwingConstants.NORTH)
+                  || (loc == SwingConstants.SOUTH) || (loc == -1);
 
     cachedOrientation = toolBar.getOrientation();
     cachedBounds = toolBar.getSize();
@@ -1084,7 +1084,8 @@
       isDragging = true;
 
       if (dragWindow != null)
-	dragWindow.setOffset(new Point(cachedBounds.width/2, cachedBounds.height/2));
+	dragWindow.setOffset(new Point(cachedBounds.width / 2, 
+            cachedBounds.height / 2));
 
       dragTo(e.getPoint(), origin);
     }
Index: javax/swing/plaf/basic/BasicTreeUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v
retrieving revision 1.143
diff -u -r1.143 BasicTreeUI.java
--- javax/swing/plaf/basic/BasicTreeUI.java	8 Jun 2006 14:00:54 -0000	1.143
+++ javax/swing/plaf/basic/BasicTreeUI.java	13 Jun 2006 09:15:47 -0000
@@ -248,7 +248,7 @@
   int gap = 4;
 
   /** The max height of the nodes in the tree. */
-  int maxHeight = 0;
+  int maxHeight;
   
   /** The hash color. */
   Color hashColor;
@@ -1129,7 +1129,7 @@
   {
     Enumeration expanded = tree.getExpandedDescendants(path);
     while (expanded.hasMoreElements())
-      treeState.setExpandedState(((TreePath) expanded.nextElement()), true);
+      treeState.setExpandedState((TreePath) expanded.nextElement(), true);
   }
 
   /**
@@ -1140,7 +1140,7 @@
    */
   protected TreePath getLastChildPath(TreePath parent)
   {
-    return ((TreePath) parent.getLastPathComponent());
+    return (TreePath) parent.getLastPathComponent();
   }
 
   /**
@@ -1295,21 +1295,21 @@
     ActionMapUIResource am = new ActionMapUIResource();
     Action action;
 
-    action= new TreeAction();
+    action = new TreeAction();
     am.put(action.getValue(Action.NAME), action);
 
     // TreeHomeAction.
-    action= new TreeHomeAction(-1, "selectFirst");
+    action = new TreeHomeAction(-1, "selectFirst");
     am.put(action.getValue(Action.NAME), action);
-    action= new TreeHomeAction(-1, "selectFirstChangeLead");
+    action = new TreeHomeAction(-1, "selectFirstChangeLead");
     am.put(action.getValue(Action.NAME), action);
-    action= new TreeHomeAction(-1, "selectFirstExtendSelection");
+    action = new TreeHomeAction(-1, "selectFirstExtendSelection");
     am.put(action.getValue(Action.NAME), action);
-    action= new TreeHomeAction(1, "selectLast");
+    action = new TreeHomeAction(1, "selectLast");
     am.put(action.getValue(Action.NAME), action);
-    action= new TreeHomeAction(1, "selectLastChangeLead");
+    action = new TreeHomeAction(1, "selectLastChangeLead");
     am.put(action.getValue(Action.NAME), action);
-    action= new TreeHomeAction(1, "selectLastExtendSelection");
+    action = new TreeHomeAction(1, "selectLastExtendSelection");
     am.put(action.getValue(Action.NAME), action);
 
     // TreeIncrementAction.
@@ -1414,8 +1414,8 @@
     if (treeSelectionModel != null
         && selectionModelPropertyChangeListener != null)
       {
-        treeSelectionModel.addPropertyChangeListener
-                                        (selectionModelPropertyChangeListener);
+        treeSelectionModel.addPropertyChangeListener(
+            selectionModelPropertyChangeListener);
       }
 
     componentListener = createComponentListener();
@@ -1819,7 +1819,7 @@
 
         Insets i = tree.getInsets();
         int left = getRowX(tree.getRowForPath(path), path.getPathCount() - 1)
-                   -getRightChildIndent() - width / 2 + i.left;
+                   - getRightChildIndent() - width / 2 + i.left;
         cntlClick = mouseX >= left && mouseX <= left + width;
       }
     return cntlClick;
@@ -2207,7 +2207,7 @@
     {
       cancelEditing(tree);
     }
-  }// CellEditorHandler
+  } // CellEditorHandler
 
   /**
    * Repaints the lead selection row when focus is lost/grained.
@@ -2255,7 +2255,7 @@
     void repaintLeadRow()
     {
       TreePath lead = tree.getLeadSelectionPath();
-      if (lead!=null)
+      if (lead != null)
         tree.repaint(tree.getPathBounds(lead));
     }
   }
@@ -2588,7 +2588,7 @@
     {
       return BasicTreeUI.this.getRowX(row, depth);
     }
-  }// NodeDimensionsHandler
+  } // NodeDimensionsHandler
 
   /**
    * PropertyChangeListener for the tree. Updates the appropriate variable, or
@@ -2742,7 +2742,7 @@
       tree.revalidate();
       tree.repaint();
     }
-  }// TreeExpansionHandler
+  } // TreeExpansionHandler
 
   /**
    * TreeHomeAction is used to handle end/home actions. Scrolls either the first
@@ -3040,7 +3040,7 @@
       treeState.treeStructureChanged(e);
       tree.repaint();
     }
-  }// TreeModelHandler
+  } // TreeModelHandler
 
   /**
    * TreePageAction handles page up and page down events.
@@ -3125,7 +3125,7 @@
             }
           else
             {
-              newVisible.y -= (visible.height - newVisible.height);
+              newVisible.y -= visible.height - newVisible.height;
               newVisible.height = visible.height;
             }
 
@@ -3169,7 +3169,7 @@
     {
       return (tree != null) && tree.isEnabled();
     }
-  }// TreePageAction
+  } // TreePageAction
 
   /**
    * Listens for changes in the selection model and updates the display
@@ -3208,13 +3208,13 @@
           Rectangle n = treeState.getBounds(event.getNewLeadSelectionPath(), 
                                            new Rectangle());
           
-          if (o!=null)
+          if (o != null)
             tree.repaint(o);
-          if (n!=null)
+          if (n != null)
             tree.repaint(n);
         }
     }
-  }// TreeSelectionHandler
+  } // TreeSelectionHandler
 
   /**
    * For the first selected row expandedness will be toggled.
@@ -3315,7 +3315,7 @@
               // is not visible.
               TreePath parent = current.getParentPath();
               if (parent != null && 
-                  !(parent.getPathCount()==1 && !tree.isRootVisible()) )
+                  ! (parent.getPathCount() == 1 && ! tree.isRootVisible()))
                 tree.setSelectionPath(parent);
             }
         }
@@ -3647,7 +3647,7 @@
     if (parent != null)
       {
         Rectangle parentBounds = getPathBounds(tree, parent);
-        paintVerticalLine(g, tree, parentBounds.x + 2* gap, 
+        paintVerticalLine(g, tree, parentBounds.x + 2 * gap, 
                           parentBounds.y + parentBounds.height / 2,
                           bounds.y + bounds.height / 2);
       }
@@ -3717,7 +3717,7 @@
                                              boolean isLeaf)
   {
     Object node = path.getLastPathComponent();
-    return (! isLeaf && hasControlIcons());
+    return ! isLeaf && hasControlIcons();
   }
 
   /**


More information about the Classpath-patches mailing list