harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r479418 [14/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/ j...
Date Sun, 26 Nov 2006 20:15:55 GMT
Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalRootPaneUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalRootPaneUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalRootPaneUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalRootPaneUITest.java Sun Nov 26 12:15:43 2006
@@ -18,22 +18,17 @@
  * @author Vadim L. Bogdanov
  * @version $Revision$
  */
-
 package javax.swing.plaf.metal;
 
 import java.awt.LayoutManager;
-
 import javax.swing.BorderFactory;
 import javax.swing.JFrame;
 import javax.swing.JRootPane;
-
 import javax.swing.SwingTestCase;
-
 import javax.swing.border.Border;
 import javax.swing.plaf.ComponentUI;
 
 public class MetalRootPaneUITest extends SwingTestCase {
-
     private JRootPane rootPane;
 
     private MetalRootPaneUI ui;
@@ -43,9 +38,9 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         frame = new JFrame();
         rootPane = frame.getRootPane();
         ui = new MetalRootPaneUI();
@@ -54,6 +49,7 @@
     /*
      * @see TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -73,20 +69,17 @@
         Border saveBorder = rootPane.getBorder();
         LayoutManager saveLayout = rootPane.getLayout();
         int saveComponentCount = rootPane.getLayeredPane().getComponentCount();
-
         ui.installUI(rootPane);
         assertTrue("didn't install border", rootPane.getBorder() == saveBorder);
         assertTrue("didn't install layout", rootPane.getLayout() == saveLayout);
         assertTrue("didn't install titlePane",
                 rootPane.getLayeredPane().getComponentCount() == saveComponentCount);
-
         // test install with windowDecorationStyle = JRootPane.FRAME
         rootPane.setWindowDecorationStyle(JRootPane.FRAME);
         ui.uninstallUI(rootPane);
         saveBorder = rootPane.getBorder();
         saveLayout = rootPane.getLayout();
         saveComponentCount = rootPane.getLayeredPane().getComponentCount();
-
         ui.installUI(rootPane);
         assertTrue("border != null", rootPane.getBorder() != null);
         assertTrue("installed border", rootPane.getBorder() != saveBorder);
@@ -105,20 +98,17 @@
         Border saveBorder = rootPane.getBorder();
         LayoutManager saveLayout = rootPane.getLayout();
         int saveComponentCount = rootPane.getLayeredPane().getComponentCount();
-
         ui.uninstallUI(rootPane);
         assertTrue("didn't uninstall border", rootPane.getBorder() == saveBorder);
         assertTrue("didn't uninstall layout", rootPane.getLayout() == saveLayout);
         assertTrue("didn't uninstall titlePane",
                 rootPane.getLayeredPane().getComponentCount() == saveComponentCount);
-
         // test uninstall with windowDecorationStyle = JRootPane.FRAME
         ui.installUI(rootPane);
         rootPane.setWindowDecorationStyle(JRootPane.FRAME);
         saveBorder = rootPane.getBorder();
         saveLayout = rootPane.getLayout();
         saveComponentCount = rootPane.getLayeredPane().getComponentCount();
-
         ui.uninstallUI(rootPane);
         assertTrue("uninstalled border", rootPane.getBorder() != saveBorder);
         assertTrue("uninstalled layout", rootPane.getLayout() != saveLayout);
@@ -134,7 +124,6 @@
         Border saveBorder = rootPane.getBorder();
         LayoutManager saveLayout = rootPane.getLayout();
         int saveComponentCount = rootPane.getLayeredPane().getComponentCount();
-
         // test windowDecorationStyle = JRootPane.FRAME
         rootPane.setWindowDecorationStyle(JRootPane.FRAME);
         assertTrue("border != null", rootPane.getBorder() != null);
@@ -143,14 +132,12 @@
         assertTrue("installed layout", rootPane.getLayout() != saveLayout);
         assertTrue("installed titlePane",
                 rootPane.getLayeredPane().getComponentCount() == saveComponentCount + 1);
-
         // test windowDecorationStyle = JRootPane.NONE
         rootPane.setWindowDecorationStyle(JRootPane.NONE);
         assertTrue("uninstalled border", rootPane.getBorder() == saveBorder);
         assertTrue("uninstalled layout", rootPane.getLayout() == saveLayout);
         assertTrue("uninstalled titlePane",
                 rootPane.getLayeredPane().getComponentCount() == saveComponentCount);
-
         // the border is not instanceof UIResource, must not be changed
         saveBorder = BorderFactory.createEmptyBorder();
         rootPane.setBorder(saveBorder);
@@ -164,7 +151,6 @@
         ComponentUI ui = MetalRootPaneUI.createUI(rootPane);
         assertTrue("not null", ui != null);
         assertTrue("instanceof MetalRootPaneUI", ui instanceof MetalRootPaneUI);
-
         ComponentUI ui2 = MetalRootPaneUI.createUI(rootPane);
         assertTrue("stateful", ui != ui2);
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalScrollBarUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalScrollBarUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalScrollBarUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalScrollBarUITest.java Sun Nov 26 12:15:43 2006
@@ -14,29 +14,30 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Sergey Burlak
  * @version $Revision$
  */
-
 package javax.swing.plaf.metal;
 
 import java.awt.Dimension;
-
 import javax.swing.JScrollBar;
+import javax.swing.SwingConstants;
 import javax.swing.SwingTestCase;
 
 public class MetalScrollBarUITest extends SwingTestCase {
     private MetalScrollBarUI barUI;
+
     private JScrollBar bar;
 
+    @Override
     protected void setUp() throws Exception {
         bar = new JScrollBar();
         barUI = new MetalScrollBarUI();
         bar.setUI(barUI);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         barUI = null;
         bar = null;
@@ -52,9 +53,10 @@
     public void testCreateButtons() throws Exception {
         assertNotNull(barUI.increaseButton);
         assertNotNull(barUI.decreaseButton);
-
-        assertFalse(barUI.increaseButton == barUI.createIncreaseButton(MetalScrollBarUI.HORIZONTAL));
-        assertFalse(barUI.decreaseButton == barUI.createDecreaseButton(MetalScrollBarUI.HORIZONTAL));
+        assertFalse(barUI.increaseButton == barUI
+                .createIncreaseButton(SwingConstants.HORIZONTAL));
+        assertFalse(barUI.decreaseButton == barUI
+                .createDecreaseButton(SwingConstants.HORIZONTAL));
     }
 
     public void testCreateUI() throws Exception {
@@ -63,6 +65,7 @@
 
     public void testCreatePropertyChangeListener() throws Exception {
         assertNotNull(barUI.createPropertyChangeListener());
-        assertFalse(barUI.createPropertyChangeListener() == barUI.createPropertyChangeListener());
+        assertFalse(barUI.createPropertyChangeListener() == barUI
+                .createPropertyChangeListener());
     }
 }

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

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalScrollPaneUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalScrollPaneUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalScrollPaneUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalScrollPaneUITest.java Sun Nov 26 12:15:43 2006
@@ -30,10 +30,12 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         ui = new MetalScrollPaneUI();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         ui = null;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalSeparatorUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalSeparatorUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalSeparatorUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalSeparatorUITest.java Sun Nov 26 12:15:43 2006
@@ -15,21 +15,22 @@
  *  limitations under the License.
  */
 /**
-* @author Alexander T. Simbirtsev
-* @version $Revision$
-*/
+ * @author Alexander T. Simbirtsev
+ * @version $Revision$
+ */
 package javax.swing.plaf.metal;
 
 import javax.swing.JButton;
 import javax.swing.plaf.basic.BasicSeparatorUITest;
 
 public class MetalSeparatorUITest extends BasicSeparatorUITest {
-
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         ui = new MetalSeparatorUI();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -37,10 +38,12 @@
     /*
      * Test method for 'javax.swing.plaf.metal.MetalSeparatorUI.createUI(JComponent)'
      */
+    @Override
     public void testCreateUI() {
         assertNotNull("created UI is not null", MetalSeparatorUI.createUI(new JButton()));
-        assertTrue("created UI is of the proper class", MetalSeparatorUI.createUI(null) instanceof MetalSeparatorUI);
-        assertNotSame("created UI is of unique", MetalSeparatorUI.createUI(null), MetalSeparatorUI.createUI(null));
+        assertTrue("created UI is of the proper class",
+                MetalSeparatorUI.createUI(null) instanceof MetalSeparatorUI);
+        assertNotSame("created UI is of unique", MetalSeparatorUI.createUI(null),
+                MetalSeparatorUI.createUI(null));
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalSliderUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalSliderUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalSliderUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalSliderUITest.java Sun Nov 26 12:15:43 2006
@@ -25,13 +25,16 @@
 
 public class MetalSliderUITest extends SwingTestCase {
     private MetalSliderUI sliderUI;
+
     private JSlider slider;
 
+    @Override
     protected void setUp() throws Exception {
         slider = new JSlider();
         sliderUI = new MetalSliderUI();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         sliderUI = null;
         slider = null;
@@ -44,7 +47,8 @@
 
     public void testCreatePropertyChangeListener() throws Exception {
         assertNotNull(sliderUI.createPropertyChangeListener(slider));
-        assertFalse(sliderUI.createPropertyChangeListener(slider) == sliderUI.createPropertyChangeListener(slider));
+        assertFalse(sliderUI.createPropertyChangeListener(slider) == sliderUI
+                .createPropertyChangeListener(slider));
         assertTrue(sliderUI.createPropertyChangeListener(slider) instanceof MetalSliderUI.MetalPropertyListener);
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTabbedPaneUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTabbedPaneUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTabbedPaneUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTabbedPaneUITest.java Sun Nov 26 12:15:43 2006
@@ -24,69 +24,67 @@
 import java.awt.FontMetrics;
 import java.awt.Rectangle;
 import java.awt.image.BufferedImage;
-
 import javax.swing.ImageIcon;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JTabbedPane;
+import javax.swing.SwingConstants;
 import javax.swing.SwingTestCase;
 import javax.swing.UIManager;
 import javax.swing.plaf.ComponentUI;
 
-
 public class MetalTabbedPaneUITest extends SwingTestCase {
-
     private class TestMetalTabbedPaneUI extends MetalTabbedPaneUI {
+        @Override
         protected FontMetrics getFontMetrics() {
             return super.getFontMetrics();
         }
 
-        protected int calculateTabWidth(final int tabPlacement,
-                                        final int tabIndex,
-                                        final FontMetrics fm) {
+        @Override
+        protected int calculateTabWidth(final int tabPlacement, final int tabIndex,
+                final FontMetrics fm) {
             return super.calculateTabWidth(tabPlacement, tabIndex, fm);
         }
 
-        protected int calculateTabHeight(final int tabPlacement,
-                                         final int tabIndex,
-                                         final int fontHeight) {
+        @Override
+        protected int calculateTabHeight(final int tabPlacement, final int tabIndex,
+                final int fontHeight) {
             return super.calculateTabHeight(tabPlacement, tabIndex, fontHeight);
         }
 
+        @Override
         protected int getRunForTab(final int tabCount, final int tabIndex) {
             return super.getRunForTab(tabCount, tabIndex);
         }
     }
 
     private JTabbedPane tabbed;
+
     private TestMetalTabbedPaneUI ui;
+
     private JFrame frame;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         tabbed = new JTabbedPane();
         ui = new TestMetalTabbedPaneUI();
         tabbed.setUI(ui);
-
         tabbed.addTab("tab1", new JLabel());
-        tabbed.setIconAt(0, new ImageIcon(new BufferedImage(
-                10, 10, BufferedImage.TYPE_INT_RGB)));
-        tabbed.setDisabledIconAt(0, new ImageIcon(new BufferedImage(
-                10, 10, BufferedImage.TYPE_INT_RGB)));
-
+        tabbed.setIconAt(0,
+                new ImageIcon(new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB)));
+        tabbed.setDisabledIconAt(0, new ImageIcon(new BufferedImage(10, 10,
+                BufferedImage.TYPE_INT_RGB)));
         tabbed.addTab("tabtab2", new JLabel());
-
         FontMetrics fm = ui.getFontMetrics();
         tabbed.setSize(ui.calculateTabWidth(tabbed.getTabPlacement(), 0, fm)
-                       + ui.calculateTabWidth(tabbed.getTabPlacement(), 1, fm)
-                       + 10, 100);
+                + ui.calculateTabWidth(tabbed.getTabPlacement(), 1, fm) + 10, 100);
         tabbed.doLayout();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
-
         if (frame != null) {
             frame.dispose();
             frame = null;
@@ -115,30 +113,28 @@
         int fontHeight = tabbed.getFontMetrics(tabbed.getFont()).getHeight();
         int height1 = ui.calculateTabHeight(tabPlacement, 0, fontHeight);
         int height2 = ui.calculateTabHeight(tabPlacement, 1, fontHeight);
-        assertEquals(Math.max(height1, height2),
-                     ui.calculateMaxTabHeight(tabPlacement));
+        assertEquals(Math.max(height1, height2), ui.calculateMaxTabHeight(tabPlacement));
     }
 
     public void testCreateLayoutManager() {
-        assertTrue(ui.createLayoutManager()
-                   instanceof MetalTabbedPaneUI.TabbedPaneLayout);
+        assertTrue(ui.createLayoutManager() instanceof MetalTabbedPaneUI.TabbedPaneLayout);
     }
 
     public void testGetTabLabelShiftX() {
-        assertEquals(0, ui.getTabLabelShiftX(JTabbedPane.TOP, 0, true));
-        assertEquals(0, ui.getTabLabelShiftX(JTabbedPane.TOP, 1, false));
+        assertEquals(0, ui.getTabLabelShiftX(SwingConstants.TOP, 0, true));
+        assertEquals(0, ui.getTabLabelShiftX(SwingConstants.TOP, 1, false));
     }
 
     public void testGetTabLabelShiftY() {
-        assertEquals(0, ui.getTabLabelShiftY(JTabbedPane.TOP, 0, true));
-        assertEquals(0, ui.getTabLabelShiftY(JTabbedPane.TOP, 1, false));
+        assertEquals(0, ui.getTabLabelShiftY(SwingConstants.TOP, 0, true));
+        assertEquals(0, ui.getTabLabelShiftY(SwingConstants.TOP, 1, false));
     }
 
     public void testGetTabRunOverlay() {
-        assertTrue(ui.getTabRunOverlay(JTabbedPane.TOP) >= 0);
-        assertTrue(ui.getTabRunOverlay(JTabbedPane.LEFT) >= 0);
-        assertTrue(ui.getTabRunOverlay(JTabbedPane.RIGHT) >= 0);
-        assertTrue(ui.getTabRunOverlay(JTabbedPane.BOTTOM) >= 0);
+        assertTrue(ui.getTabRunOverlay(SwingConstants.TOP) >= 0);
+        assertTrue(ui.getTabRunOverlay(SwingConstants.LEFT) >= 0);
+        assertTrue(ui.getTabRunOverlay(SwingConstants.RIGHT) >= 0);
+        assertTrue(ui.getTabRunOverlay(SwingConstants.BOTTOM) >= 0);
     }
 
     public void testInstallDefaults() {
@@ -146,15 +142,11 @@
         ui.selectColor = null;
         ui.selectHighlight = null;
         ui.tabAreaBackground = null;
-
         ui.installDefaults();
-
         assertEquals(1, ui.minTabWidth);
         assertEquals(UIManager.get("TabbedPane.selected"), ui.selectColor);
-        assertEquals(UIManager.get("TabbedPane.selectHighlight"),
-                     ui.selectHighlight);
-        assertEquals(UIManager.get("TabbedPane.tabAreaBackground"),
-                     ui.tabAreaBackground);
+        assertEquals(UIManager.get("TabbedPane.selectHighlight"), ui.selectHighlight);
+        assertEquals(UIManager.get("TabbedPane.tabAreaBackground"), ui.tabAreaBackground);
     }
 
     public void testPaintContentBorderBottomEdge() {
@@ -186,13 +178,11 @@
     }
 
     public void testShouldPadTabRun() {
-        assertFalse(ui.shouldPadTabRun(JTabbedPane.TOP, 0));
-
+        assertFalse(ui.shouldPadTabRun(SwingConstants.TOP, 0));
         create3TabRuns();
-
-        assertFalse(ui.shouldPadTabRun(JTabbedPane.TOP, 2));
-        assertTrue(ui.shouldPadTabRun(JTabbedPane.TOP, 1));
-        assertTrue(ui.shouldPadTabRun(JTabbedPane.TOP, 0));
+        assertFalse(ui.shouldPadTabRun(SwingConstants.TOP, 2));
+        assertTrue(ui.shouldPadTabRun(SwingConstants.TOP, 1));
+        assertTrue(ui.shouldPadTabRun(SwingConstants.TOP, 0));
     }
 
     public void testMetalTabbedPaneUI() {
@@ -201,22 +191,17 @@
 
     public void testGetColorForGap() {
         assertEquals(tabbed.getBackground(), ui.getColorForGap(0, 0, 0));
-
         create3TabRuns();
         tabbed.setBackgroundAt(2, Color.green);
         tabbed.setBackgroundAt(0, Color.red);
         tabbed.setSelectedIndex(3);
-
         int tabCount = tabbed.getTabCount();
         Rectangle tabBounds = ui.getTabBounds(tabbed, 0);
-        assertEquals(tabbed.getBackgroundAt(2),
-                     ui.getColorForGap(ui.getRunForTab(tabCount, 0),
-                                       tabBounds.x, tabBounds.y));
-
+        assertEquals(tabbed.getBackgroundAt(2), ui.getColorForGap(ui.getRunForTab(tabCount, 0),
+                tabBounds.x, tabBounds.y));
         tabbed.setSelectedIndex(2);
-        assertEquals(ui.selectColor,
-                     ui.getColorForGap(ui.getRunForTab(tabCount, 0),
-                                       tabBounds.x, tabBounds.y));
+        assertEquals(ui.selectColor, ui.getColorForGap(ui.getRunForTab(tabCount, 0),
+                tabBounds.x, tabBounds.y));
     }
 
     public void testPaintHighlightBelowTab() {
@@ -241,22 +226,18 @@
 
     public void testShouldFillGap() {
         assertFalse(ui.shouldFillGap(0, 0, 0, 0));
-
         create3TabRuns();
-
         int tabCount = tabbed.getTabCount();
         Rectangle tabBounds = ui.getTabBounds(tabbed, 0);
-        assertTrue(ui.shouldFillGap(ui.getRunForTab(tabCount, 0), 0,
-                                    tabBounds.x, tabBounds.y));
-
+        assertTrue(ui.shouldFillGap(ui.getRunForTab(tabCount, 0), 0, tabBounds.x, tabBounds.y));
         tabBounds = ui.getTabBounds(tabbed, tabCount - 1);
-        assertFalse(ui.shouldFillGap(ui.getRunForTab(tabCount, tabCount - 1),
-                                     tabCount - 1, tabBounds.x, tabBounds.y));
+        assertFalse(ui.shouldFillGap(ui.getRunForTab(tabCount, tabCount - 1), tabCount - 1,
+                tabBounds.x, tabBounds.y));
     }
 
     public void testShouldRotateTabRuns() {
-        assertFalse(ui.shouldRotateTabRuns(JTabbedPane.TOP, 0));
-        assertFalse(ui.shouldRotateTabRuns(JTabbedPane.TOP, 1));
+        assertFalse(ui.shouldRotateTabRuns(SwingConstants.TOP, 0));
+        assertFalse(ui.shouldRotateTabRuns(SwingConstants.TOP, 1));
     }
 
     private void create3TabRuns() {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTextFieldUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTextFieldUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTextFieldUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTextFieldUITest.java Sun Nov 26 12:15:43 2006
@@ -18,7 +18,6 @@
  * @author Evgeniya G. Maenkova
  * @version $Revision$
  */
-
 package javax.swing.plaf.metal;
 
 import javax.swing.JTextField;
@@ -27,15 +26,17 @@
 
 public class MetalTextFieldUITest extends SwingTestCase {
     JTextField tf;
+
     MetalTextFieldUI ui;
 
+    @Override
     protected void setUp() throws Exception {
         tf = new JTextField();
         ui = new MetalTextFieldUI();
         super.setUp();
     }
 
-
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -46,8 +47,5 @@
         ComponentUI ui2 = MetalTextFieldUI.createUI(tf);
         assertTrue(ui2 instanceof MetalTextFieldUI);
         assertNotSame(ui1, ui2);
-    }
-    public void testMetalTextFieldUI(){
-        assertTrue(ui instanceof MetalTextFieldUI);
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalThemeTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalThemeTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalThemeTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalThemeTest.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.metal;
 
 import javax.swing.SwingTestCase;
@@ -30,10 +28,12 @@
 public class MetalThemeTest extends SwingTestCase {
     private TestMetalTheme metalTheme;
 
+    @Override
     public void setUp() {
         metalTheme = new TestMetalTheme();
     }
 
+    @Override
     public void tearDown() {
         metalTheme = null;
     }
@@ -190,51 +190,77 @@
     }
 }
 
-class TestMetalTheme extends MetalTheme  {
+class TestMetalTheme extends MetalTheme {
     public ColorUIResource getWhitePublic() {
         return getWhite();
     }
+
     public ColorUIResource getBlackPublic() {
         return getBlack();
     }
+
+    @Override
     public String getName() {
         return "name";
     }
+
+    @Override
     protected ColorUIResource getPrimary1() {
         return new ColorUIResource(1, 1, 1);
     }
+
+    @Override
     protected ColorUIResource getPrimary2() {
         return new ColorUIResource(1, 1, 2);
     }
+
+    @Override
     protected ColorUIResource getPrimary3() {
         return new ColorUIResource(1, 1, 3);
     }
+
+    @Override
     protected ColorUIResource getSecondary1() {
         return new ColorUIResource(1, 1, 4);
     }
+
+    @Override
     protected ColorUIResource getSecondary2() {
         return new ColorUIResource(1, 1, 5);
     }
+
+    @Override
     protected ColorUIResource getSecondary3() {
         return new ColorUIResource(1, 1, 6);
     }
+
+    @Override
     public FontUIResource getControlTextFont() {
         return null;
     }
+
+    @Override
     public FontUIResource getMenuTextFont() {
         return null;
     }
+
+    @Override
     public FontUIResource getSubTextFont() {
         return null;
     }
+
+    @Override
     public FontUIResource getSystemTextFont() {
         return null;
     }
+
+    @Override
     public FontUIResource getUserTextFont() {
         return null;
     }
+
+    @Override
     public FontUIResource getWindowTitleFont() {
         return null;
     }
 }
-

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalToggleButtonUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalToggleButtonUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalToggleButtonUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalToggleButtonUITest.java Sun Nov 26 12:15:43 2006
@@ -24,7 +24,6 @@
 
 import java.awt.Color;
 import java.awt.Font;
-
 import javax.swing.AbstractButton;
 import javax.swing.BorderFactory;
 import javax.swing.JButton;
@@ -37,19 +36,23 @@
 import javax.swing.plaf.basic.BasicToggleButtonUITest;
 
 public class MetalToggleButtonUITest extends BasicToggleButtonUITest {
-
     public static void main(final String[] args) {
         junit.textui.TestRunner.run(MetalToggleButtonUITest.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
 
+    @Override
     public void testCreateUI() {
-        assertTrue("created UI is not null", null != MetalToggleButtonUI.createUI(new JButton()));
-        assertTrue("created UI is of the proper class", MetalToggleButtonUI.createUI(null) instanceof MetalToggleButtonUI);
-        assertTrue("created UI is not shared", MetalToggleButtonUI.createUI(null) == MetalToggleButtonUI.createUI(null));
+        assertTrue("created UI is not null", null != MetalToggleButtonUI
+                .createUI(new JButton()));
+        assertTrue("created UI is of the proper class",
+                MetalToggleButtonUI.createUI(null) instanceof MetalToggleButtonUI);
+        assertTrue("created UI is not shared",
+                MetalToggleButtonUI.createUI(null) == MetalToggleButtonUI.createUI(null));
     }
 
     public void testPaintFocus() {
@@ -65,11 +68,11 @@
     }
 
     class PublicMetalToggleButtonUI extends MetalToggleButtonUI {
-
         public void setDisabledTextColor(final Color color) {
             disabledTextColor = color;
         }
 
+        @Override
         public Color getDisabledTextColor() {
             return super.getDisabledTextColor();
         }
@@ -78,6 +81,7 @@
             focusColor = color;
         }
 
+        @Override
         public Color getFocusColor() {
             return super.getFocusColor();
         }
@@ -86,15 +90,17 @@
             selectColor = color;
         }
 
+        @Override
         public Color getSelectColor() {
             return super.getSelectColor();
         }
 
+        @Override
         public void uninstallDefaults(final AbstractButton b) {
             super.uninstallDefaults(b);
         }
-
     }
+
     public void testGetDisabledTextColor() {
         PublicMetalToggleButtonUI publicUI = new PublicMetalToggleButtonUI();
         assertNull("DisabledTextColor is null", publicUI.getDisabledTextColor());
@@ -128,7 +134,6 @@
         UIManager.put("ToggleButton.font", font);
         Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
         UIManager.put("ToggleButton.border", border);
-
         button.setUI(publicUI);
         publicUI.installDefaults(button);
         assertEquals(Color.blue, button.getBackground());
@@ -152,7 +157,6 @@
         UIManager.put("ToggleButton.font", font);
         Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
         UIManager.put("ToggleButton.border", border);
-
         button.setUI(publicUI);
         publicUI.installDefaults(button);
         publicUI.uninstallDefaults(button);
@@ -164,5 +168,4 @@
         assertEquals("font", font, button.getFont());
         assertNull("border", button.getBorder());
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalToolBarUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalToolBarUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalToolBarUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalToolBarUITest.java Sun Nov 26 12:15:43 2006
@@ -27,7 +27,6 @@
 import java.awt.event.MouseEvent;
 import java.beans.PropertyChangeListener;
 import java.util.Arrays;
-
 import javax.swing.JButton;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
@@ -44,6 +43,7 @@
             TestMetalDockingListener(final JToolBar toolBar) {
                 super(toolBar);
             }
+
             boolean isDragging() {
                 return isDragging;
             }
@@ -54,12 +54,15 @@
         }
 
         public Border nonRolloverBorder;
+
         private boolean dragToCalled;
 
+        @Override
         protected PropertyChangeListener createRolloverListener() {
             return new MetalRolloverListener();
         }
 
+        @Override
         protected ContainerListener createContainerListener() {
             return new MetalContainerListener();
         }
@@ -68,11 +71,13 @@
             return dragWindow.getOffset();
         }
 
+        @Override
         protected Border createNonRolloverBorder() {
             nonRolloverBorder = super.createNonRolloverBorder();
             return nonRolloverBorder;
         }
 
+        @Override
         protected void dragTo(final Point position, final Point origin) {
             dragToCalled = true;
             super.dragTo(position, origin);
@@ -80,25 +85,28 @@
     }
 
     private JFrame frame;
+
     private JToolBar toolBar;
+
     private MetalToolBarUI ui;
+
     private JButton b;
+
     private JLabel label;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         b = new JButton();
         label = new JLabel();
-
         toolBar = new JToolBar();
         ui = new MetalToolBarUI();
         toolBar.setUI(ui);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
-
         if (frame != null) {
             frame.dispose();
             frame = null;
@@ -124,14 +132,12 @@
     public void testCreateUI() {
         ComponentUI ui1 = MetalToolBarUI.createUI(toolBar);
         assertTrue(ui1 instanceof MetalToolBarUI);
-
         ComponentUI ui2 = MetalToolBarUI.createUI(toolBar);
         assertNotSame(ui1, ui2);
     }
 
     public void testCreateDockingListener() {
-        assertTrue(ui.createDockingListener()
-                   instanceof MetalToolBarUI.MetalDockingListener);
+        assertTrue(ui.createDockingListener() instanceof MetalToolBarUI.MetalDockingListener);
     }
 
     public void testCreateRolloverBorder() {
@@ -151,24 +157,20 @@
     public void testInstallListeners() {
         TestMetalToolBarUI ui = new TestMetalToolBarUI();
         toolBar.setUI(ui);
-
-        assertTrue(Arrays.asList(toolBar.getContainerListeners())
-                   .contains(ui.contListener));
-        assertTrue(Arrays.asList(toolBar.getPropertyChangeListeners())
-                   .contains(ui.rolloverListener));
+        assertTrue(Arrays.asList(toolBar.getContainerListeners()).contains(ui.contListener));
+        assertTrue(Arrays.asList(toolBar.getPropertyChangeListeners()).contains(
+                ui.rolloverListener));
         assertFalse(Arrays.asList(toolBar.getPropertyChangeListeners("JToolBar.isRollover"))
-                   .contains(ui.rolloverListener));
+                .contains(ui.rolloverListener));
     }
 
     public void testUninstallListeners() {
         TestMetalToolBarUI ui = new TestMetalToolBarUI();
         toolBar.setUI(ui);
-
         ui.uninstallListeners();
-        assertFalse(Arrays.asList(toolBar.getContainerListeners())
-                   .contains(ui.contListener));
-        assertFalse(Arrays.asList(toolBar.getPropertyChangeListeners())
-                   .contains(ui.rolloverListener));
+        assertFalse(Arrays.asList(toolBar.getContainerListeners()).contains(ui.contListener));
+        assertFalse(Arrays.asList(toolBar.getPropertyChangeListeners()).contains(
+                ui.rolloverListener));
     }
 
     public void testSetBorderToNonRollover() {
@@ -177,15 +179,12 @@
         ui.setBorderToNonRollover(b);
         assertSame(ui.nonRolloverBorder, b.getBorder());
         assertFalse(b.isRolloverEnabled());
-
         Border border = new EmptyBorder(new Insets(0, 0, 0, 0));
         b.setBorder(border);
         ui.setBorderToNonRollover(b);
         assertSame(border, b.getBorder());
-
         ui.setBorderToNonRollover(label);
         assertNull(label.getBorder());
-
         ui.setBorderToNonRollover(null);
     }
 
@@ -215,25 +214,19 @@
         toolBar.add(b);
         createAndShowFrame();
         TestMetalToolBarUI.TestMetalDockingListener l = ui.new TestMetalDockingListener(toolBar);
-
-        MouseEvent e = new MouseEvent(toolBar, MouseEvent.MOUSE_PRESSED,
-                                      0, 0, toolBar.getWidth(),
-                                      toolBar.getHeight(), 0, false);
+        MouseEvent e = new MouseEvent(toolBar, MouseEvent.MOUSE_PRESSED, 0, 0, toolBar
+                .getWidth(), toolBar.getHeight(), 0, false);
         l.mousePressed(e);
-        e = new MouseEvent(toolBar, MouseEvent.MOUSE_DRAGGED,
-                           0, 0, toolBar.getWidth(),
-                           toolBar.getHeight(), 0, false);
+        e = new MouseEvent(toolBar, MouseEvent.MOUSE_DRAGGED, 0, 0, toolBar.getWidth(), toolBar
+                .getHeight(), 0, false);
         l.mouseDragged(e);
         // false because drag should occur only on bumps
         assertFalse(l.isDragging());
         assertFalse(ui.dragToCalled);
-
         Point p = new Point(4, 8);
-        e = new MouseEvent(toolBar, MouseEvent.MOUSE_PRESSED,
-                           0, 0, p.x, p.y, 0, false);
+        e = new MouseEvent(toolBar, MouseEvent.MOUSE_PRESSED, 0, 0, p.x, p.y, 0, false);
         l.mousePressed(e);
-        e = new MouseEvent(toolBar, MouseEvent.MOUSE_DRAGGED,
-                           0, 0, p.x, p.y, 0, false);
+        e = new MouseEvent(toolBar, MouseEvent.MOUSE_DRAGGED, 0, 0, p.x, p.y, 0, false);
         l.mouseDragged(e);
         assertTrue(l.isDragging());
         assertTrue(ui.dragToCalled);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTreeUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTreeUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTreeUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/metal/MetalTreeUITest.java Sun Nov 26 12:15:43 2006
@@ -15,14 +15,13 @@
  *  limitations under the License.
  */
 /**
-* @author Sergey Burlak
-* @version $Revision$
-*/
+ * @author Sergey Burlak
+ * @version $Revision$
+ */
 package javax.swing.plaf.metal;
 
 import java.awt.Component;
 import java.awt.Graphics;
-
 import javax.swing.Icon;
 import javax.swing.JTree;
 import javax.swing.SwingTestCase;
@@ -32,16 +31,24 @@
 
 public class MetalTreeUITest extends SwingTestCase {
     private MetalTreeUI ui;
+
     private JTree tree;
 
     private DefaultMutableTreeNode root;
+
     private DefaultMutableTreeNode node1;
+
     private DefaultMutableTreeNode node2;
+
     private DefaultMutableTreeNode node3;
+
     private DefaultMutableTreeNode node11;
+
     private DefaultMutableTreeNode node21;
+
     private DefaultMutableTreeNode node22;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         try {
@@ -49,7 +56,6 @@
         } catch (UnsupportedLookAndFeelException e) {
             e.printStackTrace();
         }
-
         root = new DefaultMutableTreeNode("root");
         node1 = new DefaultMutableTreeNode("node1");
         node2 = new DefaultMutableTreeNode("node2");
@@ -57,28 +63,23 @@
         node11 = new DefaultMutableTreeNode("node11");
         node21 = new DefaultMutableTreeNode("node21");
         node22 = new DefaultMutableTreeNode("node22");
-
         root.add(node1);
-
         node1.add(node11);
         node11.add(new DefaultMutableTreeNode("node111"));
         root.add(node1);
-
         node2.add(node21);
         node2.add(node22);
         root.add(node2);
-
         root.add(node3);
-
         tree = new JTree(root);
         ui = new MetalTreeUI();
         tree.setUI(ui);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         ui = null;
         tree = null;
-
         root = null;
         node1 = null;
         node2 = null;
@@ -97,7 +98,6 @@
 
     public void testUninstallUI() {
         ui.uninstallUI(tree);
-
         assertNotNull(ui.getExpandedIcon());
         assertNotNull(ui.getCollapsedIcon());
     }
@@ -105,7 +105,6 @@
     public void testInstallUI() {
         ui.uninstallUI(tree);
         ui.installUI(tree);
-
         assertNotNull(ui.getExpandedIcon());
         assertNotNull(ui.getCollapsedIcon());
     }
@@ -125,58 +124,47 @@
         assertTrue(ui.isLocationInExpandControl(0, 0, -25, 25));
         assertTrue(ui.isLocationInExpandControl(0, 0, -1, 25));
         assertFalse(ui.isLocationInExpandControl(0, 0, 0, 25));
-
         assertFalse(ui.isLocationInExpandControl(1, 0, -26, 25));
         assertTrue(ui.isLocationInExpandControl(1, 0, -25, 25));
         assertTrue(ui.isLocationInExpandControl(1, 0, -1, 25));
         assertFalse(ui.isLocationInExpandControl(1, 0, 0, 25));
-
         assertFalse(ui.isLocationInExpandControl(2, 0, -26, 25));
         assertTrue(ui.isLocationInExpandControl(2, 0, -25, 25));
         assertTrue(ui.isLocationInExpandControl(2, 0, -1, 25));
         assertFalse(ui.isLocationInExpandControl(2, 0, 0, 25));
-
         assertFalse(ui.isLocationInExpandControl(3, 0, -26, 25));
         assertTrue(ui.isLocationInExpandControl(3, 0, -25, 25));
         assertTrue(ui.isLocationInExpandControl(3, 0, -1, 25));
         assertFalse(ui.isLocationInExpandControl(3, 0, 0, 25));
-
         assertFalse(ui.isLocationInExpandControl(0, 1, -6, 25));
         assertTrue(ui.isLocationInExpandControl(0, 1, -5, 25));
         assertTrue(ui.isLocationInExpandControl(0, 1, 19, 25));
         assertFalse(ui.isLocationInExpandControl(0, 1, 20, 25));
-
         assertFalse(ui.isLocationInExpandControl(1, 1, -6, 20));
         assertTrue(ui.isLocationInExpandControl(1, 1, -5, 20));
         assertTrue(ui.isLocationInExpandControl(1, 1, 19, 20));
         assertFalse(ui.isLocationInExpandControl(1, 1, 20, 20));
-
         assertFalse(ui.isLocationInExpandControl(2, 1, -6, 20));
         assertTrue(ui.isLocationInExpandControl(2, 1, -5, 20));
         assertTrue(ui.isLocationInExpandControl(2, 1, 19, 20));
         assertFalse(ui.isLocationInExpandControl(2, 1, 20, 20));
-
         assertFalse(ui.isLocationInExpandControl(0, 2, 14, -20));
         assertTrue(ui.isLocationInExpandControl(0, 2, 15, -20));
         assertTrue(ui.isLocationInExpandControl(0, 2, 39, -20));
         assertFalse(ui.isLocationInExpandControl(0, 2, 40, -20));
-
         assertFalse(ui.isLocationInExpandControl(1, 2, 14, -20));
         assertTrue(ui.isLocationInExpandControl(1, 2, 15, -20));
         assertTrue(ui.isLocationInExpandControl(1, 2, 39, -20));
         assertFalse(ui.isLocationInExpandControl(1, 2, 40, -20));
-
         assertFalse(ui.isLocationInExpandControl(2, 2, 14, -20));
         assertTrue(ui.isLocationInExpandControl(2, 2, 15, -20));
         assertTrue(ui.isLocationInExpandControl(2, 2, 39, -20));
         assertFalse(ui.isLocationInExpandControl(2, 2, 40, -20));
-
         tree.setShowsRootHandles(true);
         assertFalse(ui.isLocationInExpandControl(0, 0, -6, 25));
         assertTrue(ui.isLocationInExpandControl(0, 0, -5, 25));
         assertTrue(ui.isLocationInExpandControl(0, 0, 19, 25));
         assertFalse(ui.isLocationInExpandControl(0, 0, 20, 25));
-
         tree.setShowsRootHandles(false);
         ui.setExpandedIcon(new Icon() {
             public void paintIcon(Component c, Graphics g, int x, int y) {
@@ -190,7 +178,6 @@
                 return 100;
             }
         });
-
         assertFalse(ui.isLocationInExpandControl(0, 0, -17, 25));
         assertTrue(ui.isLocationInExpandControl(0, 0, -16, 25));
         assertTrue(ui.isLocationInExpandControl(0, 0, -10, 25));

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/AbstractTableModelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/AbstractTableModelTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/AbstractTableModelTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/AbstractTableModelTest.java Sun Nov 26 12:15:43 2006
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Anton Avtamonov
  * @version $Revision$
@@ -31,8 +30,11 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         model = new AbstractTableModel() {
+            private static final long serialVersionUID = 1L;
+
             public int getRowCount() {
                 return 5;
             }
@@ -95,17 +97,14 @@
     public void testAddRemoveGetTableModelListener() throws Exception {
         assertEquals(0, model.getTableModelListeners().length);
         assertEquals(0, model.getListeners(TableModelListener.class).length);
-
         TableModelListener listener1 = new TestTableModelListener();
         TableModelListener listener2 = new TestTableModelListener();
         model.addTableModelListener(listener1);
         assertEquals(1, model.getTableModelListeners().length);
         assertEquals(1, model.getListeners(TableModelListener.class).length);
-
         model.addTableModelListener(listener2);
         assertEquals(2, model.getTableModelListeners().length);
         assertEquals(2, model.getListeners(TableModelListener.class).length);
-
         model.removeTableModelListener(listener1);
         assertEquals(1, model.getTableModelListeners().length);
         assertEquals(1, model.getListeners(TableModelListener.class).length);
@@ -114,7 +113,6 @@
     public void testFireTableDataChanged() throws Exception {
         TestTableModelListener listener = new TestTableModelListener();
         model.addTableModelListener(listener);
-
         model.fireTableDataChanged();
         assertTrue(listener.eventOccured());
         assertEquals(model, listener.getEvent().getSource());
@@ -127,7 +125,6 @@
     public void testFireTableStructureChanged() throws Exception {
         TestTableModelListener listener = new TestTableModelListener();
         model.addTableModelListener(listener);
-
         model.fireTableStructureChanged();
         assertTrue(listener.eventOccured());
         assertEquals(model, listener.getEvent().getSource());
@@ -140,7 +137,6 @@
     public void testFireTableRowsInserted() throws Exception {
         TestTableModelListener listener = new TestTableModelListener();
         model.addTableModelListener(listener);
-
         model.fireTableRowsInserted(5, 40000);
         assertTrue(listener.eventOccured());
         assertEquals(model, listener.getEvent().getSource());
@@ -153,7 +149,6 @@
     public void testFireTableRowsUpdated() throws Exception {
         TestTableModelListener listener = new TestTableModelListener();
         model.addTableModelListener(listener);
-
         model.fireTableRowsUpdated(5, 40000);
         assertTrue(listener.eventOccured());
         assertEquals(model, listener.getEvent().getSource());
@@ -166,7 +161,6 @@
     public void testFireTableRowsDeleted() throws Exception {
         TestTableModelListener listener = new TestTableModelListener();
         model.addTableModelListener(listener);
-
         model.fireTableRowsDeleted(5, 40000);
         assertTrue(listener.eventOccured());
         assertEquals(model, listener.getEvent().getSource());
@@ -179,7 +173,6 @@
     public void testFireTableCellUpdated() throws Exception {
         TestTableModelListener listener = new TestTableModelListener();
         model.addTableModelListener(listener);
-
         model.fireTableCellUpdated(5, 50);
         assertTrue(listener.eventOccured());
         assertEquals(model, listener.getEvent().getSource());
@@ -192,7 +185,6 @@
     public void testFireTableChanged() throws Exception {
         TestTableModelListener listener = new TestTableModelListener();
         model.addTableModelListener(listener);
-
         TableModelEvent event = new TableModelEvent(model, -5, 4, 3, TableModelEvent.INSERT);
         model.fireTableChanged(event);
         assertTrue(listener.eventOccured());

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/BasicSwingTableTestCase.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/BasicSwingTableTestCase.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/BasicSwingTableTestCase.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/BasicSwingTableTestCase.java Sun Nov 26 12:15:43 2006
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Anton Avtamonov
  * @version $Revision$
@@ -51,6 +50,8 @@
     }
 
     protected abstract class ArrayIndexOutOfBoundsExceptionalCase extends ExceptionalCase {
+        @SuppressWarnings("unchecked")
+        @Override
         public Class expectedExceptionClass() {
             return ArrayIndexOutOfBoundsException.class;
         }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/DefaultTableCellRendererTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/DefaultTableCellRendererTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/DefaultTableCellRendererTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/DefaultTableCellRendererTest.java Sun Nov 26 12:15:43 2006
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Anton Avtamonov
  * @version $Revision$
@@ -23,7 +22,6 @@
 
 import java.awt.Color;
 import java.awt.Insets;
-
 import javax.swing.BasicSwingTestCase;
 import javax.swing.JTable;
 import javax.swing.UIManager;
@@ -38,36 +36,35 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         renderer = new DefaultTableCellRenderer();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         renderer = null;
     }
 
     public void testDefaultTableCellRenderer() throws Exception {
         assertTrue(DefaultTableCellRenderer.noFocusBorder instanceof EmptyBorder);
-        assertEquals(new Insets(1, 1, 1, 1), DefaultTableCellRenderer.noFocusBorder.getBorderInsets(null));
+        assertEquals(new Insets(1, 1, 1, 1), DefaultTableCellRenderer.noFocusBorder
+                .getBorderInsets(null));
     }
 
     public void testSetForegroundBackground() throws Exception {
         PropertyChangeController controller = new PropertyChangeController();
         renderer.addPropertyChangeListener(controller);
-
         renderer.setForeground(Color.RED);
         assertEquals(Color.RED, renderer.getForeground());
         assertFalse(controller.isChanged());
-
         renderer.setBackground(Color.GREEN);
         assertEquals(Color.GREEN, renderer.getBackground());
         assertFalse(controller.isChanged());
-
         renderer.setBackground(null);
         renderer.setForeground(null);
         assertNull(renderer.getForeground());
         assertNull(renderer.getBackground());
-
         JTable table = new JTable();
         table.setBackground(Color.BLUE);
         table.setForeground(Color.RED);
@@ -75,11 +72,10 @@
         table.setSelectionForeground(Color.CYAN);
         assertNull(renderer.getForeground());
         assertNull(renderer.getBackground());
-
-        assertSame(renderer, renderer.getTableCellRendererComponent(table, null, false, false, 0, 0));
+        assertSame(renderer, renderer.getTableCellRendererComponent(table, null, false, false,
+                0, 0));
         assertEquals(table.getBackground(), renderer.getBackground());
         assertEquals(table.getForeground(), renderer.getForeground());
-
         renderer.setForeground(Color.GRAY);
         renderer.setBackground(Color.YELLOW);
         renderer.getTableCellRendererComponent(table, null, false, false, 0, 0);
@@ -90,7 +86,6 @@
             assertEquals(Color.YELLOW, renderer.getBackground());
             assertEquals(Color.GRAY, renderer.getForeground());
         }
-
         renderer.getTableCellRendererComponent(table, null, true, false, 0, 0);
         assertEquals(table.getSelectionBackground(), renderer.getBackground());
         assertEquals(table.getSelectionForeground(), renderer.getForeground());
@@ -109,50 +104,53 @@
         table.setForeground(Color.RED);
         table.setSelectionBackground(Color.MAGENTA);
         table.setSelectionForeground(Color.CYAN);
-
-        assertSame(renderer, renderer.getTableCellRendererComponent(table, null, false, false, 0, 0));
+        assertSame(renderer, renderer.getTableCellRendererComponent(table, null, false, false,
+                0, 0));
         assertEquals("", renderer.getText());
         assertSame(DefaultTableCellRenderer.noFocusBorder, renderer.getBorder());
         assertEquals(table.getBackground(), renderer.getBackground());
         assertEquals(table.getForeground(), renderer.getForeground());
         assertEquals(table.getFont(), renderer.getFont());
-
-        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", false, true, -1, -1));
+        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", false,
+                true, -1, -1));
         assertEquals("any value", renderer.getText());
         assertSame(UIManager.getBorder("Table.focusCellHighlightBorder"), renderer.getBorder());
         assertEquals(UIManager.getColor("Table.focusCellBackground"), renderer.getBackground());
         assertEquals(UIManager.getColor("Table.focusCellForeground"), renderer.getForeground());
         assertEquals(table.getFont(), renderer.getFont());
-
-        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", true, false, 0, 0));
+        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", true,
+                false, 0, 0));
         assertEquals("any value", renderer.getText());
         assertSame(DefaultTableCellRenderer.noFocusBorder, renderer.getBorder());
         assertEquals(table.getSelectionBackground(), renderer.getBackground());
         assertEquals(table.getSelectionForeground(), renderer.getForeground());
         assertEquals(table.getFont(), renderer.getFont());
-
-        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", true, true, -1, -1));
+        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", true,
+                true, -1, -1));
         assertEquals("any value", renderer.getText());
         assertSame(UIManager.getBorder("Table.focusCellHighlightBorder"), renderer.getBorder());
         assertEquals(table.getSelectionBackground(), renderer.getBackground());
         assertEquals(table.getSelectionForeground(), renderer.getForeground());
         assertEquals(table.getFont(), renderer.getFont());
-
         table.addColumn(new TableColumn());
-        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", true, true, 0, 0));
+        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", true,
+                true, 0, 0));
         assertEquals("any value", renderer.getText());
         assertSame(UIManager.getBorder("Table.focusCellHighlightBorder"), renderer.getBorder());
         assertEquals(table.getSelectionBackground(), renderer.getBackground());
         assertEquals(table.getSelectionForeground(), renderer.getForeground());
         assertEquals(table.getFont(), renderer.getFont());
-
         table.setModel(new DefaultTableModel() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
             public boolean isCellEditable(final int row, final int column) {
                 return false;
             }
         });
         table.addColumn(new TableColumn());
-        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", true, true, 0, 0));
+        assertSame(renderer, renderer.getTableCellRendererComponent(table, "any value", true,
+                true, 0, 0));
         assertEquals("any value", renderer.getText());
         assertSame(UIManager.getBorder("Table.focusCellHighlightBorder"), renderer.getBorder());
         assertEquals(table.getSelectionBackground(), renderer.getBackground());
@@ -167,23 +165,18 @@
     public void testFirePropertyChange() throws Exception {
         PropertyChangeController controller = new PropertyChangeController();
         renderer.addPropertyChangeListener(controller);
-
         renderer.firePropertyChange("any", "a", "b");
         assertFalse(controller.isChanged());
-
         renderer.firePropertyChange("any", true, false);
         assertFalse(controller.isChanged());
     }
 
     public void testSetText() throws Exception {
         assertEquals("", renderer.getText());
-
         renderer.setValue(null);
         assertEquals("", renderer.getText());
-
         renderer.setValue("any");
         assertEquals("any", renderer.getText());
-
         renderer.setValue(new Integer("4"));
         assertEquals("4", renderer.getText());
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/DefaultTableColumnModelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/DefaultTableColumnModelTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/DefaultTableColumnModelTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/table/DefaultTableColumnModelTest.java Sun Nov 26 12:15:43 2006
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Anton Avtamonov
  * @version $Revision$
@@ -24,7 +23,6 @@
 import java.beans.PropertyChangeEvent;
 import java.util.Enumeration;
 import java.util.EventObject;
-
 import javax.swing.BasicSwingTestCase;
 import javax.swing.DefaultListSelectionModel;
 import javax.swing.event.ChangeEvent;
@@ -40,21 +38,24 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         model = new DefaultTableColumnModel();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         model = null;
     }
 
-
     public void testDefaultTableColumnModel() throws Exception {
         assertNotNull(model.tableColumns);
         assertEquals(0, model.tableColumns.size());
         assertTrue(model.selectionModel instanceof DefaultListSelectionModel);
-        assertEquals(1, ((DefaultListSelectionModel)model.selectionModel).getListSelectionListeners().length);
-        assertEquals(model, ((DefaultListSelectionModel)model.selectionModel).getListSelectionListeners()[0]);
+        assertEquals(1, ((DefaultListSelectionModel) model.selectionModel)
+                .getListSelectionListeners().length);
+        assertEquals(model, ((DefaultListSelectionModel) model.selectionModel)
+                .getListSelectionListeners()[0]);
         assertEquals(1, model.columnMargin);
         assertNotNull(model.listenerList);
         assertNull(model.changeEvent);
@@ -65,19 +66,17 @@
     public void testAddRemoveMoveColumn() throws Exception {
         TestTableColumnModelListener listener = new TestTableColumnModelListener();
         model.addColumnModelListener(listener);
-
         TableColumn column1 = new TableColumn();
         model.addColumn(column1);
         assertEquals(1, model.getColumnCount());
         assertEquals(0, column1.getModelIndex());
         assertTrue(listener.eventOccured());
         assertEquals(TestTableColumnModelListener.COLUMN_ADDED, listener.getEventType());
-        assertEquals(model, ((TableColumnModelEvent)listener.getEvent()).getSource());
-        assertEquals(0, ((TableColumnModelEvent)listener.getEvent()).getFromIndex());
-        assertEquals(0, ((TableColumnModelEvent)listener.getEvent()).getToIndex());
+        assertEquals(model, ((TableColumnModelEvent) listener.getEvent()).getSource());
+        assertEquals(0, ((TableColumnModelEvent) listener.getEvent()).getFromIndex());
+        assertEquals(0, ((TableColumnModelEvent) listener.getEvent()).getToIndex());
         assertEquals(1, column1.getPropertyChangeListeners().length);
         assertEquals(model, column1.getPropertyChangeListeners()[0]);
-
         listener.reset();
         TableColumn column2 = new TableColumn();
         model.addColumn(column2);
@@ -85,72 +84,68 @@
         assertEquals(0, column2.getModelIndex());
         assertTrue(listener.eventOccured());
         assertEquals(TestTableColumnModelListener.COLUMN_ADDED, listener.getEventType());
-        assertEquals(model, ((TableColumnModelEvent)listener.getEvent()).getSource());
-        assertEquals(0, ((TableColumnModelEvent)listener.getEvent()).getFromIndex());
-        assertEquals(1, ((TableColumnModelEvent)listener.getEvent()).getToIndex());
-
+        assertEquals(model, ((TableColumnModelEvent) listener.getEvent()).getSource());
+        assertEquals(0, ((TableColumnModelEvent) listener.getEvent()).getFromIndex());
+        assertEquals(1, ((TableColumnModelEvent) listener.getEvent()).getToIndex());
         listener.reset();
         model.removeColumn(column1);
         assertEquals(1, model.getColumnCount());
         assertEquals(column2, model.getColumn(0));
         assertTrue(listener.eventOccured());
         assertEquals(TestTableColumnModelListener.COLUMN_REMOVED, listener.getEventType());
-        assertEquals(model, ((TableColumnModelEvent)listener.getEvent()).getSource());
-        assertEquals(0, ((TableColumnModelEvent)listener.getEvent()).getFromIndex());
-        assertEquals(0, ((TableColumnModelEvent)listener.getEvent()).getToIndex());
+        assertEquals(model, ((TableColumnModelEvent) listener.getEvent()).getSource());
+        assertEquals(0, ((TableColumnModelEvent) listener.getEvent()).getFromIndex());
+        assertEquals(0, ((TableColumnModelEvent) listener.getEvent()).getToIndex());
         assertEquals(0, column1.getPropertyChangeListeners().length);
-
         listener.reset();
         model.addColumn(column1);
         assertEquals(column2, model.getColumn(0));
         assertEquals(column1, model.getColumn(1));
         assertTrue(listener.eventOccured());
         assertEquals(TestTableColumnModelListener.COLUMN_ADDED, listener.getEventType());
-        assertEquals(model, ((TableColumnModelEvent)listener.getEvent()).getSource());
-        assertEquals(0, ((TableColumnModelEvent)listener.getEvent()).getFromIndex());
-        assertEquals(1, ((TableColumnModelEvent)listener.getEvent()).getToIndex());
-
+        assertEquals(model, ((TableColumnModelEvent) listener.getEvent()).getSource());
+        assertEquals(0, ((TableColumnModelEvent) listener.getEvent()).getFromIndex());
+        assertEquals(1, ((TableColumnModelEvent) listener.getEvent()).getToIndex());
         listener.reset();
         model.moveColumn(0, 1);
         assertEquals(column1, model.getColumn(0));
         assertEquals(column2, model.getColumn(1));
         assertTrue(listener.eventOccured());
         assertEquals(TestTableColumnModelListener.COLUMN_MOVED, listener.getEventType());
-        assertEquals(model, ((TableColumnModelEvent)listener.getEvent()).getSource());
-        assertEquals(0, ((TableColumnModelEvent)listener.getEvent()).getFromIndex());
-        assertEquals(1, ((TableColumnModelEvent)listener.getEvent()).getToIndex());
-
+        assertEquals(model, ((TableColumnModelEvent) listener.getEvent()).getSource());
+        assertEquals(0, ((TableColumnModelEvent) listener.getEvent()).getFromIndex());
+        assertEquals(1, ((TableColumnModelEvent) listener.getEvent()).getToIndex());
         listener.reset();
         model.moveColumn(1, 0);
         assertEquals(column2, model.getColumn(0));
         assertEquals(column1, model.getColumn(1));
         assertTrue(listener.eventOccured());
         assertEquals(TestTableColumnModelListener.COLUMN_MOVED, listener.getEventType());
-        assertEquals(model, ((TableColumnModelEvent)listener.getEvent()).getSource());
-        assertEquals(1, ((TableColumnModelEvent)listener.getEvent()).getFromIndex());
-        assertEquals(0, ((TableColumnModelEvent)listener.getEvent()).getToIndex());
-
+        assertEquals(model, ((TableColumnModelEvent) listener.getEvent()).getSource());
+        assertEquals(1, ((TableColumnModelEvent) listener.getEvent()).getFromIndex());
+        assertEquals(0, ((TableColumnModelEvent) listener.getEvent()).getToIndex());
         listener.reset();
         model.moveColumn(0, 0);
         assertEquals(column2, model.getColumn(0));
         assertEquals(column1, model.getColumn(1));
         assertTrue(listener.eventOccured());
-
         model.removeColumn(null);
         assertEquals(2, model.getColumnCount());
         assertTrue(listener.eventOccured());
-
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 model.addColumn(null);
             }
         });
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 model.moveColumn(5, 1);
             }
         });
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 model.moveColumn(1, -1);
             }
@@ -160,17 +155,14 @@
     public void testGetSetColumnMargin() throws Exception {
         TestTableColumnModelListener listener = new TestTableColumnModelListener();
         model.addColumnModelListener(listener);
-
         assertNull(model.changeEvent);
         assertEquals(1, model.getColumnMargin());
-
         model.setColumnMargin(10);
         assertEquals(10, model.getColumnMargin());
         assertTrue(listener.eventOccured());
         assertEquals(TestTableColumnModelListener.MARGIN_CHANGED, listener.getEventType());
-        assertEquals(model, ((ChangeEvent)listener.getEvent()).getSource());
+        assertEquals(model, ((ChangeEvent) listener.getEvent()).getSource());
         assertNotNull(model.changeEvent);
-
         model.setColumnMargin(-1);
         assertEquals(-1, model.getColumnMargin());
     }
@@ -184,10 +176,9 @@
     }
 
     public void testGetColumns() throws Exception {
-        Enumeration columns = model.getColumns();
+        Enumeration<?> columns = model.getColumns();
         assertNotNull(columns);
         assertFalse(columns.hasMoreElements());
-
         TableColumn column = new TableColumn();
         model.addColumn(column);
         columns = model.getColumns();
@@ -199,16 +190,17 @@
 
     public void testGetColumnIndex() throws Exception {
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 model.getColumnIndex(null);
             }
         });
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 model.getColumnIndex("tag1");
             }
         });
-
         TableColumn column1 = new TableColumn();
         TableColumn column2 = new TableColumn();
         TableColumn column3 = new TableColumn();
@@ -216,15 +208,14 @@
         column2.setIdentifier("tag1");
         column3.setIdentifier("tag2");
         column4.setIdentifier("tag1");
-
         model.addColumn(column1);
         model.addColumn(column2);
         model.addColumn(column3);
         model.addColumn(column4);
-
         assertEquals(1, model.getColumnIndex("tag1"));
         assertEquals(2, model.getColumnIndex("tag2"));
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 model.getColumnIndex("tag3");
             }
@@ -233,21 +224,19 @@
 
     public void testGetColumn() throws Exception {
         testExceptionalCase(new ExceptionalCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 model.getColumn(0);
             }
         });
-
         TableColumn column1 = new TableColumn();
         TableColumn column2 = new TableColumn();
         TableColumn column3 = new TableColumn();
         TableColumn column4 = new TableColumn();
-
         model.addColumn(column1);
         model.addColumn(column2);
         model.addColumn(column3);
         model.addColumn(column4);
-
         assertEquals(column1, model.getColumn(0));
         assertEquals(column2, model.getColumn(1));
         assertEquals(column3, model.getColumn(2));
@@ -256,12 +245,10 @@
 
     public void testGetColumnIndexAtX() throws Exception {
         assertEquals(-1, model.getColumnIndexAtX(0));
-
         model.addColumn(new TableColumn(0, 10));
         model.addColumn(new TableColumn(0, 20));
         model.addColumn(new TableColumn(0, 30));
         model.addColumn(new TableColumn(0, 40));
-
         assertEquals(0, model.getColumnIndexAtX(0));
         assertEquals(0, model.getColumnIndexAtX(9));
         assertEquals(1, model.getColumnIndexAtX(10));
@@ -276,21 +263,18 @@
 
     public void testGetTotalColumnWidth() throws Exception {
         assertEquals(0, model.getTotalColumnWidth());
-
         model.addColumn(new TableColumn(0, 10));
         model.addColumn(new TableColumn(0, 20));
         model.addColumn(new TableColumn(0, 30));
         model.addColumn(new TableColumn(0, 40));
-
         assertEquals(100, model.getTotalColumnWidth());
     }
 
     public void testGetSetSelectionModel() throws Exception {
         assertTrue(model.getSelectionModel() instanceof DefaultListSelectionModel);
-        DefaultListSelectionModel oldModel = (DefaultListSelectionModel)model.selectionModel;
+        DefaultListSelectionModel oldModel = (DefaultListSelectionModel) model.selectionModel;
         assertEquals(1, oldModel.getListSelectionListeners().length);
         assertEquals(model, oldModel.getListSelectionListeners()[0]);
-
         DefaultListSelectionModel newModel = new DefaultListSelectionModel();
         model.setSelectionModel(newModel);
         assertEquals(newModel, model.getSelectionModel());
@@ -304,18 +288,15 @@
         TestListSelectionListener selectionListener = new TestListSelectionListener();
         model.addColumnModelListener(listener);
         model.getSelectionModel().addListSelectionListener(selectionListener);
-
         assertFalse(model.getColumnSelectionAllowed());
         model.setColumnSelectionAllowed(true);
         assertTrue(model.getColumnSelectionAllowed());
-
         assertFalse(listener.eventOccured());
         assertFalse(selectionListener.eventOccured());
     }
 
     public void testGetSelectedColumns() throws Exception {
         assertEquals(0, model.getSelectedColumns().length);
-
         model.addColumn(new TableColumn());
         model.addColumn(new TableColumn());
         model.addColumn(new TableColumn());
@@ -333,14 +314,12 @@
 
     public void testGetSelectedColumnCount() throws Exception {
         assertEquals(0, model.getSelectedColumnCount());
-
         model.addColumn(new TableColumn());
         model.addColumn(new TableColumn());
         model.addColumn(new TableColumn());
         model.addColumn(new TableColumn());
         model.addColumn(new TableColumn());
         assertEquals(0, model.getSelectedColumnCount());
-
         model.getSelectionModel().setSelectionInterval(1, 1);
         model.getSelectionModel().addSelectionInterval(3, 4);
         assertEquals(3, model.getSelectedColumnCount());
@@ -348,12 +327,10 @@
 
     public void testAddRemoveGetTableColumnModelListener() throws Exception {
         assertEquals(0, model.getColumnModelListeners().length);
-
         TableColumnModelListener listener = new TestTableColumnModelListener();
         model.addColumnModelListener(listener);
         model.addColumnModelListener(new TestTableColumnModelListener());
         assertEquals(2, model.getColumnModelListeners().length);
-
         model.removeColumnModelListener(listener);
         assertEquals(1, model.getColumnModelListeners().length);
     }
@@ -369,59 +346,52 @@
         model.addColumn(column);
         assertEquals(-1, model.totalColumnWidth);
         assertEquals(75, model.getTotalColumnWidth());
-
         column.setWidth(25);
         assertEquals(-1, model.totalColumnWidth);
         assertEquals(25, model.getTotalColumnWidth());
-
         model.totalColumnWidth = 10;
-        model.propertyChange(new PropertyChangeEvent("source", TableColumn.WIDTH_PROPERTY, "a", "b"));
+        model.propertyChange(new PropertyChangeEvent("source", TableColumn.WIDTH_PROPERTY, "a",
+                "b"));
         assertEquals(-1, model.totalColumnWidth);
-
         model.totalColumnWidth = 10;
-        model.propertyChange(new PropertyChangeEvent("source", TableColumn.PREFERRED_WIDTH_PROPERTY, "a", "b"));
+        model.propertyChange(new PropertyChangeEvent("source",
+                TableColumn.PREFERRED_WIDTH_PROPERTY, "a", "b"));
         assertEquals(-1, model.totalColumnWidth);
     }
 
     public void testValueChanged() throws Exception {
         TestTableColumnModelListener listener = new TestTableColumnModelListener();
         model.addColumnModelListener(listener);
-
         model.getSelectionModel().setSelectionInterval(1, 2);
         assertTrue(listener.eventOccured());
         assertEquals(TestTableColumnModelListener.SELECTION_CHANGED, listener.getEventType());
         assertEquals(model.getSelectionModel(), listener.getEvent().getSource());
         if (isHarmony()) {
-            assertEquals(1, ((ListSelectionEvent)listener.getEvent()).getFirstIndex());
+            assertEquals(1, ((ListSelectionEvent) listener.getEvent()).getFirstIndex());
         } else {
-            assertEquals(0, ((ListSelectionEvent)listener.getEvent()).getFirstIndex());
+            assertEquals(0, ((ListSelectionEvent) listener.getEvent()).getFirstIndex());
         }
-        assertEquals(2, ((ListSelectionEvent)listener.getEvent()).getLastIndex());
-
-
+        assertEquals(2, ((ListSelectionEvent) listener.getEvent()).getLastIndex());
         listener.reset();
         ListSelectionEvent event = new ListSelectionEvent("source", 4, 7, true);
         model.valueChanged(event);
         assertTrue(listener.eventOccured());
         assertEquals(TestTableColumnModelListener.SELECTION_CHANGED, listener.getEventType());
         assertEquals("source", listener.getEvent().getSource());
-        assertEquals(4, ((ListSelectionEvent)listener.getEvent()).getFirstIndex());
-        assertEquals(7, ((ListSelectionEvent)listener.getEvent()).getLastIndex());
+        assertEquals(4, ((ListSelectionEvent) listener.getEvent()).getFirstIndex());
+        assertEquals(7, ((ListSelectionEvent) listener.getEvent()).getLastIndex());
     }
 
     public void testRecalcWidthCache() throws Exception {
         assertEquals(-1, model.totalColumnWidth);
         assertEquals(0, model.getTotalColumnWidth());
         assertEquals(0, model.totalColumnWidth);
-
         model.addColumn(new TableColumn());
         assertEquals(-1, model.totalColumnWidth);
         model.recalcWidthCache();
         assertEquals(75, model.totalColumnWidth);
-
         model.removeColumn(model.getColumn(0));
         assertEquals(-1, model.totalColumnWidth);
-
         model.addColumn(new TableColumn());
         model.addColumn(new TableColumn());
         model.totalColumnWidth = -1;
@@ -429,16 +399,19 @@
         assertEquals(-1, model.totalColumnWidth);
     }
 
-
-
     private class TestTableColumnModelListener implements TableColumnModelListener {
         public static final int COLUMN_ADDED = 0;
+
         public static final int COLUMN_REMOVED = 1;
+
         public static final int COLUMN_MOVED = 2;
+
         public static final int MARGIN_CHANGED = 3;
+
         public static final int SELECTION_CHANGED = 4;
 
         private EventObject event;
+
         private int eventType = -1;
 
         public void columnMarginChanged(final ChangeEvent e) {



Mime
View raw message