harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r479418 [5/43] - in /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common: javax/swing/ javax/swing/border/ javax/swing/colorchooser/ javax/swing/event/ javax/swing/filechooser/ javax/swing/plaf/ javax/swing/plaf/basic/ ja...
Date Sun, 26 Nov 2006 20:15:55 GMT
Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/filechooser/FileSystemViewTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/filechooser/FileSystemViewTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/filechooser/FileSystemViewTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/filechooser/FileSystemViewTest.java Sun Nov 26 12:15:43 2006
@@ -21,28 +21,29 @@
 package javax.swing.filechooser;
 
 import java.io.File;
-
 import javax.swing.SwingTestCase;
-
 import org.apache.harmony.misc.SystemUtils;
 
 public class FileSystemViewTest extends SwingTestCase {
     private FileSystemView view;
+
     private File file;
 
     public FileSystemViewTest(final String name) {
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         timeoutDelay = 5 * DEFAULT_TIMEOUT_DELAY;
-
         view = FileSystemView.getFileSystemView();
-        file = new File(new File(System.getProperty("user.home")), new Integer((int)(Math.random() * 1000)).toString());
+        file = new File(new File(System.getProperty("user.home")), new Integer((int) (Math
+                .random() * 1000)).toString());
         file.deleteOnExit();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         view = null;
         file.delete();
@@ -89,16 +90,15 @@
     public void testGetSystemTypeDescription() throws Exception {
         file.createNewFile();
         assertNotEmpty(view.getSystemTypeDescription(file));
-
         file.delete();
         file.mkdir();
         assertNotEmpty(view.getSystemTypeDescription(file));
     }
 
     public void testGetRoot() throws Exception {
-         assertNotNull(File.listRoots());
-         assertTrue(File.listRoots().length > 0);
-         assertNotSame(File.listRoots(), File.listRoots());
+        assertNotNull(File.listRoots());
+        assertTrue(File.listRoots().length > 0);
+        assertNotSame(File.listRoots(), File.listRoots());
     }
 
     public void testGetSystemIcon() throws Exception {
@@ -106,12 +106,13 @@
 
     public void testCreateFileObject() throws Exception {
         File dir = new File(System.getProperty("user.home"));
-
         assertEquals(new File(dir, "!!!!!!!"), view.createFileObject(dir, "!!!!!!!"));
         assertEquals(new File(dir, "***"), view.createFileObject(dir, "***"));
         assertEquals(new File(dir, "/normal"), view.createFileObject(dir, "/normal"));
-        assertEquals(new File(new File("any"), "/normal"), view.createFileObject(new File("any"), "/normal"));
-        assertEquals(new File(new File("/"), "/normal"), view.createFileObject(new File("/"), "/normal"));
+        assertEquals(new File(new File("any"), "/normal"), view.createFileObject(
+                new File("any"), "/normal"));
+        assertEquals(new File(new File("/"), "/normal"), view.createFileObject(new File("/"),
+                "/normal"));
     }
 
     public void testGetChild() throws Exception {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/filechooser/FileViewTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/filechooser/FileViewTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/filechooser/FileViewTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/filechooser/FileViewTest.java Sun Nov 26 12:15:43 2006
@@ -21,23 +21,25 @@
 package javax.swing.filechooser;
 
 import java.io.File;
-
 import javax.swing.SwingTestCase;
 
 public class FileViewTest extends SwingTestCase {
     private FileView view;
+
     private File file;
 
     public FileViewTest(final String name) {
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         view = new FileView() {
         };
         file = new File("");
     }
 
+    @Override
     protected void tearDown() throws Exception {
         view = null;
         file = null;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/ComponentUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/ComponentUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/ComponentUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/ComponentUITest.java Sun Nov 26 12:15:43 2006
@@ -25,12 +25,9 @@
 import javax.accessibility.Accessible;
 import javax.swing.JComponent;
 import javax.swing.JPanel;
-import javax.swing.plaf.ComponentUI;
-
 import javax.swing.SwingTestCase;
 
 public class ComponentUITest extends SwingTestCase {
-
     protected ComponentUI componentUI = null;
 
     public static void main(final String[] args) {
@@ -40,14 +37,17 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-        componentUI = new ComponentUI(){};
+        componentUI = new ComponentUI() {
+        };
     }
 
     /*
      * @see TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -85,18 +85,14 @@
 
     public void testGetAccessibleChild() {
         JPanel panel = new JPanel();
-
         Accessible child = componentUI.getAccessibleChild(panel, 0);
         assertNull(child);
-
         JPanel panel1 = new JPanel();
         JPanel panel2 = new JPanel();
         panel.add(panel1);
         panel.add(panel2);
-
         child = componentUI.getAccessibleChild(panel, 0);
         assertTrue(child == panel1);
-
         child = componentUI.getAccessibleChild(panel, 1);
         assertTrue(child == panel2);
     }
@@ -104,12 +100,10 @@
     public void testGetAccessibleChildrenCount() {
         JPanel panel = new JPanel();
         assertTrue(componentUI.getAccessibleChildrenCount(panel) == 0);
-
         JPanel panel1 = new JPanel();
         JPanel panel2 = new JPanel();
         panel.add(panel1);
         panel.add(panel2);
-
         assertTrue(componentUI.getAccessibleChildrenCount(panel) == 2);
     }
 
@@ -124,5 +118,4 @@
             assertTrue(isExceptionThrown);
         }
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/PopupMenuUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/PopupMenuUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/PopupMenuUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/PopupMenuUITest.java Sun Nov 26 12:15:43 2006
@@ -15,27 +15,28 @@
  *  limitations under the License.
  */
 /**
-* @author Alexander T. Simbirtsev
-* @version $Revision$
-*/
+ * @author Alexander T. Simbirtsev
+ * @version $Revision$
+ */
 package javax.swing.plaf;
 
 import java.awt.Component;
 import java.awt.EventQueue;
 import java.awt.event.MouseEvent;
-
 import javax.swing.JPanel;
 import javax.swing.SwingTestCase;
 
 public class PopupMenuUITest extends SwingTestCase {
-
     protected PopupMenuUI popupUI;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-        popupUI = new PopupMenuUI() {};
+        popupUI = new PopupMenuUI() {
+        };
     }
 
+    @Override
     protected void tearDown() throws Exception {
         popupUI = null;
         super.tearDown();
@@ -53,10 +54,11 @@
      */
     public void testIsPopupTrigger() {
         Component source = new JPanel();
-        MouseEvent event1 = new MouseEvent(source, MouseEvent.MOUSE_ENTERED, EventQueue.getMostRecentEventTime(), 0, 5, 5, 0, false);
-        MouseEvent event2 = new MouseEvent(source, MouseEvent.MOUSE_WHEEL, EventQueue.getMostRecentEventTime(), 0, 5, 5, 0, true);
+        MouseEvent event1 = new MouseEvent(source, MouseEvent.MOUSE_ENTERED, EventQueue
+                .getMostRecentEventTime(), 0, 5, 5, 0, false);
+        MouseEvent event2 = new MouseEvent(source, MouseEvent.MOUSE_WHEEL, EventQueue
+                .getMostRecentEventTime(), 0, 5, 5, 0, true);
         assertFalse(popupUI.isPopupTrigger(event1));
         assertTrue(popupUI.isPopupTrigger(event2));
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/UIResourceTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/UIResourceTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/UIResourceTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/UIResourceTest.java Sun Nov 26 12:15:43 2006
@@ -14,12 +14,10 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Sergey Burlak
  * @version $Revision$
  */
-
 package javax.swing.plaf;
 
 import java.awt.Color;
@@ -27,7 +25,6 @@
 import java.awt.Font;
 import java.awt.Graphics;
 import java.awt.Insets;
-
 import javax.swing.Icon;
 import javax.swing.JComponent;
 import javax.swing.SwingTestCase;
@@ -37,26 +34,29 @@
         Icon imageIcon = new Icon() {
             public void paintIcon(final Component c, final Graphics g, final int x, final int y) {
             }
+
             public int getIconWidth() {
                 return 0;
             }
+
             public int getIconHeight() {
                 return 0;
             }
         };
         IconUIResource icon = new IconUIResource(imageIcon);
-
         assertEquals(imageIcon.getIconHeight(), icon.getIconHeight());
         assertEquals(imageIcon.getIconWidth(), icon.getIconWidth());
     }
 
     public void testNullDelegate() {
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 new BorderUIResource(null);
             }
         });
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 new IconUIResource(null);
             }
@@ -66,10 +66,11 @@
     public void testBorderUIResourceBlackLine() {
         assertNotNull(BorderUIResource.getBlackLineBorderUIResource());
         assertTrue(BorderUIResource.getBlackLineBorderUIResource() instanceof BorderUIResource.LineBorderUIResource);
-        assertTrue(BorderUIResource.getBlackLineBorderUIResource() == BorderUIResource.getBlackLineBorderUIResource());
-
+        assertTrue(BorderUIResource.getBlackLineBorderUIResource() == BorderUIResource
+                .getBlackLineBorderUIResource());
         assertNotNull(BorderUIResource.getBlackLineBorderUIResource());
-        BorderUIResource.LineBorderUIResource border = (BorderUIResource.LineBorderUIResource)BorderUIResource.getBlackLineBorderUIResource();
+        BorderUIResource.LineBorderUIResource border = (BorderUIResource.LineBorderUIResource) BorderUIResource
+                .getBlackLineBorderUIResource();
         assertFalse(border.getRoundedCorners());
         assertTrue(border.isBorderOpaque());
         assertEquals(new Insets(1, 1, 1, 1), border.getBorderInsets(newJComponent()));
@@ -80,10 +81,11 @@
     public void testBorderUIResourceEtched() {
         assertNotNull(BorderUIResource.getEtchedBorderUIResource());
         assertTrue(BorderUIResource.getEtchedBorderUIResource() instanceof BorderUIResource.EtchedBorderUIResource);
-        assertTrue(BorderUIResource.getEtchedBorderUIResource() == BorderUIResource.getEtchedBorderUIResource());
-
+        assertTrue(BorderUIResource.getEtchedBorderUIResource() == BorderUIResource
+                .getEtchedBorderUIResource());
         assertNotNull(BorderUIResource.getEtchedBorderUIResource());
-        BorderUIResource.EtchedBorderUIResource border = (BorderUIResource.EtchedBorderUIResource)BorderUIResource.getEtchedBorderUIResource();
+        BorderUIResource.EtchedBorderUIResource border = (BorderUIResource.EtchedBorderUIResource) BorderUIResource
+                .getEtchedBorderUIResource();
         assertTrue(border.isBorderOpaque());
         assertEquals(new Insets(2, 2, 2, 2), border.getBorderInsets(newJComponent()));
         assertEquals(1, border.getEtchType());
@@ -94,23 +96,24 @@
     public void testBorderUIResourceLoweredBevel() {
         assertNotNull(BorderUIResource.getLoweredBevelBorderUIResource());
         assertTrue(BorderUIResource.getLoweredBevelBorderUIResource() instanceof BorderUIResource.BevelBorderUIResource);
-        assertTrue(BorderUIResource.getLoweredBevelBorderUIResource() == BorderUIResource.getLoweredBevelBorderUIResource());
-
-        checkBevelBorderAttrs((BorderUIResource.BevelBorderUIResource)BorderUIResource.getLoweredBevelBorderUIResource(), 1);
+        assertTrue(BorderUIResource.getLoweredBevelBorderUIResource() == BorderUIResource
+                .getLoweredBevelBorderUIResource());
+        checkBevelBorderAttrs((BorderUIResource.BevelBorderUIResource) BorderUIResource
+                .getLoweredBevelBorderUIResource(), 1);
     }
 
     public void testBorderUIResourceRaisedBevel() {
         assertNotNull(BorderUIResource.getRaisedBevelBorderUIResource());
         assertTrue(BorderUIResource.getRaisedBevelBorderUIResource() instanceof BorderUIResource.BevelBorderUIResource);
-        assertTrue(BorderUIResource.getRaisedBevelBorderUIResource() == BorderUIResource.getRaisedBevelBorderUIResource());
-
-        checkBevelBorderAttrs((BorderUIResource.BevelBorderUIResource)BorderUIResource.getRaisedBevelBorderUIResource(), 0);
+        assertTrue(BorderUIResource.getRaisedBevelBorderUIResource() == BorderUIResource
+                .getRaisedBevelBorderUIResource());
+        checkBevelBorderAttrs((BorderUIResource.BevelBorderUIResource) BorderUIResource
+                .getRaisedBevelBorderUIResource(), 0);
     }
 
     public void testColorUIResource() {
         Color testColor = new Color(1, 2, 3);
         ColorUIResource c = new ColorUIResource(testColor);
-
         assertEquals(testColor.getRGB(), c.getRGB());
         assertEquals(testColor.getRed(), c.getRed());
         assertEquals(testColor.getGreen(), c.getGreen());
@@ -120,7 +123,6 @@
 
     public void testDimensionUIResource() {
         DimensionUIResource d = new DimensionUIResource(1, 2);
-
         assertTrue(1 == d.getWidth());
         assertTrue(2 == d.getHeight());
     }
@@ -128,7 +130,6 @@
     public void testFontUIResource() {
         Font font = new Font("Dialog", Font.BOLD, 1);
         FontUIResource f = new FontUIResource(font);
-
         assertEquals("Dialog", f.getName());
         assertEquals(1, f.getSize());
         assertEquals(Font.BOLD, f.getStyle());
@@ -136,14 +137,14 @@
 
     public void testInsetsUIResource() {
         InsetsUIResource ins = new InsetsUIResource(1, 2, 3, 4);
-
         assertEquals(1, ins.top);
         assertEquals(2, ins.left);
         assertEquals(3, ins.bottom);
         assertEquals(4, ins.right);
     }
 
-    private void checkBevelBorderAttrs(final BorderUIResource.BevelBorderUIResource border, final int type) {
+    private void checkBevelBorderAttrs(final BorderUIResource.BevelBorderUIResource border,
+            final int type) {
         assertNotNull(border);
         assertTrue(border.isBorderOpaque());
         assertEquals(type, border.getBevelType());
@@ -156,6 +157,7 @@
 
     private JComponent newJComponent() {
         return new JComponent() {
+            private static final long serialVersionUID = 1L;
         };
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java Sun Nov 26 12:15:43 2006
@@ -14,25 +14,25 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Sergey Burlak
  * @version $Revision$
  */
-
 package javax.swing.plaf.basic;
 
 import java.awt.Dimension;
-
+import javax.swing.SwingConstants;
 import javax.swing.SwingTestCase;
 
 public class BasicArrowButtonTest extends SwingTestCase {
     private BasicArrowButton button;
 
+    @Override
     protected void setUp() throws Exception {
-        button = new BasicArrowButton(BasicArrowButton.NORTH);
+        button = new BasicArrowButton(SwingConstants.NORTH);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         button = null;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicBordersTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicBordersTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicBordersTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicBordersTest.java Sun Nov 26 12:15:43 2006
@@ -14,17 +14,14 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Alexander T. Simbirtsev
  * @version $Revision$
  */
-
 package javax.swing.plaf.basic;
 
 import java.awt.Color;
 import java.awt.Insets;
-
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
 import javax.swing.JCheckBoxMenuItem;
@@ -50,12 +47,15 @@
 import javax.swing.plaf.ColorUIResource;
 
 public class BasicBordersTest extends SwingTestCase {
-
     private Color shadow;
+
     private Color darkShadow;
+
     private Color highlight;
+
     private Color lightHighlight;
 
+    @Override
     public void setUp() {
         shadow = new Color(0, 0, 0);
         darkShadow = new Color(0, 0, 1);
@@ -63,6 +63,7 @@
         lightHighlight = new Color(0, 0, 3);
     }
 
+    @Override
     public void tearDown() {
         shadow = null;
         darkShadow = null;
@@ -71,7 +72,8 @@
     }
 
     public void testButtonBorderClass() {
-        BasicBorders.ButtonBorder border = new BasicBorders.ButtonBorder(shadow, darkShadow, highlight, lightHighlight);
+        BasicBorders.ButtonBorder border = new BasicBorders.ButtonBorder(shadow, darkShadow,
+                highlight, lightHighlight);
         assertEquals(shadow, border.shadow);
         assertEquals(darkShadow, border.darkShadow);
         assertEquals(highlight, border.highlight);
@@ -80,7 +82,8 @@
     }
 
     public void testFieldBorderClass() {
-        BasicBorders.FieldBorder border = new BasicBorders.FieldBorder(shadow, darkShadow, highlight, lightHighlight);
+        BasicBorders.FieldBorder border = new BasicBorders.FieldBorder(shadow, darkShadow,
+                highlight, lightHighlight);
         assertEquals(shadow, border.shadow);
         assertEquals(darkShadow, border.darkShadow);
         assertEquals(highlight, border.highlight);
@@ -91,21 +94,28 @@
     public void testMarginBorderClass() {
         BasicBorders.MarginBorder border = new BasicBorders.MarginBorder();
         checkInsets(border, new Insets(0, 0, 0, 0));
-
         assertEquals(UIManager.get("CheckBox.margin"), border.getBorderInsets(new JCheckBox()));
         assertEquals(UIManager.get("Button.margin"), border.getBorderInsets(new JButton()));
-        assertEquals(UIManager.get("CheckBoxMenuItem.margin"), border.getBorderInsets(new JCheckBoxMenuItem()));
-        assertEquals(UIManager.get("EditorPane.margin"), border.getBorderInsets(new JEditorPane()));
-        assertEquals(UIManager.get("FormattedTextField.margin"), border.getBorderInsets(new JFormattedTextField()));
+        assertEquals(UIManager.get("CheckBoxMenuItem.margin"), border
+                .getBorderInsets(new JCheckBoxMenuItem()));
+        assertEquals(UIManager.get("EditorPane.margin"), border
+                .getBorderInsets(new JEditorPane()));
+        assertEquals(UIManager.get("FormattedTextField.margin"), border
+                .getBorderInsets(new JFormattedTextField()));
         assertEquals(UIManager.get("Menu.margin"), border.getBorderInsets(new JMenu()));
         assertEquals(UIManager.get("MenuItem.margin"), border.getBorderInsets(new JMenuItem()));
-        assertEquals(UIManager.get("PasswordField.margin"), border.getBorderInsets(new JPasswordField()));
-        assertEquals(UIManager.get("RadioButton.margin"), border.getBorderInsets(new JRadioButton()));
-        assertEquals(UIManager.get("RadioButtonMenuItem.margin"), border.getBorderInsets(new JRadioButtonMenuItem()));
+        assertEquals(UIManager.get("PasswordField.margin"), border
+                .getBorderInsets(new JPasswordField()));
+        assertEquals(UIManager.get("RadioButton.margin"), border
+                .getBorderInsets(new JRadioButton()));
+        assertEquals(UIManager.get("RadioButtonMenuItem.margin"), border
+                .getBorderInsets(new JRadioButtonMenuItem()));
         assertEquals(UIManager.get("TextArea.margin"), border.getBorderInsets(new JTextArea()));
-        assertEquals(UIManager.get("TextField.margin"), border.getBorderInsets(new JTextField()));
+        assertEquals(UIManager.get("TextField.margin"), border
+                .getBorderInsets(new JTextField()));
         assertEquals(UIManager.get("TextPane.margin"), border.getBorderInsets(new JTextPane()));
-        assertEquals(UIManager.get("ToggleButton.margin"), border.getBorderInsets(new JToggleButton()));
+        assertEquals(UIManager.get("ToggleButton.margin"), border
+                .getBorderInsets(new JToggleButton()));
     }
 
     public void testMenuBarBorderClass() {
@@ -114,19 +124,22 @@
     }
 
     public void testRadioButtonBorderClass() {
-        BasicBorders.RadioButtonBorder border = new BasicBorders.RadioButtonBorder(shadow, darkShadow, highlight, lightHighlight);
+        BasicBorders.RadioButtonBorder border = new BasicBorders.RadioButtonBorder(shadow,
+                darkShadow, highlight, lightHighlight);
         checkCustomColors(border);
         checkInsets(border, new Insets(2, 2, 2, 2));
     }
 
     public void testRolloverButtonBorderClass() {
-        BasicBorders.RolloverButtonBorder border = new BasicBorders.RolloverButtonBorder(shadow, darkShadow, highlight, lightHighlight);
+        BasicBorders.RolloverButtonBorder border = new BasicBorders.RolloverButtonBorder(
+                shadow, darkShadow, highlight, lightHighlight);
         checkCustomColors(border);
         checkInsets(border, new Insets(2, 3, 3, 3));
     }
 
     public void testSplitPaneBorderClass() {
-        BasicBorders.SplitPaneBorder border = new BasicBorders.SplitPaneBorder(highlight, shadow);
+        BasicBorders.SplitPaneBorder border = new BasicBorders.SplitPaneBorder(highlight,
+                shadow);
         assertEquals(highlight, border.highlight);
         assertEquals(shadow, border.shadow);
         assertEquals(new Insets(1, 1, 1, 1), border.getBorderInsets(newJComponent()));
@@ -134,7 +147,8 @@
     }
 
     public void testToggleButtonBorderClass() {
-        BasicBorders.ToggleButtonBorder border = new BasicBorders.ToggleButtonBorder(shadow, darkShadow, highlight, lightHighlight);
+        BasicBorders.ToggleButtonBorder border = new BasicBorders.ToggleButtonBorder(shadow,
+                darkShadow, highlight, lightHighlight);
         checkCustomColors(border);
         checkInsets(border, new Insets(2, 2, 2, 2));
     }
@@ -142,14 +156,15 @@
     public void testGetToggleButtonBorder() {
         JComponent testButton = newJComponent();
         assertTrue(BasicBorders.getToggleButtonBorder() instanceof BorderUIResource.CompoundBorderUIResource);
-        BorderUIResource.CompoundBorderUIResource border = (BorderUIResource.CompoundBorderUIResource)BasicBorders.getToggleButtonBorder();
+        BorderUIResource.CompoundBorderUIResource border = (BorderUIResource.CompoundBorderUIResource) BasicBorders
+                .getToggleButtonBorder();
         assertTrue(border.getInsideBorder() instanceof BasicBorders.MarginBorder);
-        BasicBorders.MarginBorder insideBorder = (BasicBorders.MarginBorder)border.getInsideBorder();
+        BasicBorders.MarginBorder insideBorder = (BasicBorders.MarginBorder) border
+                .getInsideBorder();
         assertTrue(border.getOutsideBorder() instanceof BasicBorders.ToggleButtonBorder);
-        BasicBorders.ToggleButtonBorder outsideBorder = (BasicBorders.ToggleButtonBorder)border.getOutsideBorder();
-
+        BasicBorders.ToggleButtonBorder outsideBorder = (BasicBorders.ToggleButtonBorder) border
+                .getOutsideBorder();
         checkButtonBorder(outsideBorder);
-
         assertEquals(new Insets(0, 0, 0, 0), insideBorder.getBorderInsets(testButton));
         assertFalse(insideBorder.isBorderOpaque());
     }
@@ -157,13 +172,14 @@
     public void testGetTextFieldBorder() {
         JComponent testButton = newJComponent();
         assertTrue(BasicBorders.getTextFieldBorder() instanceof BasicBorders.FieldBorder);
-        BasicBorders.FieldBorder border = (BasicBorders.FieldBorder)BasicBorders.getTextFieldBorder();
-
+        BasicBorders.FieldBorder border = (BasicBorders.FieldBorder) BasicBorders
+                .getTextFieldBorder();
         if (isHarmony()) {
             assertEquals("shadow", new ColorUIResource(Color.GRAY), border.shadow);
             assertEquals("darkShadow", new ColorUIResource(Color.DARK_GRAY), border.darkShadow);
             assertEquals("highlight", new ColorUIResource(Color.WHITE), border.highlight);
-            assertEquals("lightHighlight", new ColorUIResource(Color.WHITE), border.lightHighlight);
+            assertEquals("lightHighlight", new ColorUIResource(Color.WHITE),
+                    border.lightHighlight);
         }
         assertFalse(border.isBorderOpaque());
         assertEquals(new Insets(2, 2, 2, 2), border.getBorderInsets(testButton));
@@ -171,10 +187,9 @@
 
     public void testGetSplitPaneDividerBorder() {
         JComponent c = new JComponent() {
+            private static final long serialVersionUID = 1L;
         };
-        assertTrue(BasicBorders.getSplitPaneDividerBorder() instanceof Border);
         Border border = BasicBorders.getSplitPaneDividerBorder();
-
         assertTrue(border.isBorderOpaque());
         assertEquals(new Insets(1, 1, 1, 1), border.getBorderInsets(c));
     }
@@ -182,8 +197,8 @@
     public void testGetSplitPaneBorder() {
         JComponent testButton = newJComponent();
         assertTrue(BasicBorders.getSplitPaneBorder() instanceof BasicBorders.SplitPaneBorder);
-        BasicBorders.SplitPaneBorder border = (BasicBorders.SplitPaneBorder)BasicBorders.getSplitPaneBorder();
-
+        BasicBorders.SplitPaneBorder border = (BasicBorders.SplitPaneBorder) BasicBorders
+                .getSplitPaneBorder();
         assertTrue(border.isBorderOpaque());
         assertEquals(new Insets(1, 1, 1, 1), border.getBorderInsets(testButton));
         if (isHarmony()) {
@@ -195,23 +210,24 @@
     public void testGetRadioButtonBorder() {
         JComponent testButton = newJComponent();
         assertTrue(BasicBorders.getRadioButtonBorder() instanceof BorderUIResource.CompoundBorderUIResource);
-        BorderUIResource.CompoundBorderUIResource border = (BorderUIResource.CompoundBorderUIResource)BasicBorders.getRadioButtonBorder();
+        BorderUIResource.CompoundBorderUIResource border = (BorderUIResource.CompoundBorderUIResource) BasicBorders
+                .getRadioButtonBorder();
         assertTrue(border.getInsideBorder() instanceof BasicBorders.MarginBorder);
-        BasicBorders.MarginBorder insideBorder = (BasicBorders.MarginBorder)border.getInsideBorder();
+        BasicBorders.MarginBorder insideBorder = (BasicBorders.MarginBorder) border
+                .getInsideBorder();
         assertTrue(border.getOutsideBorder() instanceof BasicBorders.RadioButtonBorder);
-        BasicBorders.RadioButtonBorder outsideBorder = (BasicBorders.RadioButtonBorder)border.getOutsideBorder();
-
+        BasicBorders.RadioButtonBorder outsideBorder = (BasicBorders.RadioButtonBorder) border
+                .getOutsideBorder();
         assertEquals(new Insets(0, 0, 0, 0), insideBorder.getBorderInsets(testButton));
         assertFalse(insideBorder.isBorderOpaque());
-
         checkButtonBorder(outsideBorder);
     }
 
     public void testGetProgressBarBorder() {
         JComponent testButton = newJComponent();
         assertTrue(BasicBorders.getProgressBarBorder() instanceof BorderUIResource.LineBorderUIResource);
-        BorderUIResource.LineBorderUIResource border = (BorderUIResource.LineBorderUIResource)BasicBorders.getProgressBarBorder();
-
+        BorderUIResource.LineBorderUIResource border = (BorderUIResource.LineBorderUIResource) BasicBorders
+                .getProgressBarBorder();
         assertFalse(border.getRoundedCorners());
         assertTrue(border.isBorderOpaque());
         assertEquals(new Insets(2, 2, 2, 2), border.getBorderInsets(testButton));
@@ -222,7 +238,8 @@
     public void testGetMenuBarBorder() {
         JComponent testButton = newJComponent();
         assertTrue(BasicBorders.getMenuBarBorder() instanceof BasicBorders.MenuBarBorder);
-        BasicBorders.MenuBarBorder border = (BasicBorders.MenuBarBorder)BasicBorders.getMenuBarBorder();
+        BasicBorders.MenuBarBorder border = (BasicBorders.MenuBarBorder) BasicBorders
+                .getMenuBarBorder();
         assertEquals(new Insets(0, 0, 2, 0), border.getBorderInsets(testButton));
         assertFalse(border.isBorderOpaque());
     }
@@ -230,35 +247,41 @@
     public void testGetInternalFrameBorder() {
         JComponent testButton = newJComponent();
         assertTrue(BasicBorders.getInternalFrameBorder() instanceof BorderUIResource.CompoundBorderUIResource);
-        BorderUIResource.CompoundBorderUIResource border = (BorderUIResource.CompoundBorderUIResource)BasicBorders.getInternalFrameBorder();
+        BorderUIResource.CompoundBorderUIResource border = (BorderUIResource.CompoundBorderUIResource) BasicBorders
+                .getInternalFrameBorder();
         assertTrue(border.getInsideBorder() instanceof LineBorder);
-        LineBorder insideBorder = (LineBorder)border.getInsideBorder();
+        LineBorder insideBorder = (LineBorder) border.getInsideBorder();
         assertTrue(border.getOutsideBorder() instanceof BevelBorder);
-        BevelBorder outsideBorder = (BevelBorder)border.getOutsideBorder();
+        BevelBorder outsideBorder = (BevelBorder) border.getOutsideBorder();
         assertEquals(new Insets(1, 1, 1, 1), insideBorder.getBorderInsets(testButton));
         assertEquals(new Insets(2, 2, 2, 2), outsideBorder.getBorderInsets(testButton));
         assertFalse(insideBorder.getRoundedCorners());
         assertEquals(1, insideBorder.getThickness());
         assertTrue(insideBorder.isBorderOpaque());
-
         assertEquals(0, outsideBorder.getBevelType());
         if (isHarmony()) {
             assertEquals(new ColorUIResource(Color.LIGHT_GRAY), insideBorder.getLineColor());
             assertEquals(new ColorUIResource(Color.GRAY), outsideBorder.getShadowInnerColor());
-            assertEquals(new ColorUIResource(Color.DARK_GRAY), outsideBorder.getShadowOuterColor());
-            assertEquals(new ColorUIResource(Color.WHITE), outsideBorder.getHighlightOuterColor());
-            assertEquals(new ColorUIResource(Color.WHITE), outsideBorder.getHighlightInnerColor());
+            assertEquals(new ColorUIResource(Color.DARK_GRAY), outsideBorder
+                    .getShadowOuterColor());
+            assertEquals(new ColorUIResource(Color.WHITE), outsideBorder
+                    .getHighlightOuterColor());
+            assertEquals(new ColorUIResource(Color.WHITE), outsideBorder
+                    .getHighlightInnerColor());
         }
     }
 
     public void testGetButtonBorder() {
         JComponent testButton = newJComponent();
         assertTrue(BasicBorders.getButtonBorder() instanceof BorderUIResource.CompoundBorderUIResource);
-        BorderUIResource.CompoundBorderUIResource border = (BorderUIResource.CompoundBorderUIResource)BasicBorders.getButtonBorder();
+        BorderUIResource.CompoundBorderUIResource border = (BorderUIResource.CompoundBorderUIResource) BasicBorders
+                .getButtonBorder();
         assertTrue(border.getInsideBorder() instanceof BasicBorders.MarginBorder);
-        BasicBorders.MarginBorder insideBorder = (BasicBorders.MarginBorder)border.getInsideBorder();
+        BasicBorders.MarginBorder insideBorder = (BasicBorders.MarginBorder) border
+                .getInsideBorder();
         assertTrue(border.getOutsideBorder() instanceof BasicBorders.ButtonBorder);
-        BasicBorders.ButtonBorder outsideBorder = (BasicBorders.ButtonBorder)border.getOutsideBorder();
+        BasicBorders.ButtonBorder outsideBorder = (BasicBorders.ButtonBorder) border
+                .getOutsideBorder();
         checkColors(outsideBorder);
         assertEquals(new Insets(0, 0, 0, 0), insideBorder.getBorderInsets(testButton));
         assertEquals(new Insets(2, 3, 3, 3), outsideBorder.getBorderInsets(testButton));
@@ -275,11 +298,12 @@
             assertEquals("shadow", new ColorUIResource(Color.GRAY), border.shadow);
             assertEquals("darkShadow", new ColorUIResource(Color.DARK_GRAY), border.darkShadow);
             assertEquals("highlight", new ColorUIResource(Color.WHITE), border.highlight);
-            assertEquals("lightHighlight", new ColorUIResource(Color.WHITE), border.lightHighlight);
+            assertEquals("lightHighlight", new ColorUIResource(Color.WHITE),
+                    border.lightHighlight);
         }
-
         JComponent button = newJComponent();
-        assertFalse("insets are not shared", border.getBorderInsets(button) == border.getBorderInsets(button));
+        assertFalse("insets are not shared", border.getBorderInsets(button) == border
+                .getBorderInsets(button));
     }
 
     private void checkCustomColors(final BasicBorders.ButtonBorder border) {
@@ -287,9 +311,9 @@
         assertEquals("darkShadow", darkShadow, border.darkShadow);
         assertEquals("highlight", highlight, border.highlight);
         assertEquals("lightHighlight", lightHighlight, border.lightHighlight);
-
         JComponent button = newJComponent();
-        assertFalse("insets are not shared", border.getBorderInsets(button) == border.getBorderInsets(button));
+        assertFalse("insets are not shared", border.getBorderInsets(button) == border
+                .getBorderInsets(button));
     }
 
     private void checkInsets(final AbstractBorder border, final Insets testInsets) {
@@ -298,13 +322,13 @@
         Insets insets = new Insets(0, 0, 0, 0);
         border.getBorderInsets(newJComponent(), insets);
         assertEquals(border.getBorderInsets(newJComponent()), insets);
-
         JComponent button = newJComponent();
         assertFalse(border.getBorderInsets(button) == border.getBorderInsets(button));
     }
 
     private JComponent newJComponent() {
         return new JComponent() {
+            private static final long serialVersionUID = 1L;
         };
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonListenerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonListenerTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonListenerTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonListenerTest.java Sun Nov 26 12:15:43 2006
@@ -22,7 +22,6 @@
 
 import java.awt.event.FocusEvent;
 import java.util.ArrayList;
-
 import javax.swing.AbstractButton;
 import javax.swing.ButtonModel;
 import javax.swing.JButton;
@@ -34,13 +33,6 @@
 
 public class BasicButtonListenerTest extends SwingTestCase {
 
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
     public void testBasicButtonListener() {
         //TODO Implement BasicButtonListener().
     }
@@ -55,12 +47,13 @@
 
     public void testInstallKeyboardActions() {
         AbstractButton button = new JButton();
-        BasicButtonListener listener =  new BasicButtonListener(button);
+        BasicButtonListener listener = new BasicButtonListener(button);
         assertEquals(0, button.getActionMap().size());
         assertNotNull(button.getActionMap().getParent());
         assertEquals(3, button.getActionMap().getParent().size());
         assertEquals(2, button.getRegisteredKeyStrokes().length);
         KeyStroke ks = button.getRegisteredKeyStrokes()[0];
+        assertNotNull(ks);
         listener.installKeyboardActions(button);
         assertEquals(0, button.getActionMap().size());
         assertEquals(3, button.getActionMap().getParent().size());
@@ -110,12 +103,13 @@
     }
 
     class AdvancedChangeListener implements ChangeListener {
-        public ArrayList events = new ArrayList();
-        public ArrayList states = new ArrayList();
+        public ArrayList<ChangeEvent> events = new ArrayList<ChangeEvent>();
+
+        public ArrayList<Boolean> states = new ArrayList<Boolean>();
 
         public void stateChanged(ChangeEvent e) {
             events.add(e);
-            ButtonModel model = (ButtonModel)e.getSource();
+            ButtonModel model = (ButtonModel) e.getSource();
             states.add(Boolean.valueOf(model.isPressed()));
             states.add(Boolean.valueOf(model.isArmed()));
         }
@@ -123,15 +117,12 @@
 
     public void testFocusLost() {
         final JToggleButton button = new JToggleButton();
-
         button.getModel().setPressed(true);
         button.getModel().setArmed(true);
         button.getModel().setRollover(true);
-
-        BasicButtonListener listener = (BasicButtonListener)button.getChangeListeners()[0];
+        BasicButtonListener listener = (BasicButtonListener) button.getChangeListeners()[0];
         AdvancedChangeListener changeListener = new AdvancedChangeListener();
         button.getModel().addChangeListener(changeListener);
-
         listener.focusLost(new FocusEvent(button, 0));
         if (isHarmony()) {
             assertEquals("number of events", 2, changeListener.events.size());
@@ -141,14 +132,11 @@
             assertEquals("Armed", Boolean.FALSE, changeListener.states.get(3));
             assertFalse("Pressed", button.getModel().isPressed());
         }
-
         assertFalse("Armed", button.getModel().isArmed());
         assertTrue("Rollover", button.getModel().isRollover());
     }
 
-
     public void testFocusGained() {
         //TODO Implement focusGained().
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonUITest.java Sun Nov 26 12:15:43 2006
@@ -26,7 +26,6 @@
 import java.awt.Dimension;
 import java.awt.Font;
 import java.awt.image.BufferedImage;
-
 import javax.swing.BorderFactory;
 import javax.swing.ImageIcon;
 import javax.swing.InputMap;
@@ -42,15 +41,15 @@
 import javax.swing.plaf.InputMapUIResource;
 
 public class BasicButtonUITest extends SwingTestCase {
-
     protected BasicButtonUI ui;
+
     protected InputMap uiInputMap;
 
     Border previousBorder;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         ui = new BasicButtonUI();
         previousBorder = UIManager.getBorder("Button.border");
         uiInputMap = new InputMapUIResource();
@@ -60,116 +59,111 @@
         uiInputMap.put(KeyStroke.getKeyStroke("released ENTER"), "released");
     }
 
+    @Override
     protected void tearDown() throws Exception {
         UIManager.put("Button.border", previousBorder);
-
         super.tearDown();
     }
 
-
-
     public void testGetPreferredSize() {
         Font font = new FontUIResource(new Font("serif", Font.PLAIN, 24));
         UIManager.put("Button.font", font);
-
         JButton button1 = new JButton();
         JButton button2 = new JButton("text");
         JButton button3 = new JButton("text");
         JButton button4 = new JButton();
         JButton button5 = new JButton("text");
         JButton button6 = new JButton("text");
-
         button3.setBorder(new EmptyBorder(10, 10, 10, 10));
         button6.setBorder(null);
         button4.setIcon(new ImageIcon(new BufferedImage(20, 20, BufferedImage.TYPE_INT_ARGB)));
         button5.setIcon(new ImageIcon(new BufferedImage(30, 30, BufferedImage.TYPE_INT_ARGB)));
-
         int horInsets = button1.getInsets().left + button1.getInsets().right;
         int vertInsets = button1.getInsets().top + button1.getInsets().bottom;
         int textWidth = button1.getFontMetrics(button1.getFont()).stringWidth("text");
         int textHeight = button1.getFontMetrics(button1.getFont()).getHeight();
-        assertEquals("PreferredSize", new Dimension(horInsets, vertInsets), ui.getPreferredSize(button1));
-        assertEquals("PreferredSize", new Dimension(horInsets + textWidth, vertInsets + textHeight), ui.getPreferredSize(button2));
-        assertEquals("PreferredSize", new Dimension(horInsets + button4.getIcon().getIconWidth(),
-                                                  vertInsets + button4.getIcon().getIconHeight()),
-                                    ui.getPreferredSize(button4));
-
+        assertEquals("PreferredSize", new Dimension(horInsets, vertInsets), ui
+                .getPreferredSize(button1));
+        assertEquals("PreferredSize", new Dimension(horInsets + textWidth, vertInsets
+                + textHeight), ui.getPreferredSize(button2));
+        assertEquals("PreferredSize", new Dimension(horInsets
+                + button4.getIcon().getIconWidth(), vertInsets
+                + button4.getIcon().getIconHeight()), ui.getPreferredSize(button4));
         int height = vertInsets + Math.max(button5.getIcon().getIconHeight(), textHeight);
-        int width = horInsets + textWidth + button5.getIcon().getIconWidth() + button5.getIconTextGap();
-        assertEquals("PreferredSize", new Dimension(width, height), ui.getPreferredSize(button5));
-
+        int width = horInsets + textWidth + button5.getIcon().getIconWidth()
+                + button5.getIconTextGap();
+        assertEquals("PreferredSize", new Dimension(width, height), ui
+                .getPreferredSize(button5));
         horInsets = button3.getInsets().left + button3.getInsets().right;
         vertInsets = button3.getInsets().top + button3.getInsets().bottom;
-        assertEquals("PreferredSize", new Dimension(horInsets + textWidth, vertInsets + textHeight), ui.getPreferredSize(button3));
+        assertEquals("PreferredSize", new Dimension(horInsets + textWidth, vertInsets
+                + textHeight), ui.getPreferredSize(button3));
         horInsets = button6.getInsets().left + button6.getInsets().right;
         vertInsets = button6.getInsets().top + button6.getInsets().bottom;
-        assertEquals("PreferredSize", new Dimension(horInsets + textWidth, vertInsets + textHeight), ui.getPreferredSize(button6));
+        assertEquals("PreferredSize", new Dimension(horInsets + textWidth, vertInsets
+                + textHeight), ui.getPreferredSize(button6));
     }
 
     public void testGetMinimumSize() {
         Font font = new FontUIResource(new Font("serif", Font.PLAIN, 24));
         UIManager.put("Button.font", font);
-
         JButton button1 = new JButton();
         JButton button2 = new JButton("text");
         JButton button3 = new JButton("text");
         JButton button4 = new JButton();
         JButton button5 = new JButton("text");
-
         button3.setBorder(new EmptyBorder(10, 10, 10, 10));
         button4.setIcon(new ImageIcon(new BufferedImage(20, 20, BufferedImage.TYPE_INT_ARGB)));
         button5.setIcon(new ImageIcon(new BufferedImage(30, 30, BufferedImage.TYPE_INT_ARGB)));
-
         int horInsets = button1.getInsets().left + button1.getInsets().right;
         int vertInsets = button1.getInsets().top + button1.getInsets().bottom;
         int textWidth = button1.getFontMetrics(button1.getFont()).stringWidth("text");
         int textHeight = button1.getFontMetrics(button1.getFont()).getHeight();
-        assertEquals("MinimumSize", new Dimension(horInsets, vertInsets), ui.getMinimumSize(button1));
-        assertEquals("MinimumSize", new Dimension(horInsets + textWidth, vertInsets + textHeight), ui.getMinimumSize(button2));
+        assertEquals("MinimumSize", new Dimension(horInsets, vertInsets), ui
+                .getMinimumSize(button1));
+        assertEquals("MinimumSize", new Dimension(horInsets + textWidth, vertInsets
+                + textHeight), ui.getMinimumSize(button2));
         assertEquals("MinimumSize", new Dimension(horInsets + button4.getIcon().getIconWidth(),
-                                                  vertInsets + button4.getIcon().getIconHeight()),
-                                    ui.getMinimumSize(button4));
-
+                vertInsets + button4.getIcon().getIconHeight()), ui.getMinimumSize(button4));
         int height = vertInsets + Math.max(button5.getIcon().getIconHeight(), textHeight);
-        int width = horInsets + textWidth + button5.getIcon().getIconWidth() + button5.getIconTextGap();
+        int width = horInsets + textWidth + button5.getIcon().getIconWidth()
+                + button5.getIconTextGap();
         assertEquals("MinimumSize", new Dimension(width, height), ui.getMinimumSize(button5));
-
         horInsets = button3.getInsets().left + button3.getInsets().right;
         vertInsets = button3.getInsets().top + button3.getInsets().bottom;
-        assertEquals("MinimumSize", new Dimension(horInsets + textWidth, vertInsets + textHeight), ui.getMinimumSize(button3));
+        assertEquals("MinimumSize", new Dimension(horInsets + textWidth, vertInsets
+                + textHeight), ui.getMinimumSize(button3));
     }
 
     public void testGetMaximumSize() {
         Font font = new FontUIResource(new Font("serif", Font.PLAIN, 24));
         UIManager.put("Button.font", font);
-
         JButton button1 = new JButton();
         JButton button2 = new JButton("text");
         JButton button3 = new JButton("text");
         JButton button4 = new JButton();
         JButton button5 = new JButton("text");
-
         button3.setBorder(new EmptyBorder(10, 10, 10, 10));
         button4.setIcon(new ImageIcon(new BufferedImage(20, 20, BufferedImage.TYPE_INT_ARGB)));
         button5.setIcon(new ImageIcon(new BufferedImage(30, 30, BufferedImage.TYPE_INT_ARGB)));
-
         int horInsets = button1.getInsets().left + button1.getInsets().right;
         int vertInsets = button1.getInsets().top + button1.getInsets().bottom;
         int textWidth = button1.getFontMetrics(button1.getFont()).stringWidth("text");
         int textHeight = button1.getFontMetrics(button1.getFont()).getHeight();
-        assertEquals("MaximumSize", new Dimension(horInsets, vertInsets), ui.getMaximumSize(button1));
-        assertEquals("MaximumSize", new Dimension(horInsets + textWidth, vertInsets + textHeight), ui.getMaximumSize(button2));
+        assertEquals("MaximumSize", new Dimension(horInsets, vertInsets), ui
+                .getMaximumSize(button1));
+        assertEquals("MaximumSize", new Dimension(horInsets + textWidth, vertInsets
+                + textHeight), ui.getMaximumSize(button2));
         assertEquals("MaximumSize", new Dimension(horInsets + button4.getIcon().getIconWidth(),
-                                                  vertInsets + button4.getIcon().getIconHeight()),
-                                    ui.getMaximumSize(button4));
-
+                vertInsets + button4.getIcon().getIconHeight()), ui.getMaximumSize(button4));
         int height = vertInsets + Math.max(button5.getIcon().getIconHeight(), textHeight);
-        int width = horInsets + textWidth + button5.getIcon().getIconWidth() + button5.getIconTextGap();
+        int width = horInsets + textWidth + button5.getIcon().getIconWidth()
+                + button5.getIconTextGap();
         assertEquals("MaximumSize", new Dimension(width, height), ui.getMaximumSize(button5));
-
         horInsets = button3.getInsets().left + button3.getInsets().right;
         vertInsets = button3.getInsets().top + button3.getInsets().bottom;
-        assertEquals("MaximumSize", new Dimension(horInsets + textWidth, vertInsets + textHeight), ui.getMaximumSize(button3));
+        assertEquals("MaximumSize", new Dimension(horInsets + textWidth, vertInsets
+                + textHeight), ui.getMaximumSize(button3));
     }
 
     /**
@@ -179,28 +173,31 @@
         UIManager.put("Button.focusInputMap", uiInputMap);
         JButton button = new JButton();
         button.setUI(ui);
-
-        assertTrue("there is one property listener", button.getPropertyChangeListeners().length == 1 &&
-                button.getPropertyChangeListeners()[0] instanceof BasicButtonListener);
+        assertTrue(
+                "there is one property listener",
+                button.getPropertyChangeListeners().length == 1
+                        && button.getPropertyChangeListeners()[0] instanceof BasicButtonListener);
         assertTrue("there is border", button.getBorder() != null);
-        assertTrue("there is one change listener", button.getChangeListeners().length == 1 &&
-                button.getChangeListeners()[0] instanceof BasicButtonListener);
+        assertTrue("there is one change listener", button.getChangeListeners().length == 1
+                && button.getChangeListeners()[0] instanceof BasicButtonListener);
         assertEquals(4, button.getRegisteredKeyStrokes().length);
-
         ui.uninstallUI(button);
-        assertTrue("there are no property listeners", button.getPropertyChangeListeners().length == 0);
+        assertTrue("there are no property listeners",
+                button.getPropertyChangeListeners().length == 0);
         assertNull("there ain't no border", button.getBorder());
         assertTrue("there are no change listeners", button.getChangeListeners().length == 0);
-        assertTrue("no RegisteredKeyStrokes installed", button.getRegisteredKeyStrokes().length == 0);
+        assertTrue("no RegisteredKeyStrokes installed",
+                button.getRegisteredKeyStrokes().length == 0);
         assertTrue("opaque", button.isOpaque());
-
         button.setOpaque(false);
         ui.installUI(button);
-        assertTrue("there is one property listener", button.getPropertyChangeListeners().length == 1 &&
-                button.getPropertyChangeListeners()[0] instanceof BasicButtonListener);
+        assertTrue(
+                "there is one property listener",
+                button.getPropertyChangeListeners().length == 1
+                        && button.getPropertyChangeListeners()[0] instanceof BasicButtonListener);
         assertTrue("there is border", button.getBorder() != null);
-        assertTrue("there is one change listener", button.getChangeListeners().length == 1 &&
-                button.getChangeListeners()[0] instanceof BasicButtonListener);
+        assertTrue("there is one change listener", button.getChangeListeners().length == 1
+                && button.getChangeListeners()[0] instanceof BasicButtonListener);
         assertEquals(4, button.getRegisteredKeyStrokes().length);
         if (isHarmony()) {
             assertFalse(button.isOpaque());
@@ -219,7 +216,6 @@
         UIManager.put("Button.border", border2);
         button.setOpaque(false);
         UIManager.put("Button.textIconGap", new Integer(100));
-
         button.setUI(buttonUI);
         assertEquals(Color.red, button.getBackground());
         assertEquals(Color.yellow, button.getForeground());
@@ -228,7 +224,6 @@
         if (isHarmony()) {
             assertFalse(button.isOpaque());
         }
-
         Border border1 = BorderFactory.createEmptyBorder();
         button.setBorder(border1);
         button.setUI(buttonUI);
@@ -240,7 +235,6 @@
             assertNull(button.getForeground());
         }
         assertNotNull(button.getBorder());
-
         UIManager.put("Button.background", Color.red);
         button.setUI(buttonUI);
         buttonUI.uninstallUI(button);
@@ -256,8 +250,10 @@
 
     public void testCreateUI() {
         assertNotNull("created UI is not null", BasicButtonUI.createUI(new JButton()));
-        assertTrue("created UI is of the proper class", BasicButtonUI.createUI(null) instanceof BasicButtonUI);
-        assertSame("created UI is of unique", BasicButtonUI.createUI(null), BasicButtonUI.createUI(null));
+        assertTrue("created UI is of the proper class",
+                BasicButtonUI.createUI(null) instanceof BasicButtonUI);
+        assertSame("created UI is of unique", BasicButtonUI.createUI(null), BasicButtonUI
+                .createUI(null));
     }
 
     public void testCreateButtonListener() {
@@ -266,7 +262,6 @@
         BasicButtonListener res1 = ui.createButtonListener(button1);
         BasicButtonListener res2 = ui.createButtonListener(button2);
         BasicButtonListener res3 = ui.createButtonListener(button2);
-
         assertNotNull("listener created", res1);
         assertNotNull("listener created", res2);
         assertNotNull("listener created", res3);
@@ -274,23 +269,20 @@
         assertTrue("created listeners are unique", res2 != res3);
     }
 
-
     /**
      * uninstallListeners() and installListeners() are being tested here
      */
     public void testInstallUninstallListeners() {
         JButton button = new JButton();
         button.setUI(ui);
-
         ui.uninstallListeners(button);
         assertEquals("PropertyChangeListeners", 0, button.getPropertyChangeListeners().length);
         assertEquals("ChangeListeners", 0, button.getChangeListeners().length);
-
         ui.installListeners(button);
         assertEquals("PropertyChangeListeners", 1, button.getPropertyChangeListeners().length);
         assertEquals("ChangeListeners", 1, button.getChangeListeners().length);
-        assertTrue("listeners", button.getPropertyChangeListeners()[0].equals(button.getChangeListeners()[0]));
-
+        assertTrue("listeners", button.getPropertyChangeListeners()[0].equals(button
+                .getChangeListeners()[0]));
         ui.uninstallListeners(button);
         assertEquals("PropertyChangeListeners", 0, button.getPropertyChangeListeners().length);
         assertEquals("ChangeListeners", 0, button.getChangeListeners().length);
@@ -302,7 +294,6 @@
                 return true;
             }
         }
-
         return false;
     }
 
@@ -313,13 +304,10 @@
         JButton button = new JButton();
         button.setUI(ui);
         UIManager.put("Button.focusInputMap", uiInputMap);
-
         ui.uninstallKeyboardActions(button);
         assertEquals("RegisteredKeyStrokes", 0, button.getRegisteredKeyStrokes().length);
-
         ui.installKeyboardActions(button);
         assertEquals("RegisteredKeyStrokes", 4, button.getRegisteredKeyStrokes().length);
-
         ui.uninstallKeyboardActions(button);
         assertEquals("RegisteredKeyStrokes", 0, button.getRegisteredKeyStrokes().length);
     }
@@ -330,7 +318,6 @@
     public void testInstallUninstallDefaults() {
         JButton button = new JButton();
         button.setUI(ui);
-
         ui.uninstallDefaults(button);
         assertNull("border", button.getBorder());
         if (!isHarmony()) {
@@ -342,7 +329,6 @@
         }
         UIManager.put("Button.textIconGap", new Integer(100));
         UIManager.put("Button.textShiftOffset", new Integer(1000));
-
         button.setOpaque(false);
         ui.installDefaults(button);
         assertNotNull(button.getBorder());
@@ -352,17 +338,14 @@
         assertEquals(100, ui.getDefaultTextIconGap(button));
         assertTrue(100 != button.getIconTextGap());
         assertEquals(1000, ui.defaultTextShiftOffset);
-
         Border border = new EmptyBorder(1, 1, 1, 1);
         button.setBorder(border);
-
         ui.uninstallDefaults(button);
         assertEquals("border ", border, button.getBorder());
     }
 
     public void testGetDefaultTextIconGap() {
         JButton button = new JButton("text");
-
         assertEquals("DefaultTextIconGap", 0, ui.getDefaultTextIconGap(button));
         assertEquals("DefaultTextIconGap", 0, ui.getDefaultTextIconGap(null));
     }
@@ -384,5 +367,4 @@
         ui.defaultTextShiftOffset = 100;
         assertEquals("offset", 0, ui.getTextShiftOffset());
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicCheckBoxMenuItemUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicCheckBoxMenuItemUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicCheckBoxMenuItemUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicCheckBoxMenuItemUITest.java Sun Nov 26 12:15:43 2006
@@ -15,35 +15,35 @@
  *  limitations under the License.
  */
 /**
-* @author Alexander T. Simbirtsev
-* @version $Revision$
-*/
+ * @author Alexander T. Simbirtsev
+ * @version $Revision$
+ */
 package javax.swing.plaf.basic;
 
 import javax.swing.plaf.ComponentUI;
 
 public class BasicCheckBoxMenuItemUITest extends BasicMenuItemUITest {
-
     protected BasicCheckBoxMenuItemUI checkBoxUI;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         checkBoxUI = new BasicCheckBoxMenuItemUI();
         menuItemUI = checkBoxUI;
         prefix = "CheckBoxMenuItem.";
     }
 
+    @Override
     protected void tearDown() throws Exception {
         checkBoxUI = null;
         menuItemUI = null;
         super.tearDown();
     }
 
-
     /*
      * Test method for 'javax.swing.plaf.basic.BasicCheckBoxMenuItemUI.createUI(JComponent)'
      */
+    @Override
     public void testCreateUI() {
         ComponentUI ui1 = BasicCheckBoxMenuItemUI.createUI(null);
         ComponentUI ui2 = BasicCheckBoxMenuItemUI.createUI(null);
@@ -54,6 +54,7 @@
     /*
      * Test method for 'javax.swing.plaf.basic.BasicCheckBoxMenuItemUI.getPropertyPrefix()'
      */
+    @Override
     public void testGetPropertyPrefix() {
         assertEquals("CheckBoxMenuItem", menuItemUI.getPropertyPrefix());
     }
@@ -63,5 +64,4 @@
      */
     public void testProcessMouseEvent() {
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicCheckBoxUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicCheckBoxUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicCheckBoxUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicCheckBoxUITest.java Sun Nov 26 12:15:43 2006
@@ -26,7 +26,6 @@
 import java.awt.Dimension;
 import java.awt.Font;
 import java.awt.image.BufferedImage;
-
 import javax.swing.AbstractButton;
 import javax.swing.BorderFactory;
 import javax.swing.Icon;
@@ -42,20 +41,23 @@
 import javax.swing.plaf.FontUIResource;
 
 public class BasicCheckBoxUITest extends SwingTestCase {
-
     public class MyBasicCheckBoxUI extends BasicCheckBoxUI {
+        @Override
         public String getPropertyPrefix() {
             return super.getPropertyPrefix();
         }
 
+        @Override
         public void installDefaults(final AbstractButton b) {
             super.installDefaults(b);
         }
 
+        @Override
         public void uninstallDefaults(final AbstractButton b) {
             super.uninstallDefaults(b);
         }
 
+        @Override
         public int getTextShiftOffset() {
             return super.getTextShiftOffset();
         }
@@ -78,9 +80,9 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         ui = new MyBasicCheckBoxUI();
     }
 
@@ -89,12 +91,10 @@
         UIManager.put("CheckBox.font", font);
         Border border = new BorderUIResource(BorderFactory.createEmptyBorder(11, 11, 11, 11));
         UIManager.put("CheckBox.border", border);
-
         JCheckBox button1 = new JCheckBox();
         JCheckBox button2 = new JCheckBox("text");
         JCheckBox button3 = new JCheckBox("text");
         JCheckBox button6 = new JCheckBox("text");
-
         button3.setBorder(new EmptyBorder(10, 10, 10, 10));
         button6.setBorder(null);
         int iconH = 20;
@@ -103,35 +103,33 @@
         // following parameters are not being used by UI
         ui.setTextIconGap(100);
         ui.setTextShiftOffset(33);
-
         int horInsets = button1.getInsets().left + button1.getInsets().right;
         int vertInsets = button1.getInsets().top + button1.getInsets().bottom;
         int textWidth = button1.getFontMetrics(button1.getFont()).stringWidth("text");
         int textHeight = button1.getFontMetrics(button1.getFont()).getHeight();
-
-        assertEquals("PreferredSize", new Dimension(horInsets + iconW, vertInsets + iconH),
-                     ui.getPreferredSize(button1));
-        assertEquals("PreferredSize", new Dimension(horInsets + iconW + textWidth + button1.getIconTextGap(),
-                                                    vertInsets + Math.max(iconH, textHeight)),
-                                      ui.getPreferredSize(button2));
-
+        assertEquals("PreferredSize", new Dimension(horInsets + iconW, vertInsets + iconH), ui
+                .getPreferredSize(button1));
+        assertEquals("PreferredSize", new Dimension(horInsets + iconW + textWidth
+                + button1.getIconTextGap(), vertInsets + Math.max(iconH, textHeight)), ui
+                .getPreferredSize(button2));
         horInsets = button3.getInsets().left + button3.getInsets().right;
         vertInsets = button3.getInsets().top + button3.getInsets().bottom;
-        assertEquals("PreferredSize", new Dimension(horInsets + iconW + textWidth + button1.getIconTextGap(),
-                                                    vertInsets + Math.max(iconH, textHeight)),
-                                      ui.getPreferredSize(button3));
-
+        assertEquals("PreferredSize", new Dimension(horInsets + iconW + textWidth
+                + button1.getIconTextGap(), vertInsets + Math.max(iconH, textHeight)), ui
+                .getPreferredSize(button3));
         horInsets = button6.getInsets().left + button6.getInsets().right;
         vertInsets = button6.getInsets().top + button6.getInsets().bottom;
-        assertEquals("PreferredSize", new Dimension(horInsets + iconW + textWidth + button1.getIconTextGap(),
-                                                    vertInsets + Math.max(iconH, textHeight)),
-                                      ui.getPreferredSize(button6));
+        assertEquals("PreferredSize", new Dimension(horInsets + iconW + textWidth
+                + button1.getIconTextGap(), vertInsets + Math.max(iconH, textHeight)), ui
+                .getPreferredSize(button6));
     }
 
     public void testCreateUI() {
         assertTrue("created UI is not null", null != BasicCheckBoxUI.createUI(new JButton()));
-        assertTrue("created UI is of the proper class", BasicCheckBoxUI.createUI(null) instanceof BasicCheckBoxUI);
-        assertTrue("created UI is not unique", BasicCheckBoxUI.createUI(null) == BasicCheckBoxUI.createUI(null));
+        assertTrue("created UI is of the proper class",
+                BasicCheckBoxUI.createUI(null) instanceof BasicCheckBoxUI);
+        assertTrue("created UI is not unique",
+                BasicCheckBoxUI.createUI(null) == BasicCheckBoxUI.createUI(null));
     }
 
     public void testUninstallDefaults() {
@@ -143,7 +141,6 @@
         UIManager.put("CheckBox.font", font);
         Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
         UIManager.put("CheckBox.border", border);
-
         button.setUI(ui);
         ui.installDefaults(button);
         ui.uninstallDefaults(button);
@@ -162,7 +159,6 @@
         UIManager.put("CheckBox.font", font);
         Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
         UIManager.put("CheckBox.border", border);
-
         button.setUI(ui);
         ui.installDefaults(button);
         assertEquals("background", Color.blue, button.getBackground());
@@ -181,5 +177,4 @@
         ui.setIcon(icon);
         assertEquals("icon", icon, ui.getDefaultIcon());
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicColorChooserUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicColorChooserUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicColorChooserUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicColorChooserUITest.java Sun Nov 26 12:15:43 2006
@@ -14,17 +14,13 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Sergey Burlak
  * @version $Revision$
  */
 package javax.swing.plaf.basic;
 
-import java.awt.Image;
-
 import javax.swing.BasicSwingTestCase;
-import javax.swing.Icon;
 import javax.swing.JColorChooser;
 import javax.swing.JPanel;
 import javax.swing.JTabbedPane;
@@ -33,14 +29,17 @@
 
 public class BasicColorChooserUITest extends BasicSwingTestCase {
     private JColorChooser ch;
+
     private BasicColorChooserUI ui;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         ch = new JColorChooser();
-        ui = (BasicColorChooserUI)ch.getUI();
+        ui = (BasicColorChooserUI) ch.getUI();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         ch = null;
@@ -63,20 +62,18 @@
         assertNotNull(ui.createPropertyChangeListener());
         if (isHarmony()) {
             assertNotSame(ui.createPropertyChangeListener(), ui.createPropertyChangeListener());
-            assertSame(BasicColorChooserUI.PropertyHandler.class, ui.createPropertyChangeListener().getClass());
+            assertSame(BasicColorChooserUI.PropertyHandler.class, ui
+                    .createPropertyChangeListener().getClass());
         }
     }
 
     public void testInstallUninstallPreviewPanel() throws Exception {
         assertEquals(2, ch.getComponentCount());
         assertNotNull(findComponent(ch, JTabbedPane.class, true));
-
         ch.remove(ch.getComponent(1));
         assertEquals(1, ch.getComponentCount());
-
         ch.setPreviewPanel(new JPanel());
         assertEquals(1, ch.getComponentCount());
-
         ui.installPreviewPanel();
         assertEquals(1, ch.getComponentCount());
     }
@@ -84,21 +81,19 @@
     public void testUninstallDefaultChoosers() throws Exception {
         assertEquals(2, ch.getComponentCount());
         assertNotNull(findComponent(ch, JTabbedPane.class, true));
-        assertEquals(3, ((JTabbedPane)findComponent(ch, JTabbedPane.class, true)).getTabCount());
-
+        assertEquals(3, ((JTabbedPane) findComponent(ch, JTabbedPane.class, true))
+                .getTabCount());
         ch.removeChooserPanel(ch.getChooserPanels()[0]);
         assertEquals(2, ch.getComponentCount());
         assertNotNull(findComponent(ch, JTabbedPane.class, true));
-        assertEquals(2, ((JTabbedPane)findComponent(ch, JTabbedPane.class, true)).getTabCount());
-
+        assertEquals(2, ((JTabbedPane) findComponent(ch, JTabbedPane.class, true))
+                .getTabCount());
         ch.removeChooserPanel(ch.getChooserPanels()[0]);
         assertEquals(2, ch.getComponentCount());
         assertNull(findComponent(ch, JTabbedPane.class, true));
-
         ch.removeChooserPanel(ch.getChooserPanels()[0]);
         assertEquals(2, ch.getComponentCount());
         assertNull(findComponent(ch, JTabbedPane.class, true));
-
         ui.defaultChoosers = new AbstractColorChooserPanel[0];
         ui.uninstallDefaultChoosers();
         assertEquals(2, ch.getComponentCount());
@@ -108,15 +103,15 @@
     public void testInstallUninstallListeners() throws Exception {
         ui.uninstallListeners();
         int propChangeListCount = ch.getPropertyChangeListeners().length;
-        int changeListcount = ((DefaultColorSelectionModel)ch.getSelectionModel()).getChangeListeners().length;
-
+        int changeListcount = ((DefaultColorSelectionModel) ch.getSelectionModel())
+                .getChangeListeners().length;
         ui.installListeners();
-
         assertEquals(propChangeListCount + 1, ch.getPropertyChangeListeners().length);
-        assertEquals(changeListcount + 1, ((DefaultColorSelectionModel)ch.getSelectionModel()).getChangeListeners().length);
-
+        assertEquals(changeListcount + 1, ((DefaultColorSelectionModel) ch.getSelectionModel())
+                .getChangeListeners().length);
         ui.uninstallListeners();
         assertEquals(propChangeListCount, ch.getPropertyChangeListeners().length);
-        assertEquals(changeListcount, ((DefaultColorSelectionModel)ch.getSelectionModel()).getChangeListeners().length);
+        assertEquals(changeListcount, ((DefaultColorSelectionModel) ch.getSelectionModel())
+                .getChangeListeners().length);
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxEditorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxEditorTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxEditorTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxEditorTest.java Sun Nov 26 12:15:43 2006
@@ -22,7 +22,6 @@
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-
 import javax.swing.JTextField;
 import javax.swing.SwingTestCase;
 
@@ -33,10 +32,12 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         editor = new BasicComboBoxEditor();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         editor = null;
     }
@@ -50,10 +51,8 @@
         assertEquals(0, editor.editor.getActionListeners().length);
         editor.addActionListener(controller);
         assertEquals(1, editor.editor.getActionListeners().length);
-
         editor.addActionListener(new ActionController());
         assertEquals(2, editor.editor.getActionListeners().length);
-
         editor.removeActionListener(controller);
         assertEquals(1, editor.editor.getActionListeners().length);
     }
@@ -67,12 +66,10 @@
     public void testGetSetItem() throws Exception {
         assertEquals("", editor.getItem());
         assertEquals("", editor.editor.getText());
-
         Object item = "any";
         editor.setItem(item);
         assertEquals(item, editor.getItem());
         assertEquals(item, editor.editor.getText());
-
         item = "another";
         editor.editor.setText(item.toString());
         assertEquals(item, editor.editor.getText());
@@ -81,13 +78,11 @@
 
     public void testSelectAll() throws Exception {
         assertNull(editor.editor.getSelectedText());
-
         editor.setItem("any");
         assertNull(editor.editor.getSelectedText());
         editor.selectAll();
         assertEquals("any", editor.editor.getSelectedText());
     }
-
 
     private class ActionController implements ActionListener {
         public void actionPerformed(final ActionEvent e) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxRendererTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxRendererTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxRendererTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxRendererTest.java Sun Nov 26 12:15:43 2006
@@ -23,7 +23,6 @@
 import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.Font;
-
 import javax.swing.BorderFactory;
 import javax.swing.JLabel;
 import javax.swing.JList;
@@ -36,10 +35,12 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         renderer = new BasicComboBoxRenderer();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         renderer = null;
     }
@@ -47,41 +48,35 @@
     public void testBasicComboBoxRenderer() throws Exception {
         assertNotNull(BasicComboBoxRenderer.noFocusBorder);
         assertEquals(BasicComboBoxRenderer.noFocusBorder, renderer.getBorder());
-
         BasicComboBoxRenderer.noFocusBorder = BorderFactory.createEmptyBorder(1, 1, 1, 1);
         assertNotSame(BasicComboBoxRenderer.noFocusBorder, renderer.getBorder());
-        assertEquals(BasicComboBoxRenderer.noFocusBorder, new BasicComboBoxRenderer().getBorder());
-
+        assertEquals(BasicComboBoxRenderer.noFocusBorder, new BasicComboBoxRenderer()
+                .getBorder());
         assertEquals("", renderer.getText());
     }
 
     public void testGetListCellRendererComponent() throws Exception {
         JList list = new JList();
-        assertEquals(renderer, renderer.getListCellRendererComponent(list, "aaa", 0, false, false));
+        assertEquals(renderer, renderer.getListCellRendererComponent(list, "aaa", 0, false,
+                false));
         assertTrue(renderer.isOpaque());
-
         Font newFont = list.getFont().deriveFont(20f);
         list.setFont(newFont);
         assertNotSame(newFont, renderer.getFont());
-
         renderer.getListCellRendererComponent(list, "aaa", 0, false, false);
         assertEquals(newFont, renderer.getFont());
-
         list.setForeground(Color.red);
         list.setBackground(Color.blue);
         list.setSelectionForeground(Color.yellow);
         list.setSelectionBackground(Color.pink);
         assertNotSame(Color.red, renderer.getForeground());
         assertNotSame(Color.blue, renderer.getBackground());
-
         renderer.getListCellRendererComponent(list, "aaa", 0, false, false);
         assertEquals(Color.red, renderer.getForeground());
         assertEquals(Color.blue, renderer.getBackground());
-
         renderer.getListCellRendererComponent(list, "aaa", 0, true, false);
         assertEquals(Color.yellow, renderer.getForeground());
         assertEquals(Color.pink, renderer.getBackground());
-
         list.setEnabled(false);
         renderer.getListCellRendererComponent(list, "aaa", 0, false, false);
         assertTrue(renderer.isEnabled());
@@ -93,19 +88,15 @@
         JLabel l = new JLabel(" ");
         l.setBorder(BasicComboBoxRenderer.noFocusBorder);
         assertEquals(l.getPreferredSize(), renderer.getPreferredSize());
-
         renderer.getListCellRendererComponent(new JList(), "aaa", 0, false, false);
         l.setText("aaa");
         assertEquals(l.getPreferredSize(), renderer.getPreferredSize());
         assertEquals(l.getPreferredSize(), renderer.getPreferredSize());
-
         renderer.setText(null);
         l.setText(" ");
         assertEquals(l.getPreferredSize(), renderer.getPreferredSize());
-
         renderer.setText("");
         assertEquals(l.getPreferredSize(), renderer.getPreferredSize());
-
         renderer.setPreferredSize(new Dimension(100, 100));
         assertEquals(new Dimension(100, 100), renderer.getPreferredSize());
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxUIRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxUIRTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxUIRTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxUIRTest.java Sun Nov 26 12:15:43 2006
@@ -25,12 +25,13 @@
 public class BasicComboBoxUIRTest extends SwingTestCase {
     protected BasicComboBoxUI comboBoxUI;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         comboBoxUI = new BasicComboBoxUI();
     }
 
-    public void  testInitialValues() {
+    public void testInitialValues() {
         assertNotNull(comboBoxUI.cachedMinimumSize);
         assertTrue(comboBoxUI.isMinimumSizeDirty);
     }



Mime
View raw message