harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r479418 [3/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/border/MatteBorderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/MatteBorderTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/MatteBorderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/MatteBorderTest.java Sun Nov 26 12:15:43 2006
@@ -25,15 +25,12 @@
 import java.awt.Color;
 import java.awt.Insets;
 import java.awt.image.BufferedImage;
-
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
 import javax.swing.JPanel;
-
 import javax.swing.SwingTestCase;
 
 public class MatteBorderTest extends SwingTestCase {
-
     public static void main(final String[] args) {
         junit.textui.TestRunner.run(MatteBorderTest.class);
     }
@@ -48,17 +45,14 @@
         int right = 300;
         int bottom = 400;
         MatteBorder border = new MatteBorder(new Insets(top, left, bottom, right), icon);
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
         assertEquals("icon value coinsides", icon, border.getTileIcon());
-
         icon = new ImageIcon(new BufferedImage(30, 40, BufferedImage.TYPE_4BYTE_ABGR));
         top = 200;
         left = 300;
         right = 200;
         bottom = 300;
         border = new MatteBorder(new Insets(top, left, bottom, right), icon);
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
         assertEquals("icon value coinsides", icon, border.getTileIcon());
     }
@@ -73,20 +67,16 @@
         int right = 300;
         int bottom = 400;
         MatteBorder border = new MatteBorder(new Insets(top, left, bottom, right), color);
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
         assertEquals("color value coinsides", color, border.getMatteColor());
-
         color = Color.YELLOW;
         top = 200;
         left = 300;
         right = 200;
         bottom = 300;
         border = new MatteBorder(new Insets(top, left, bottom, right), color);
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
-        assertEquals("color value coinsides",
-                    color, border.getMatteColor());
+        assertEquals("color value coinsides", color, border.getMatteColor());
     }
 
     /*
@@ -95,15 +85,10 @@
     public void testMatteBorderIcon() {
         Icon icon = new ImageIcon(new BufferedImage(20, 20, BufferedImage.TYPE_BYTE_GRAY));
         MatteBorder border = new MatteBorder(icon);
-
-        assertEquals("icon value coinsides",
-                icon, border.getTileIcon());
-
+        assertEquals("icon value coinsides", icon, border.getTileIcon());
         icon = new ImageIcon(new BufferedImage(30, 40, BufferedImage.TYPE_4BYTE_ABGR));
         border = new MatteBorder(icon);
-
-        assertEquals("icon value coinsides",
-                icon, border.getTileIcon());
+        assertEquals("icon value coinsides", icon, border.getTileIcon());
     }
 
     /*
@@ -116,17 +101,14 @@
         int right = 300;
         int bottom = 400;
         MatteBorder border = new MatteBorder(top, left, bottom, right, icon);
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
         assertEquals("icon value coinsides", icon, border.getTileIcon());
-
         icon = new ImageIcon(new BufferedImage(30, 40, BufferedImage.TYPE_4BYTE_ABGR));
         top = 200;
         left = 300;
         right = 200;
         bottom = 300;
         border = new MatteBorder(top, left, bottom, right, icon);
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
         assertEquals("icon value coinsides", icon, border.getTileIcon());
     }
@@ -141,10 +123,8 @@
         int right = 300;
         int bottom = 400;
         MatteBorder border = new MatteBorder(top, left, bottom, right, color);
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
         assertEquals("color value coinsides", color, border.getMatteColor());
-
         color = Color.YELLOW;
         top = 200;
         left = 300;
@@ -156,34 +136,34 @@
     }
 
     public void testPaintBorder() {
-//        JPanel panel1 = new JPanel();
-//        JPanel panel2 = new JPanel();
-//        JPanel panel3 = new JPanel();
-//
-//        Color color1 = Color.GREEN;
-//        Icon icon = null;
-//        icon = new ImageIcon(DefaultMetalTheme.class.getResource("icons/Error.gif"));
-//        Color shadowOuterColor = Color.BLACK;
-//        Color highlightedInnerColor = Color.RED;
-//        Color highlightedOuterColor = Color.BLUE;
-//
-//        Border border1 = new MatteBorder(10, 20, 30, 50, color1);
-//        Border border2 = new MatteBorder(10, 20, 30, 50, icon);
-//        panel2.setBorder(border1);
-//        panel3.setBorder(border2);
-//        panel2.setPreferredSize(new Dimension(200, 150));
-//        panel3.setPreferredSize(new Dimension(200, 150));
-//
-//        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
-//        panel1.add(panel2);
-//        panel1.add(panel3);
-//
-//        JFrame frame = new JFrame();
-//        frame.getContentPane().add(panel1);
-//        frame.pack();
-//        frame.show();
-//        while(!frame.isActive());
-//        while(frame.isActive());
+        //        JPanel panel1 = new JPanel();
+        //        JPanel panel2 = new JPanel();
+        //        JPanel panel3 = new JPanel();
+        //
+        //        Color color1 = Color.GREEN;
+        //        Icon icon = null;
+        //        icon = new ImageIcon(DefaultMetalTheme.class.getResource("icons/Error.gif"));
+        //        Color shadowOuterColor = Color.BLACK;
+        //        Color highlightedInnerColor = Color.RED;
+        //        Color highlightedOuterColor = Color.BLUE;
+        //
+        //        Border border1 = new MatteBorder(10, 20, 30, 50, color1);
+        //        Border border2 = new MatteBorder(10, 20, 30, 50, icon);
+        //        panel2.setBorder(border1);
+        //        panel3.setBorder(border2);
+        //        panel2.setPreferredSize(new Dimension(200, 150));
+        //        panel3.setPreferredSize(new Dimension(200, 150));
+        //
+        //        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
+        //        panel1.add(panel2);
+        //        panel1.add(panel3);
+        //
+        //        JFrame frame = new JFrame();
+        //        frame.getContentPane().add(panel1);
+        //        frame.pack();
+        //        frame.show();
+        //        while(!frame.isActive());
+        //        while(frame.isActive());
     }
 
     public void testIsBorderOpaque() {
@@ -194,7 +174,6 @@
         Color color = Color.RED;
         MatteBorder border = new MatteBorder(top, left, bottom, right, color);
         assertTrue("MatteBorder without tiles is opaque", border.isBorderOpaque());
-
         Icon icon = new ImageIcon(new BufferedImage(20, 20, BufferedImage.TYPE_BYTE_GRAY));
         border = new MatteBorder(top, left, bottom, right, icon);
         assertFalse("MatteBorder with tiles is not opaque", border.isBorderOpaque());
@@ -208,30 +187,24 @@
         int left = 20;
         int right = 30;
         int bottom = 40;
-        Color color = Color.RED;
         Icon icon = new ImageIcon(new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_GRAY));
         MatteBorder border = new MatteBorder(top, left, bottom, right, icon);
         Insets insets = new Insets(1, 1, 1, 1);
         JPanel panel = new JPanel();
-
         border.getBorderInsets(panel, insets);
         assertEquals("insets values coinside", top, insets.top);
         assertEquals("insets values coinside", left, insets.left);
         assertEquals("insets values coinside", right, insets.right);
         assertEquals("insets values coinside", bottom, insets.bottom);
-
         panel.setBorder(new LineBorder(Color.black, 100));
         border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", top, insets.top);
         assertEquals("insets values coinside", left, insets.left);
         assertEquals("insets values coinside", right, insets.right);
         assertEquals("insets values coinside", bottom, insets.bottom);
-
-        insets = new Insets(2*top, 2*left, 2*bottom, 2*right);
+        insets = new Insets(2 * top, 2 * left, 2 * bottom, 2 * right);
         panel.setBorder(new BevelBorder(BevelBorder.LOWERED));
         Insets newInsets = border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", top, newInsets.top);
         assertEquals("insets values coinside", left, newInsets.left);
         assertEquals("insets values coinside", right, newInsets.right);
@@ -250,30 +223,24 @@
         int left = 20;
         int right = 30;
         int bottom = 40;
-        Color color = Color.RED;
         Icon icon = new ImageIcon(new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_GRAY));
         MatteBorder border = new MatteBorder(top, left, bottom, right, icon);
         Insets insets = new Insets(1, 1, 1, 1);
         JPanel panel = new JPanel();
-
         border.getBorderInsets(panel, insets);
         assertEquals("insets values coinside", top, insets.top);
         assertEquals("insets values coinside", left, insets.left);
         assertEquals("insets values coinside", right, insets.right);
         assertEquals("insets values coinside", bottom, insets.bottom);
-
         panel.setBorder(new LineBorder(Color.black, 100));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", top, insets.top);
         assertEquals("insets values coinside", left, insets.left);
         assertEquals("insets values coinside", right, insets.right);
         assertEquals("insets values coinside", bottom, insets.bottom);
-
-        insets = new Insets(2*top, 2*left, 2*bottom, 2*right);
+        insets = new Insets(2 * top, 2 * left, 2 * bottom, 2 * right);
         panel.setBorder(new EmptyBorder(insets));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", top, insets.top);
         assertEquals("insets values coinside", left, insets.left);
         assertEquals("insets values coinside", right, insets.right);
@@ -290,30 +257,29 @@
         int bottom = 40;
         int tileHeight = 30;
         int tileWidth = 40;
-
         Color color = Color.RED;
         MatteBorder border = new MatteBorder(top, left, bottom, right, color);
-        Icon icon = new ImageIcon(new BufferedImage(tileWidth, tileHeight, BufferedImage.TYPE_BYTE_GRAY));
-
+        Icon icon = new ImageIcon(new BufferedImage(tileWidth, tileHeight,
+                BufferedImage.TYPE_BYTE_GRAY));
         top = left = bottom = right = 30;
         border = new MatteBorder(top, left, bottom, right, icon);
-        assertEquals("Insets coinside ", new Insets(top, left, bottom, right), border.getBorderInsets());
-
+        assertEquals("Insets coinside ", new Insets(top, left, bottom, right), border
+                .getBorderInsets());
         top = left = bottom = right = 10;
         border = new MatteBorder(top, left, bottom, right, icon);
-        assertEquals("Insets coinside ", new Insets(top, left, bottom, right), border.getBorderInsets());
-
+        assertEquals("Insets coinside ", new Insets(top, left, bottom, right), border
+                .getBorderInsets());
         border = new MatteBorder(icon);
-        assertEquals("Insets coinside ", new Insets(tileHeight, tileWidth, tileHeight, tileWidth),
-                     border.getBorderInsets());
-
+        assertEquals("Insets coinside ", new Insets(tileHeight, tileWidth, tileHeight,
+                tileWidth), border.getBorderInsets());
         top = left = bottom = right = 1;
         border = new MatteBorder(top, left, bottom, right, icon);
-        assertEquals("Insets coinside ", new Insets(top, left, bottom, right), border.getBorderInsets());
-
+        assertEquals("Insets coinside ", new Insets(top, left, bottom, right), border
+                .getBorderInsets());
         top = left = bottom = right = 0;
         border = new MatteBorder(top, left, bottom, right, icon);
-        assertEquals("Insets coinside ", new Insets(top, left, bottom, right), border.getBorderInsets());
+        assertEquals("Insets coinside ", new Insets(top, left, bottom, right), border
+                .getBorderInsets());
     }
 
     public void testGetTileIcon() {
@@ -325,7 +291,6 @@
         Icon icon = null;
         MatteBorder border = new MatteBorder(top, left, bottom, right, color);
         assertEquals("Icon coinsides", icon, border.getTileIcon());
-
         icon = new ImageIcon(new BufferedImage(20, 20, BufferedImage.TYPE_BYTE_GRAY));
         border = new MatteBorder(top, left, bottom, right, icon);
         assertEquals("Icon coinsides", icon, border.getTileIcon());
@@ -339,10 +304,8 @@
         Color color = Color.RED;
         MatteBorder border = new MatteBorder(top, left, bottom, right, color);
         assertEquals("Colors coinside ", color, border.getMatteColor());
-
         color = Color.YELLOW;
         border = new MatteBorder(top, left, bottom, right, color);
         assertEquals("Colors coinside ", color, border.getMatteColor());
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/SoftBevelBorderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/SoftBevelBorderTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/SoftBevelBorderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/SoftBevelBorderTest.java Sun Nov 26 12:15:43 2006
@@ -25,15 +25,12 @@
 import java.awt.Color;
 //import java.awt.Dimension;
 import java.awt.Insets;
-
 //import javax.swing.BoxLayout;
 //import javax.swing.JFrame;
 import javax.swing.JPanel;
-
 import javax.swing.SwingTestCase;
 
 public class SoftBevelBorderTest extends SwingTestCase {
-
     public static void main(final String[] args) {
         junit.textui.TestRunner.run(SoftBevelBorderTest.class);
     }
@@ -47,25 +44,32 @@
         Color highlightInnerColor = Color.YELLOW;
         Color shadowOuterColor = Color.GREEN;
         Color shadowInnerColor = Color.BLACK;
-
-        SoftBevelBorder border = new SoftBevelBorder(bevelType, highlightOuterColor, highlightInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("highlightOuterColor coinsides", highlightOuterColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightInnerColor, border.getHighlightInnerColor());
-        assertEquals("shadowOuterColor coinsides", shadowOuterColor, border.getShadowOuterColor());
-        assertEquals("shadowInnerColor coinsides", shadowInnerColor, border.getShadowInnerColor());
+        SoftBevelBorder border = new SoftBevelBorder(bevelType, highlightOuterColor,
+                highlightInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("highlightOuterColor coinsides", highlightOuterColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightInnerColor, border
+                .getHighlightInnerColor());
+        assertEquals("shadowOuterColor coinsides", shadowOuterColor, border
+                .getShadowOuterColor());
+        assertEquals("shadowInnerColor coinsides", shadowInnerColor, border
+                .getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
-
         bevelType = BevelBorder.RAISED;
         highlightOuterColor = Color.YELLOW;
         highlightInnerColor = Color.RED;
         shadowOuterColor = Color.WHITE;
         shadowInnerColor = Color.BLUE;
-
-        border = new SoftBevelBorder(bevelType, highlightOuterColor, highlightInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("highlightOuterColor coinsides", highlightOuterColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightInnerColor, border.getHighlightInnerColor());
-        assertEquals("shadowOuterColor coinsides", shadowOuterColor, border.getShadowOuterColor());
-        assertEquals("shadowInnerColor coinsides", shadowInnerColor, border.getShadowInnerColor());
+        border = new SoftBevelBorder(bevelType, highlightOuterColor, highlightInnerColor,
+                shadowOuterColor, shadowInnerColor);
+        assertEquals("highlightOuterColor coinsides", highlightOuterColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightInnerColor, border
+                .getHighlightInnerColor());
+        assertEquals("shadowOuterColor coinsides", shadowOuterColor, border
+                .getShadowOuterColor());
+        assertEquals("shadowInnerColor coinsides", shadowInnerColor, border
+                .getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
     }
 
@@ -76,21 +80,22 @@
         int bevelType = BevelBorder.LOWERED;
         Color highlightColor = Color.RED;
         Color shadowColor = Color.GREEN;
-
         SoftBevelBorder border = new SoftBevelBorder(bevelType, highlightColor, shadowColor);
-        assertEquals("highlightOuterColor coinsides", highlightColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightColor, border.getHighlightInnerColor());
+        assertEquals("highlightOuterColor coinsides", highlightColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightColor, border
+                .getHighlightInnerColor());
         assertEquals("shadowOuterColor coinsides", shadowColor, border.getShadowOuterColor());
         assertEquals("shadowInnerColor coinsides", shadowColor, border.getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
-
         bevelType = BevelBorder.RAISED;
         highlightColor = Color.YELLOW;
         shadowColor = Color.WHITE;
-
         border = new SoftBevelBorder(bevelType, highlightColor, shadowColor);
-        assertEquals("highlightOuterColor coinsides", highlightColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightColor, border.getHighlightInnerColor());
+        assertEquals("highlightOuterColor coinsides", highlightColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightColor, border
+                .getHighlightInnerColor());
         assertEquals("shadowOuterColor coinsides", shadowColor, border.getShadowOuterColor());
         assertEquals("shadowInnerColor coinsides", shadowColor, border.getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
@@ -103,19 +108,20 @@
         int bevelType = BevelBorder.LOWERED;
         Color highlightColor = null;
         Color shadowColor = null;
-
         SoftBevelBorder border = new SoftBevelBorder(bevelType);
-        assertEquals("highlightOuterColor coinsides", highlightColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightColor, border.getHighlightInnerColor());
+        assertEquals("highlightOuterColor coinsides", highlightColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightColor, border
+                .getHighlightInnerColor());
         assertEquals("shadowOuterColor coinsides", shadowColor, border.getShadowOuterColor());
         assertEquals("shadowInnerColor coinsides", shadowColor, border.getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
-
         bevelType = BevelBorder.RAISED;
-
         border = new SoftBevelBorder(bevelType);
-        assertEquals("highlightOuterColor coinsides", highlightColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightColor, border.getHighlightInnerColor());
+        assertEquals("highlightOuterColor coinsides", highlightColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightColor, border
+                .getHighlightInnerColor());
         assertEquals("shadowOuterColor coinsides", shadowColor, border.getShadowOuterColor());
         assertEquals("shadowInnerColor coinsides", shadowColor, border.getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
@@ -125,36 +131,27 @@
      * Class under test for Insets getBorderInsets(Component, Insets)
      */
     public void testGetBorderInsetsComponentInsets() {
-        int top = 0;
-        int left = 0;
-        int right = 0;
-        int bottom = 0;
         int thickness1 = 3;
         int thickness2 = 22;
         int thickness3 = 33;
-        int thickness4 = 44;
-        SoftBevelBorder border = new SoftBevelBorder(BevelBorder.RAISED, Color.black, Color.white);
+        SoftBevelBorder border = new SoftBevelBorder(BevelBorder.RAISED, Color.black,
+                Color.white);
         Insets insets = new Insets(10, 10, 10, 10);
         JPanel panel = new JPanel();
-
         border.getBorderInsets(panel, insets);
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         panel.setBorder(new LineBorder(Color.black, thickness2));
         border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         insets = new Insets(thickness3, thickness3, thickness3, thickness3);
         panel.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
         Insets newInsets = border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", thickness1, newInsets.top);
         assertEquals("insets values coinside", thickness1, newInsets.left);
         assertEquals("insets values coinside", thickness1, newInsets.right);
@@ -169,36 +166,27 @@
      * Class under test for Insets getBorderInsets(Component)
      */
     public void testGetBorderInsetsComponent() {
-        int top = 0;
-        int left = 0;
-        int right = 0;
-        int bottom = 0;
         int thickness1 = 3;
         int thickness2 = 22;
         int thickness3 = 33;
-        int thickness4 = 44;
-        SoftBevelBorder border = new SoftBevelBorder(BevelBorder.RAISED, Color.black, Color.white);
+        SoftBevelBorder border = new SoftBevelBorder(BevelBorder.RAISED, Color.black,
+                Color.white);
         Insets insets = new Insets(10, 10, 10, 10);
         JPanel panel = new JPanel();
-
         insets = border.getBorderInsets(null);
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         panel.setBorder(new LineBorder(Color.black, thickness2));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         insets = new Insets(thickness3, thickness3, thickness3, thickness3);
         panel.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
@@ -206,45 +194,43 @@
     }
 
     public void testPaintBorder() {
-//      JPanel panel1 = new JPanel();
-//      JPanel panel2 = new JPanel();
-//      JPanel panel3 = new JPanel();
-//
-//      Color shadowInnerColor = Color.GREEN;
-//      Color shadowOuterColor = Color.BLACK;
-//      Color highlightedInnerColor = Color.RED;
-//      Color highlightedOuterColor = Color.BLUE;
-//
-//      SoftBevelBorder border1 = new SoftBevelBorder(EtchedBorder.LOWERED, highlightedOuterColor, highlightedInnerColor,
-//                                                                  shadowOuterColor, shadowInnerColor);
-//      SoftBevelBorder border2 = new SoftBevelBorder(EtchedBorder.RAISED, highlightedOuterColor, highlightedInnerColor,
-//                                                                  shadowOuterColor, shadowInnerColor);
-//      panel2.setBorder(border1);
-//      panel3.setBorder(border2);
-//      panel2.setPreferredSize(new Dimension(200, 150));
-//      panel3.setPreferredSize(new Dimension(200, 150));
-//
-//      panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
-//      panel1.add(panel2);
-//      panel1.add(panel3);
-//
-//      JFrame frame = new JFrame();
-//      frame.getContentPane().add(panel1);
-//      frame.pack();
-//      frame.show();
-//      while(!frame.isActive());
-//      while(frame.isActive());
+        //      JPanel panel1 = new JPanel();
+        //      JPanel panel2 = new JPanel();
+        //      JPanel panel3 = new JPanel();
+        //
+        //      Color shadowInnerColor = Color.GREEN;
+        //      Color shadowOuterColor = Color.BLACK;
+        //      Color highlightedInnerColor = Color.RED;
+        //      Color highlightedOuterColor = Color.BLUE;
+        //
+        //      SoftBevelBorder border1 = new SoftBevelBorder(EtchedBorder.LOWERED, highlightedOuterColor, highlightedInnerColor,
+        //                                                                  shadowOuterColor, shadowInnerColor);
+        //      SoftBevelBorder border2 = new SoftBevelBorder(EtchedBorder.RAISED, highlightedOuterColor, highlightedInnerColor,
+        //                                                                  shadowOuterColor, shadowInnerColor);
+        //      panel2.setBorder(border1);
+        //      panel3.setBorder(border2);
+        //      panel2.setPreferredSize(new Dimension(200, 150));
+        //      panel3.setPreferredSize(new Dimension(200, 150));
+        //
+        //      panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
+        //      panel1.add(panel2);
+        //      panel1.add(panel3);
+        //
+        //      JFrame frame = new JFrame();
+        //      frame.getContentPane().add(panel1);
+        //      frame.pack();
+        //      frame.show();
+        //      while(!frame.isActive());
+        //      while(frame.isActive());
     }
 
     public void testIsBorderOpaque() {
         Color shadowColor = Color.GREEN;
         Color highlightedColor = Color.RED;
-
-        SoftBevelBorder border = new SoftBevelBorder(BevelBorder.LOWERED, highlightedColor, shadowColor);
-        assertFalse("SoftBevelBorder is not opaque",  border.isBorderOpaque());
-
+        SoftBevelBorder border = new SoftBevelBorder(BevelBorder.LOWERED, highlightedColor,
+                shadowColor);
+        assertFalse("SoftBevelBorder is not opaque", border.isBorderOpaque());
         border = new SoftBevelBorder(BevelBorder.RAISED);
-        assertFalse("SoftBevelBorder is not opaque",  border.isBorderOpaque());
+        assertFalse("SoftBevelBorder is not opaque", border.isBorderOpaque());
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/TitledBorderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/TitledBorderTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/TitledBorderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/TitledBorderTest.java Sun Nov 26 12:15:43 2006
@@ -28,26 +28,28 @@
 import java.awt.Font;
 import java.awt.FontMetrics;
 import java.awt.Insets;
-
 import javax.swing.JComponent;
 import javax.swing.JPanel;
 import javax.swing.SwingTestCase;
 import javax.swing.UIManager;
 
 public class TitledBorderTest extends SwingTestCase {
-
     protected JComponent panel;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
+        panel = new JPanel() {
+            private static final long serialVersionUID = 1L;
 
-        panel =  new JPanel() {
+            @Override
             public FontMetrics getFontMetrics(Font font) {
                 return TitledBorderTest.this.getFontMetrics(font);
             }
         };
     }
 
+    @Override
     protected void tearDown() throws Exception {
         panel = null;
     }
@@ -68,35 +70,25 @@
         int just2 = 2;
         int pos1 = 1;
         int pos2 = 2;
-
         TitledBorder border1 = new TitledBorder(border3, string1, just1, pos1, font1, color1);
         TitledBorder border2 = new TitledBorder(border4, string2, just2, pos2, font2, color2);
-
         assertEquals("title field initialized correctly ", string1, border1.getTitle());
-        assertEquals("border field initialized correctly ",
-                border3,
-                border1.getBorder());
-        assertEquals("color field initialized correctly ",
-                color1,
-                border1.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                font1,
-                border1.getTitleFont());
+        assertEquals("border field initialized correctly ", border3, border1.getBorder());
+        assertEquals("color field initialized correctly ", color1, border1.getTitleColor());
+        assertEquals("font field initialized correctly ", font1, border1.getTitleFont());
         assertEquals("position field initialized correctly ", pos1, border1.getTitlePosition());
-        assertEquals("justification field initialized correctly ", just1, border1.getTitleJustification());
-
+        assertEquals("justification field initialized correctly ", just1, border1
+                .getTitleJustification());
         assertEquals("title field initialized correctly ", string2, border2.getTitle());
-        assertEquals("border field initialized correctly ",
-                UIManager.getDefaults().getBorder("TitledBorder.border"),
-                border2.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border2.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border2.getTitleFont());
+        assertEquals("border field initialized correctly ", UIManager.getDefaults().getBorder(
+                "TitledBorder.border"), border2.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border2.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border2.getTitleFont());
         assertEquals("position field initialized correctly ", pos2, border2.getTitlePosition());
-        assertEquals("justification field initialized correctly ", just2, border2.getTitleJustification());
+        assertEquals("justification field initialized correctly ", just2, border2
+                .getTitleJustification());
     }
 
     /*
@@ -113,35 +105,26 @@
         int just2 = 2;
         int pos1 = 1;
         int pos2 = 2;
-
         TitledBorder border1 = new TitledBorder(border3, string1, just1, pos1, font1);
         TitledBorder border2 = new TitledBorder(border4, string2, just2, pos2, font2);
-
         assertEquals("title field initialized correctly ", string1, border1.getTitle());
-        assertEquals("border field initialized correctly ",
-                border3,
-                border1.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border1.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                font1,
-                border1.getTitleFont());
+        assertEquals("border field initialized correctly ", border3, border1.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border1.getTitleColor());
+        assertEquals("font field initialized correctly ", font1, border1.getTitleFont());
         assertEquals("position field initialized correctly ", pos1, border1.getTitlePosition());
-        assertEquals("justification field initialized correctly ", just1, border1.getTitleJustification());
-
+        assertEquals("justification field initialized correctly ", just1, border1
+                .getTitleJustification());
         assertEquals("title field initialized correctly ", string2, border2.getTitle());
-        assertEquals("border field initialized correctly ",
-                UIManager.getDefaults().getBorder("TitledBorder.border"),
-                border2.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border2.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border2.getTitleFont());
+        assertEquals("border field initialized correctly ", UIManager.getDefaults().getBorder(
+                "TitledBorder.border"), border2.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border2.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border2.getTitleFont());
         assertEquals("position field initialized correctly ", pos2, border2.getTitlePosition());
-        assertEquals("justification field initialized correctly ", just2, border2.getTitleJustification());
+        assertEquals("justification field initialized correctly ", just2, border2
+                .getTitleJustification());
     }
 
     /*
@@ -156,35 +139,27 @@
         int just2 = 2;
         int pos1 = 1;
         int pos2 = 2;
-
         TitledBorder border1 = new TitledBorder(border3, string1, just1, pos1);
         TitledBorder border2 = new TitledBorder(border4, string2, just2, pos2);
-
         assertEquals("title field initialized correctly ", string1, border1.getTitle());
-        assertEquals("border field initialized correctly ",
-                border3,
-                border1.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border1.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border1.getTitleFont());
+        assertEquals("border field initialized correctly ", border3, border1.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border1.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border1.getTitleFont());
         assertEquals("position field initialized correctly ", pos1, border1.getTitlePosition());
-        assertEquals("justification field initialized correctly ", just1, border1.getTitleJustification());
-
+        assertEquals("justification field initialized correctly ", just1, border1
+                .getTitleJustification());
         assertEquals("title field initialized correctly ", string2, border2.getTitle());
-        assertEquals("border field initialized correctly ",
-                UIManager.getDefaults().getBorder("TitledBorder.border"),
-                border2.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border2.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border2.getTitleFont());
+        assertEquals("border field initialized correctly ", UIManager.getDefaults().getBorder(
+                "TitledBorder.border"), border2.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border2.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border2.getTitleFont());
         assertEquals("position field initialized correctly ", pos2, border2.getTitlePosition());
-        assertEquals("justification field initialized correctly ", just2, border2.getTitleJustification());
+        assertEquals("justification field initialized correctly ", just2, border2
+                .getTitleJustification());
     }
 
     /*
@@ -197,32 +172,27 @@
         Border border4 = null;
         TitledBorder border1 = new TitledBorder(border3, string1);
         TitledBorder border2 = new TitledBorder(border4, string2);
-
         assertEquals("title field initialized correctly ", string1, border1.getTitle());
-        assertEquals("border field initialized correctly ",
-                border3,
-                border1.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border1.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border1.getTitleFont());
-        assertEquals("position field initialized correctly ", TitledBorder.TOP, border1.getTitlePosition());
-        assertEquals("justification field initialized correctly ", TitledBorder.LEADING, border1.getTitleJustification());
-
+        assertEquals("border field initialized correctly ", border3, border1.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border1.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border1.getTitleFont());
+        assertEquals("position field initialized correctly ", TitledBorder.TOP, border1
+                .getTitlePosition());
+        assertEquals("justification field initialized correctly ", TitledBorder.LEADING,
+                border1.getTitleJustification());
         assertEquals("title field initialized correctly ", string2, border2.getTitle());
-        assertEquals("border field initialized correctly ",
-                UIManager.getDefaults().getBorder("TitledBorder.border"),
-                border2.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border2.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border2.getTitleFont());
-        assertEquals("position field initialized correctly ", TitledBorder.TOP, border2.getTitlePosition());
-        assertEquals("justification field initialized correctly ", TitledBorder.LEADING, border2.getTitleJustification());
+        assertEquals("border field initialized correctly ", UIManager.getDefaults().getBorder(
+                "TitledBorder.border"), border2.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border2.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border2.getTitleFont());
+        assertEquals("position field initialized correctly ", TitledBorder.TOP, border2
+                .getTitlePosition());
+        assertEquals("justification field initialized correctly ", TitledBorder.LEADING,
+                border2.getTitleJustification());
     }
 
     /*
@@ -233,32 +203,27 @@
         Border border4 = null;
         TitledBorder border1 = new TitledBorder(border3);
         TitledBorder border2 = new TitledBorder(border4);
-
         assertEquals("title field initialized correctly ", "", border1.getTitle());
-        assertEquals("border field initialized correctly ",
-                border3,
-                border1.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border1.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border1.getTitleFont());
-        assertEquals("position field initialized correctly ", TitledBorder.TOP, border1.getTitlePosition());
-        assertEquals("justification field initialized correctly ", TitledBorder.LEADING, border1.getTitleJustification());
-
+        assertEquals("border field initialized correctly ", border3, border1.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border1.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border1.getTitleFont());
+        assertEquals("position field initialized correctly ", TitledBorder.TOP, border1
+                .getTitlePosition());
+        assertEquals("justification field initialized correctly ", TitledBorder.LEADING,
+                border1.getTitleJustification());
         assertEquals("title field initialized correctly ", "", border2.getTitle());
-        assertEquals("border field initialized correctly ",
-                UIManager.getDefaults().getBorder("TitledBorder.border"),
-                border2.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border2.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border2.getTitleFont());
-        assertEquals("position field initialized correctly ", TitledBorder.TOP, border2.getTitlePosition());
-        assertEquals("justification field initialized correctly ", TitledBorder.LEADING, border2.getTitleJustification());
+        assertEquals("border field initialized correctly ", UIManager.getDefaults().getBorder(
+                "TitledBorder.border"), border2.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border2.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border2.getTitleFont());
+        assertEquals("position field initialized correctly ", TitledBorder.TOP, border2
+                .getTitlePosition());
+        assertEquals("justification field initialized correctly ", TitledBorder.LEADING,
+                border2.getTitleJustification());
     }
 
     /*
@@ -269,32 +234,28 @@
         String string2 = null;
         TitledBorder border1 = new TitledBorder(string1);
         TitledBorder border2 = new TitledBorder(string2);
-
         assertEquals("title field initialized correctly ", string1, border1.getTitle());
-        assertEquals("border field initialized correctly ",
-                UIManager.getDefaults().getBorder("TitledBorder.border"),
-                border1.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border1.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border1.getTitleFont());
-        assertEquals("position field initialized correctly ", TitledBorder.TOP, border1.getTitlePosition());
-        assertEquals("justification field initialized correctly ", TitledBorder.LEADING, border1.getTitleJustification());
-
+        assertEquals("border field initialized correctly ", UIManager.getDefaults().getBorder(
+                "TitledBorder.border"), border1.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border1.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border1.getTitleFont());
+        assertEquals("position field initialized correctly ", TitledBorder.TOP, border1
+                .getTitlePosition());
+        assertEquals("justification field initialized correctly ", TitledBorder.LEADING,
+                border1.getTitleJustification());
         assertEquals("title field initialized correctly ", string2, border2.getTitle());
-        assertEquals("border field initialized correctly ",
-                UIManager.getDefaults().getBorder("TitledBorder.border"),
-                border2.getBorder());
-        assertEquals("color field initialized correctly ",
-                UIManager.getDefaults().getColor("TitledBorder.titleColor"),
-                border2.getTitleColor());
-        assertEquals("font field initialized correctly ",
-                UIManager.getDefaults().getFont("TitledBorder.font"),
-                border2.getTitleFont());
-        assertEquals("position field initialized correctly ", TitledBorder.TOP, border2.getTitlePosition());
-        assertEquals("justification field initialized correctly ", TitledBorder.LEADING, border2.getTitleJustification());
+        assertEquals("border field initialized correctly ", UIManager.getDefaults().getBorder(
+                "TitledBorder.border"), border2.getBorder());
+        assertEquals("color field initialized correctly ", UIManager.getDefaults().getColor(
+                "TitledBorder.titleColor"), border2.getTitleColor());
+        assertEquals("font field initialized correctly ", UIManager.getDefaults().getFont(
+                "TitledBorder.font"), border2.getTitleFont());
+        assertEquals("position field initialized correctly ", TitledBorder.TOP, border2
+                .getTitlePosition());
+        assertEquals("justification field initialized correctly ", TitledBorder.LEADING,
+                border2.getTitleJustification());
     }
 
     /*
@@ -304,30 +265,29 @@
         Insets insets = new Insets(0, 0, 0, 0);
         Font font1 = new Font(null, Font.BOLD, 10);
         Font font2 = new Font(null, Font.ITALIC, 20);
-
-        Border border1 =  new EmptyBorder(10, 10, 10, 10);
-        Border border2 =  new EmptyBorder(20, 20, 20, 20);
-
+        Border border1 = new EmptyBorder(10, 10, 10, 10);
+        Border border2 = new EmptyBorder(20, 20, 20, 20);
         TitledBorder titledBorder = new TitledBorder("");
-        assertEquals("insets sizes coinside ", new Insets(5, 5, 5, 5), titledBorder.getBorderInsets(panel, insets));
-
+        assertEquals("insets sizes coincide ", new Insets(5, 5, 5, 5), titledBorder
+                .getBorderInsets(panel, insets));
         titledBorder.setTitle("_");
-        assertEquals("insets sizes coinside ", new Insets(41, 5, 5, 5), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(41, 5, 5, 5), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitle("_____");
-        assertEquals("insets sizes coinside ", new Insets(41, 5, 5, 5), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(41, 5, 5, 5), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setBorder(border1);
-        assertEquals("insets sizes coinside ", new Insets(50, 14, 14, 14), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(50, 14, 14, 14), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setBorder(border2);
-        assertEquals("insets sizes coinside ", new Insets(60, 24, 24, 24), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(60, 24, 24, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitleFont(font1);
-        assertEquals("insets sizes coinside ", new Insets(54, 24, 24, 24), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(54, 24, 24, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitleFont(font2);
-        assertEquals("insets sizes coinside ", new Insets(84, 24, 24, 24), titledBorder.getBorderInsets(panel));
+        assertEquals("insets sizes coincide ", new Insets(84, 24, 24, 24), titledBorder
+                .getBorderInsets(panel));
     }
 
     /*
@@ -336,77 +296,75 @@
     public void testGetBorderInsetsComponent() {
         Font font1 = new Font(null, Font.BOLD, 10);
         Font font2 = new Font(null, Font.ITALIC, 20);
-
-        Border border1 =  new EmptyBorder(10, 10, 10, 10);
-        Border border2 =  new EmptyBorder(20, 20, 20, 20);
-
+        Border border1 = new EmptyBorder(10, 10, 10, 10);
+        Border border2 = new EmptyBorder(20, 20, 20, 20);
         TitledBorder titledBorder = new TitledBorder("");
-        assertEquals("insets sizes coinside ", new Insets(5, 5, 5, 5), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(5, 5, 5, 5), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitle("_");
-        assertEquals("insets sizes coinside ", new Insets(41, 5, 5, 5), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(41, 5, 5, 5), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitle("_____");
-        assertEquals("insets sizes coinside ", new Insets(41, 5, 5, 5), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(41, 5, 5, 5), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setBorder(border1);
-        assertEquals("insets sizes coinside ", new Insets(50, 14, 14, 14), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(50, 14, 14, 14), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setBorder(border2);
-        assertEquals("insets sizes coinside ", new Insets(60, 24, 24, 24), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(60, 24, 24, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitleFont(font1);
-        assertEquals("insets sizes coinside ", new Insets(54, 24, 24, 24), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(54, 24, 24, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitleFont(font2);
-        assertEquals("insets sizes coinside ", new Insets(84, 24, 24, 24), titledBorder.getBorderInsets(panel));
-
-
+        assertEquals("insets sizes coincide ", new Insets(84, 24, 24, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitlePosition(TitledBorder.ABOVE_TOP);
-        assertEquals("insets sizes coinside ", new Insets(86, 24, 24, 24), titledBorder.getBorderInsets(panel));
+        assertEquals("insets sizes coincide ", new Insets(86, 24, 24, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitlePosition(TitledBorder.BELOW_TOP);
-        assertEquals("insets sizes coinside ", new Insets(86, 24, 24, 24), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(86, 24, 24, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitlePosition(TitledBorder.TOP);
-        assertEquals("insets sizes coinside ", new Insets(84, 24, 24, 24), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(84, 24, 24, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitlePosition(TitledBorder.ABOVE_BOTTOM);
-        assertEquals("insets sizes coinside ", new Insets(24, 24, 86, 24), titledBorder.getBorderInsets(panel));
+        assertEquals("insets sizes coincide ", new Insets(24, 24, 86, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitlePosition(TitledBorder.BELOW_BOTTOM);
-        assertEquals("insets sizes coinside ", new Insets(24, 24, 86, 24), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(24, 24, 86, 24), titledBorder
+                .getBorderInsets(panel));
         titledBorder.setTitlePosition(TitledBorder.BOTTOM);
-        assertEquals("insets sizes coinside ", new Insets(24, 24, 84, 24), titledBorder.getBorderInsets(panel));
-
+        assertEquals("insets sizes coincide ", new Insets(24, 24, 84, 24), titledBorder
+                .getBorderInsets(panel));
     }
 
     public void testPaintBorder() {
-//        int numJust = 6;
-//        int numPos = 7;
-//        String title = "Title";
-//        JPanel mainPanel = new JPanel();
-//
-//        JFrame frame = new JFrame();
-//        mainPanel.setLayout(new GridLayout(numJust, numPos));
-//        for (int iPanel = 0; iPanel < numJust*numPos; iPanel++) {
-//            Border border = new TitledBorder(new LineBorder(Color.RED, 10), title, iPanel/numPos, iPanel%numPos);
-//            JPanel panel = new JPanel();
-//            panel.setBorder(border);
-//            panel.setPreferredSize(new Dimension(150, 150));
-//            mainPanel.add(panel);
-//        }
-//        frame.getContentPane().add(mainPanel);
-//        frame.pack();
-//        frame.show();
-//        while(!frame.isActive());
-//        while(frame.isActive());
+        //        int numJust = 6;
+        //        int numPos = 7;
+        //        String title = "Title";
+        //        JPanel mainPanel = new JPanel();
+        //
+        //        JFrame frame = new JFrame();
+        //        mainPanel.setLayout(new GridLayout(numJust, numPos));
+        //        for (int iPanel = 0; iPanel < numJust*numPos; iPanel++) {
+        //            Border border = new TitledBorder(new LineBorder(Color.RED, 10), title, iPanel/numPos, iPanel%numPos);
+        //            JPanel panel = new JPanel();
+        //            panel.setBorder(border);
+        //            panel.setPreferredSize(new Dimension(150, 150));
+        //            mainPanel.add(panel);
+        //        }
+        //        frame.getContentPane().add(mainPanel);
+        //        frame.pack();
+        //        frame.show();
+        //        while(!frame.isActive());
+        //        while(frame.isActive());
     }
 
     public void testIsBorderOpaque() {
         Border border1 = new TitledBorder("Text");
         Border border2 = new TitledBorder(new LineBorder(Color.WHITE));
         Border border3 = new TitledBorder(new LineBorder(Color.WHITE), "Text");
-
         assertFalse("TitledBorder is not opaque ", border1.isBorderOpaque());
         assertFalse("TitledBorder is not opaque ", border2.isBorderOpaque());
         assertFalse("TitledBorder is not opaque ", border3.isBorderOpaque());
@@ -414,62 +372,61 @@
 
     public void testGetFont() {
         class PublicTitledBorder extends TitledBorder {
+            private static final long serialVersionUID = 1L;
+
             PublicTitledBorder(final String title) {
                 super(title);
             }
+
+            @Override
             public Font getFont(final Component c) {
                 return super.getFont(c);
             }
-        };
-
+        }
+        ;
         PublicTitledBorder titledBorder = new PublicTitledBorder("hello, border!!");
         Font newFont1 = new Font(null, Font.BOLD, 10);
         Font newFont2 = new Font(null, Font.ITALIC, 20);
         Font newFont3 = new Font(null, Font.TRUETYPE_FONT, 30);
         Font newFont4 = null;
-
         titledBorder.setTitleFont(newFont1);
-        assertEquals("fonts coinside ", newFont1, titledBorder.getFont(null));
-
+        assertEquals("fonts coincide ", newFont1, titledBorder.getFont(null));
         titledBorder.setTitleFont(newFont2);
-        assertEquals("fonts coinside ", newFont2, titledBorder.getFont(null));
-
+        assertEquals("fonts coincide ", newFont2, titledBorder.getFont(null));
         titledBorder.setTitleFont(newFont3);
-        assertEquals("fonts coinside ", newFont3, titledBorder.getFont(null));
-
+        assertEquals("fonts coincide ", newFont3, titledBorder.getFont(null));
         titledBorder.setTitleFont(newFont4);
         assertFalse("font cannot be null ", titledBorder.getFont(null) == null);
         assertEquals("font cannot be null ", "class javax.swing.plaf.FontUIResource",
-                                             titledBorder.getFont(null).getClass().toString());
+                titledBorder.getFont(null).getClass().toString());
     }
 
     public void testGetMinimumSize() {
         Font font1 = new Font(null, Font.BOLD, 10);
         Font font2 = new Font(null, Font.ITALIC, 20);
-
-        Border border1 =  new EmptyBorder(10, 10, 10, 10);
-        Border border2 =  new EmptyBorder(20, 20, 20, 20);
-
+        Border border1 = new EmptyBorder(10, 10, 10, 10);
+        Border border2 = new EmptyBorder(20, 20, 20, 20);
         TitledBorder titledBorder = new TitledBorder("");
-        assertEquals("minimum sizes coinside ", new Dimension(10, 10), titledBorder.getMinimumSize(panel));
-
+        assertEquals("minimum sizes coincide ", new Dimension(10, 10), titledBorder
+                .getMinimumSize(panel));
         titledBorder.setTitle("_");
-        assertEquals("minimum sizes coinside ", new Dimension(22, 46), titledBorder.getMinimumSize(panel));
-
+        assertEquals("minimum sizes coincide ", new Dimension(22, 46), titledBorder
+                .getMinimumSize(panel));
         titledBorder.setTitle("_____");
-        assertEquals("minimum sizes coinside ", new Dimension(70, 46), titledBorder.getMinimumSize(panel));
-
+        assertEquals("minimum sizes coincide ", new Dimension(70, 46), titledBorder
+                .getMinimumSize(panel));
         titledBorder.setBorder(border1);
-        assertEquals("minimum sizes coinside ", new Dimension(88, 64), titledBorder.getMinimumSize(panel));
-
+        assertEquals("minimum sizes coincide ", new Dimension(88, 64), titledBorder
+                .getMinimumSize(panel));
         titledBorder.setBorder(border2);
-        assertEquals("minimum sizes coinside ", new Dimension(108, 84), titledBorder.getMinimumSize(panel));
-
+        assertEquals("minimum sizes coincide ", new Dimension(108, 84), titledBorder
+                .getMinimumSize(panel));
         titledBorder.setTitleFont(font1);
-        assertEquals("minimum sizes coinside ", new Dimension(98, 78), titledBorder.getMinimumSize(panel));
-
+        assertEquals("minimum sizes coincide ", new Dimension(98, 78), titledBorder
+                .getMinimumSize(panel));
         titledBorder.setTitleFont(font2);
-        assertEquals("minimum sizes coinside ", new Dimension(148, 108), titledBorder.getMinimumSize(panel));
+        assertEquals("minimum sizes coincide ", new Dimension(148, 108), titledBorder
+                .getMinimumSize(panel));
     }
 
     /**
@@ -483,20 +440,17 @@
         Border border1 = new EmptyBorder(1, 1, 1, 1);
         Border border2 = new EmptyBorder(2, 2, 2, 2);
         Border border3 = new EmptyBorder(3, 3, 3, 3);
-
         titledBorder.setBorder(border1);
-        assertEquals("borders coinside ", border1, titledBorder.getBorder());
-
+        assertEquals("borders coincide ", border1, titledBorder.getBorder());
         titledBorder.setBorder(border2);
-        assertEquals("borders coinside ", border2, titledBorder.getBorder());
-
+        assertEquals("borders coincide ", border2, titledBorder.getBorder());
         titledBorder.setBorder(border3);
-        assertEquals("borders coinside ", border3, titledBorder.getBorder());
-
+        assertEquals("borders coincide ", border3, titledBorder.getBorder());
         titledBorder.setBorder(null);
         assertFalse("border cannot be null ", titledBorder.getBorder() == null);
-        assertEquals("border cannot be null ", "class javax.swing.plaf.BorderUIResource$LineBorderUIResource",
-                                               titledBorder.getBorder().getClass().toString());
+        assertEquals("border cannot be null ",
+                "class javax.swing.plaf.BorderUIResource$LineBorderUIResource", titledBorder
+                        .getBorder().getClass().toString());
     }
 
     /**
@@ -511,18 +465,14 @@
         String string2 = "string2";
         String string3 = "string3";
         String string4 = null;
-
         titledBorder.setTitle(string1);
-        assertEquals("titles coinside ", string1, titledBorder.getTitle());
-
+        assertEquals("titles coincide ", string1, titledBorder.getTitle());
         titledBorder.setTitle(string2);
-        assertEquals("titles coinside ", string2, titledBorder.getTitle());
-
+        assertEquals("titles coincide ", string2, titledBorder.getTitle());
         titledBorder.setTitle(string3);
-        assertEquals("titles coinside ", string3, titledBorder.getTitle());
-
+        assertEquals("titles coincide ", string3, titledBorder.getTitle());
         titledBorder.setTitle(string4);
-        assertEquals("titles coinside ", string4, titledBorder.getTitle());
+        assertEquals("titles coincide ", string4, titledBorder.getTitle());
     }
 
     /**
@@ -537,20 +487,16 @@
         Font newFont2 = new Font(null, Font.ITALIC, 20);
         Font newFont3 = new Font(null, Font.TRUETYPE_FONT, 30);
         Font newFont4 = null;
-
         titledBorder.setTitleFont(newFont1);
-        assertEquals("fonts coinside ", newFont1, titledBorder.getTitleFont());
-
+        assertEquals("fonts coincide ", newFont1, titledBorder.getTitleFont());
         titledBorder.setTitleFont(newFont2);
-        assertEquals("fonts coinside ", newFont2, titledBorder.getTitleFont());
-
+        assertEquals("fonts coincide ", newFont2, titledBorder.getTitleFont());
         titledBorder.setTitleFont(newFont3);
-        assertEquals("fonts coinside ", newFont3, titledBorder.getTitleFont());
-
+        assertEquals("fonts coincide ", newFont3, titledBorder.getTitleFont());
         titledBorder.setTitleFont(newFont4);
         assertFalse("font cannot be null ", titledBorder.getTitleFont() == null);
         assertEquals("font cannot be null ", "class javax.swing.plaf.FontUIResource",
-                                             titledBorder.getTitleFont().getClass().toString());
+                titledBorder.getTitleFont().getClass().toString());
     }
 
     /**
@@ -565,20 +511,16 @@
         Color color2 = Color.YELLOW;
         Color color3 = Color.GREEN;
         Color color4 = null;
-
         titledBorder.setTitleColor(color1);
-        assertEquals("colors coinside ", color1, titledBorder.getTitleColor());
-
+        assertEquals("colors coincide ", color1, titledBorder.getTitleColor());
         titledBorder.setTitleColor(color2);
-        assertEquals("colors coinside ", color2, titledBorder.getTitleColor());
-
+        assertEquals("colors coincide ", color2, titledBorder.getTitleColor());
         titledBorder.setTitleColor(color3);
-        assertEquals("colors coinside ", color3, titledBorder.getTitleColor());
-
+        assertEquals("colors coincide ", color3, titledBorder.getTitleColor());
         titledBorder.setTitleColor(color4);
         assertFalse("color cannot be null ", titledBorder.getTitleColor() == null);
         assertEquals("color cannot be null", "class javax.swing.plaf.ColorUIResource",
-                                             titledBorder.getTitleColor().getClass().toString());
+                titledBorder.getTitleColor().getClass().toString());
     }
 
     /**
@@ -594,16 +536,12 @@
         int pos3 = 6;
         int pos4 = 7;
         int pos5 = -1;
-
         titledBorder.setTitlePosition(pos1);
-        assertEquals("title positions coinside ", pos1, titledBorder.getTitlePosition());
-
+        assertEquals("title positions coincide ", pos1, titledBorder.getTitlePosition());
         titledBorder.setTitlePosition(pos2);
-        assertEquals("title positions coinside ", pos2, titledBorder.getTitlePosition());
-
+        assertEquals("title positions coincide ", pos2, titledBorder.getTitlePosition());
         titledBorder.setTitlePosition(pos3);
-        assertEquals("title positions coinside ", pos3, titledBorder.getTitlePosition());
-
+        assertEquals("title positions coincide ", pos3, titledBorder.getTitlePosition());
         String exText = null;
         try {
             titledBorder.setTitlePosition(pos4);
@@ -611,7 +549,6 @@
             exText = e.getMessage();
         }
         assertEquals(pos4 + " is not a valid title position.", exText);
-
         exText = null;
         try {
             titledBorder.setTitlePosition(pos5);
@@ -634,16 +571,15 @@
         int just3 = 5;
         int just4 = -1;
         int just5 = 6;
-
         titledBorder.setTitleJustification(just1);
-        assertEquals("title justifications coinside ", just1, titledBorder.getTitleJustification());
-
+        assertEquals("title justifications coincide ", just1, titledBorder
+                .getTitleJustification());
         titledBorder.setTitleJustification(just2);
-        assertEquals("title justifications coinside ", just2, titledBorder.getTitleJustification());
-
+        assertEquals("title justifications coincide ", just2, titledBorder
+                .getTitleJustification());
         titledBorder.setTitleJustification(just3);
-        assertEquals("title justifications coinside ", just3, titledBorder.getTitleJustification());
-
+        assertEquals("title justifications coincide ", just3, titledBorder
+                .getTitleJustification());
         String exText = null;
         try {
             titledBorder.setTitleJustification(just4);
@@ -651,7 +587,6 @@
             exText = e.getMessage();
         }
         assertEquals(just4 + " is not a valid title justification.", exText);
-
         exText = null;
         try {
             titledBorder.setTitleJustification(just5);
@@ -666,29 +601,21 @@
         String title4 = "new LineBorder(Color.yellow, 47, true);";
         TitledBorder border1 = new TitledBorder(border3);
         TitledBorder border2 = new TitledBorder(title4);
-
-        TitledBorder resurrectedBorder = (TitledBorder)serializeObject(border1);
+        TitledBorder resurrectedBorder = (TitledBorder) serializeObject(border1);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getTitle(),
-                border1.getTitle());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getTitleColor(),
+        assertEquals("Deserialized values coincides", resurrectedBorder.getTitle(), border1
+                .getTitle());
+        assertEquals("Deserialized values coincides", resurrectedBorder.getTitleColor(),
                 border1.getTitleColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getBorder().getClass(),
+        assertEquals("Deserialized values coincides", resurrectedBorder.getBorder().getClass(),
                 border1.getBorder().getClass());
-
-        resurrectedBorder = (TitledBorder)serializeObject(border2);
+        resurrectedBorder = (TitledBorder) serializeObject(border2);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getTitle(),
-                border2.getTitle());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getTitleColor(),
+        assertEquals("Deserialized values coincides", resurrectedBorder.getTitle(), border2
+                .getTitle());
+        assertEquals("Deserialized values coincides", resurrectedBorder.getTitleColor(),
                 border2.getTitleColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getBorder().getClass(),
+        assertEquals("Deserialized values coincides", resurrectedBorder.getBorder().getClass(),
                 border2.getBorder().getClass());
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/AbstractColorChooserPanelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/AbstractColorChooserPanelTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/AbstractColorChooserPanelTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/AbstractColorChooserPanelTest.java Sun Nov 26 12:15:43 2006
@@ -27,22 +27,37 @@
 public class AbstractColorChooserPanelTest extends BasicSwingTestCase {
     AbstractColorChooserPanel panel;
 
+    @Override
     public void setUp() throws Exception {
         panel = new AbstractColorChooserPanel() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
             public String getDisplayName() {
                 return "";
             }
+
+            @Override
             public Icon getSmallDisplayIcon() {
                 return null;
             }
+
+            @Override
             public Icon getLargeDisplayIcon() {
                 return null;
             }
-            public void updateChooser() {}
-            protected void buildChooser() {}
+
+            @Override
+            public void updateChooser() {
+            }
+
+            @Override
+            protected void buildChooser() {
+            }
         };
     }
 
+    @Override
     public void tearDown() throws Exception {
         panel = null;
     }
@@ -54,17 +69,20 @@
 
     public void testInstallUninstallChooserPanel() {
         testExceptionalCase(new NullPointerCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 panel.getColorSelectionModel();
             }
         });
         JColorChooser chooser = new JColorChooser();
-        int oldListenersCount = ((DefaultColorSelectionModel)chooser.getSelectionModel()).getChangeListeners().length;
+        int oldListenersCount = ((DefaultColorSelectionModel) chooser.getSelectionModel())
+                .getChangeListeners().length;
         panel.installChooserPanel(chooser);
         assertSame(chooser.getColor(), panel.getColorFromModel());
-        assertEquals(oldListenersCount + 1, ((DefaultColorSelectionModel)chooser.getSelectionModel()).getChangeListeners().length);
-
+        assertEquals(oldListenersCount + 1, ((DefaultColorSelectionModel) chooser
+                .getSelectionModel()).getChangeListeners().length);
         panel.uninstallChooserPanel(chooser);
-        assertEquals(oldListenersCount, ((DefaultColorSelectionModel)chooser.getSelectionModel()).getChangeListeners().length);
+        assertEquals(oldListenersCount, ((DefaultColorSelectionModel) chooser
+                .getSelectionModel()).getChangeListeners().length);
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/ColorChooserComponentFactoryTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/ColorChooserComponentFactoryTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/ColorChooserComponentFactoryTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/ColorChooserComponentFactoryTest.java Sun Nov 26 12:15:43 2006
@@ -23,7 +23,6 @@
 import java.awt.Color;
 import java.awt.Component;
 import java.awt.Dimension;
-
 import javax.swing.BasicSwingTestCase;
 import javax.swing.BorderFactory;
 import javax.swing.JColorChooser;
@@ -35,41 +34,42 @@
 
 public class ColorChooserComponentFactoryTest extends BasicSwingTestCase {
     private JColorChooser colorChooser;
-    
+
+    @Override
     public void setUp() throws Exception {
         colorChooser = new JColorChooser(Color.GREEN);
     }
-    
+
+    @Override
     public void tearDown() throws Exception {
         colorChooser = null;
     }
-    
+
     public void testSwatchPanel() throws Exception {
-        AbstractColorChooserPanel swatchPanel = ColorChooserComponentFactory.getDefaultChooserPanels()[0];
+        AbstractColorChooserPanel swatchPanel = ColorChooserComponentFactory
+                .getDefaultChooserPanels()[0];
         UIManager.put("ColorChooser.swatchesSwatchSize", new Dimension(25, 25));
-        
         assertEquals("Swatches", swatchPanel.getDisplayName());
         assertNull(swatchPanel.getSmallDisplayIcon());
-        assertNull(swatchPanel.getLargeDisplayIcon());        
+        assertNull(swatchPanel.getLargeDisplayIcon());
     }
-    
-    public void testRGBPanel() throws Exception {                
-        AbstractColorChooserPanel rgbPanel = ColorChooserComponentFactory.getDefaultChooserPanels()[2];
+
+    public void testRGBPanel() throws Exception {
+        AbstractColorChooserPanel rgbPanel = ColorChooserComponentFactory
+                .getDefaultChooserPanels()[2];
         assertEquals("RGB", rgbPanel.getDisplayName());
         assertNull(rgbPanel.getSmallDisplayIcon());
         assertNull(rgbPanel.getLargeDisplayIcon());
-        
         rgbPanel.installChooserPanel(colorChooser);
         assertNull(rgbPanel.getSmallDisplayIcon());
         assertNull(rgbPanel.getLargeDisplayIcon());
-        
-        Component[] components = ((JComponent)rgbPanel.getComponent(0)).getComponents();
+        Component[] components = ((JComponent) rgbPanel.getComponent(0)).getComponents();
         int slidersCount = 0;
         // different layout on panels
         if (!isHarmony()) {
             for (int i = 0; i < components.length; i++) {
                 if (components[i] instanceof JSlider) {
-                    JSlider slider = (JSlider)components[i];
+                    JSlider slider = (JSlider) components[i];
                     slider.setValue(35 * slidersCount);
                     assertTrue(slider.getPaintLabels());
                     assertTrue(slider.getPaintTicks());
@@ -78,9 +78,9 @@
             }
         } else {
             for (int i = 0; i < components.length; i++) {
-                JPanel panel = (JPanel)components[i];
+                JPanel panel = (JPanel) components[i];
                 if (panel.getComponent(1) instanceof JSlider) {
-                    JSlider slider = (JSlider)panel.getComponent(1);
+                    JSlider slider = (JSlider) panel.getComponent(1);
                     slider.setValue(35 * slidersCount);
                     assertTrue(slider.getPaintLabels());
                     assertTrue(slider.getPaintTicks());
@@ -88,25 +88,23 @@
                 }
             }
         }
-        
         assertEquals(3, slidersCount);
         assertEquals(new Color(0, 35, 70), colorChooser.getColor());
-        
         int spinnersCount = 0;
         // different layout on panels
         if (!isHarmony()) {
             for (int i = 0; i < components.length; i++) {
                 if (components[i] instanceof JPanel) {
-                    JSpinner spinner = (JSpinner)((JPanel)components[i]).getComponent(0);
+                    JSpinner spinner = (JSpinner) ((JPanel) components[i]).getComponent(0);
                     spinner.setValue(new Integer(66 * spinnersCount));
                     spinnersCount++;
                 }
             }
         } else {
             for (int i = 0; i < components.length; i++) {
-                JPanel panel = (JPanel)(((JPanel)components[i]).getComponent(2));
+                JPanel panel = (JPanel) (((JPanel) components[i]).getComponent(2));
                 if (panel.getComponent(0) instanceof JSpinner) {
-                    JSpinner spinner = (JSpinner)panel.getComponent(0);
+                    JSpinner spinner = (JSpinner) panel.getComponent(0);
                     spinner.setValue(new Integer(66 * spinnersCount));
                     spinnersCount++;
                 }
@@ -115,62 +113,60 @@
         assertEquals(3, spinnersCount);
         assertEquals(new Color(0, 66, 132), colorChooser.getColor());
     }
-    
+
     public void testHSBPanel() throws InterruptedException {
-        AbstractColorChooserPanel hsbPanel = ColorChooserComponentFactory.getDefaultChooserPanels()[1];
+        AbstractColorChooserPanel hsbPanel = ColorChooserComponentFactory
+                .getDefaultChooserPanels()[1];
         assertEquals("HSB", hsbPanel.getDisplayName());
         assertNull(hsbPanel.getSmallDisplayIcon());
         assertNull(hsbPanel.getLargeDisplayIcon());
-        
         hsbPanel.installChooserPanel(colorChooser);
         assertNull(hsbPanel.getSmallDisplayIcon());
         assertNull(hsbPanel.getLargeDisplayIcon());
-        
-        Component[] components = ((JComponent)hsbPanel.getComponent(0)).getComponents();
-                
+        Component[] components = ((JComponent) hsbPanel.getComponent(0)).getComponents();
         JSlider slider;
-//      different layout on panels
+        //      different layout on panels
         if (!isHarmony()) {
-            slider = ((JSlider)components[1]);
+            slider = ((JSlider) components[1]);
         } else {
-            slider = (JSlider)((JComponent)components[0]).getComponent(1);            
+            slider = (JSlider) ((JComponent) components[0]).getComponent(1);
         }
         assertFalse(slider.getPaintTrack());
         assertTrue(slider.getInverted());
         slider.setValue(35);
         assertEquals(colorChooser.getColor(), new Color(255, 149, 0));
-        
         int spinnerCount = 0;
         // different layout on panels
         if (!isHarmony()) {
-            components = ((JComponent)((JComponent)hsbPanel.getComponent(1)).getComponent(0)).getComponents();
+            components = ((JComponent) ((JComponent) hsbPanel.getComponent(1)).getComponent(0))
+                    .getComponents();
             for (int i = 0; i < components.length; i++) {
-                ((JComponent)components[i]).setBorder(BorderFactory.createLineBorder(Color.GREEN, 1));
+                ((JComponent) components[i]).setBorder(BorderFactory.createLineBorder(
+                        Color.GREEN, 1));
                 if (components[i] instanceof JSpinner) {
-                    JSpinner spinner = (JSpinner)components[i];
+                    JSpinner spinner = (JSpinner) components[i];
                     spinner.setValue(new Integer(100));
                     spinnerCount++;
                 }
             }
         } else {
-            components = ((JComponent)hsbPanel.getComponent(0)).getComponents();
-            components = ((JComponent)components[1]).getComponents();
-            for (int i = 0; i < components.length; i++) {                
-                Component component = (JComponent)components[i];
-                if (component instanceof JSpinner) {                    
-                    JSpinner spinner = (JSpinner)component;
+            components = ((JComponent) hsbPanel.getComponent(0)).getComponents();
+            components = ((JComponent) components[1]).getComponents();
+            for (int i = 0; i < components.length; i++) {
+                Component component = components[i];
+                if (component instanceof JSpinner) {
+                    JSpinner spinner = (JSpinner) component;
                     spinner.setValue(new Integer(100));
                     spinnerCount++;
                 }
             }
         }
-        
         assertEquals(3, spinnerCount);
         assertEquals(colorChooser.getColor(), new Color(84, 255, 0));
     }
-    
+
     public void testPreviewPanel() throws Exception {
-        JComponent panel = ColorChooserComponentFactory.getPreviewPanel();        
+        JComponent panel = ColorChooserComponentFactory.getPreviewPanel();
         assertTrue(panel instanceof JPanel);
         assertEquals(colorChooser.getPreviewPanel().getForeground(), Color.GREEN);
         colorChooser.setColor(Color.RED);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/DefaultColorSelectionModelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/DefaultColorSelectionModelTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/DefaultColorSelectionModelTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/colorchooser/DefaultColorSelectionModelTest.java Sun Nov 26 12:15:43 2006
@@ -22,19 +22,21 @@
 
 import java.awt.Color;
 import java.util.Arrays;
-
 import javax.swing.BasicSwingTestCase;
 import javax.swing.event.ChangeListener;
 
 public class DefaultColorSelectionModelTest extends BasicSwingTestCase {
     ChangeController changeController;
+
     DefaultColorSelectionModel model;
 
+    @Override
     public void setUp() throws Exception {
         changeController = new ChangeController();
         model = new DefaultColorSelectionModel();
     }
 
+    @Override
     public void tearDown() throws Exception {
         model = null;
         changeController = null;
@@ -51,7 +53,6 @@
         model.setSelectedColor(Color.GREEN);
         assertTrue(changeController.isChanged());
         assertSame(Color.GREEN, model.getSelectedColor());
-
         changeController.reset();
         model.setSelectedColor(Color.GREEN);
         assertFalse(changeController.isChanged());
@@ -61,24 +62,30 @@
 
     public void testAddGetRemoveChangeListeners() {
         model.addChangeListener(changeController);
-        assertTrue(Arrays.asList(model.listenerList.getListenerList()).contains(changeController));
-        assertEquals(model.listenerList.getListeners(ChangeListener.class), model.getChangeListeners());
+        assertTrue(Arrays.asList(model.listenerList.getListenerList()).contains(
+                changeController));
+        assertEquals(model.listenerList.getListeners(ChangeListener.class), model
+                .getChangeListeners());
         model.removeChangeListener(changeController);
-        assertFalse(Arrays.asList(model.listenerList.getListenerList()).contains(changeController));
-        assertEquals(model.listenerList.getListeners(ChangeListener.class), model.getChangeListeners());
-
+        assertFalse(Arrays.asList(model.listenerList.getListenerList()).contains(
+                changeController));
+        assertEquals(model.listenerList.getListeners(ChangeListener.class), model
+                .getChangeListeners());
         model.listenerList = null;
         testExceptionalCase(new NullPointerCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 model.addChangeListener(changeController);
             }
         });
         testExceptionalCase(new NullPointerCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 model.getChangeListeners();
             }
         });
     }
+
     public void testFireStateChanged() {
         model.addChangeListener(changeController);
         model.fireStateChanged();



Mime
View raw message