harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r479418 [10/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/basic/BasicTabbedPaneUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTabbedPaneUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTabbedPaneUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTabbedPaneUITest.java Sun Nov 26 12:15:43 2006
@@ -28,53 +28,52 @@
 import java.awt.Rectangle;
 import java.beans.PropertyChangeListener;
 import java.util.Arrays;
-
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
 import javax.swing.JComponent;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JTabbedPane;
+import javax.swing.SwingConstants;
 import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.UIResource;
-
 import javax.swing.SwingTestCase;
 
 public class BasicTabbedPaneUITest extends SwingTestCase {
-
     private JTabbedPane tabbed;
+
     private BasicTabbedPaneUI ui;
+
     private JFrame frame;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         tabbed = new JTabbedPane() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
             public FontMetrics getFontMetrics(Font f) {
                 return BasicTabbedPaneUITest.this.getFontMetrics(f);
             }
         };
         ui = new BasicTabbedPaneUI();
         tabbed.setUI(ui);
-
         tabbed.addTab("tab1", new JLabel());
         tabbed.setIconAt(0, new ImageIcon());
         tabbed.setDisabledIconAt(0, new ImageIcon());
-
         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;
@@ -91,7 +90,6 @@
     public void testCreateUI() {
         ComponentUI ui1 = BasicTabbedPaneUI.createUI(tabbed);
         assertTrue(ui1 instanceof BasicTabbedPaneUI);
-
         ComponentUI ui2 = BasicTabbedPaneUI.createUI(tabbed);
         assertNotSame(ui1, ui2);
     }
@@ -99,13 +97,11 @@
     public void testRotateInsets() {
         Insets insets = new Insets(1, 2, 3, 4);
         Insets rotated = new Insets(0, 0, 0, 0);
-        BasicTabbedPaneUI.rotateInsets(insets, rotated, JTabbedPane.LEFT);
+        BasicTabbedPaneUI.rotateInsets(insets, rotated, SwingConstants.LEFT);
         assertEquals(new Insets(2, 1, 4, 3), rotated);
-
-        BasicTabbedPaneUI.rotateInsets(insets, rotated, JTabbedPane.BOTTOM);
+        BasicTabbedPaneUI.rotateInsets(insets, rotated, SwingConstants.BOTTOM);
         assertEquals(new Insets(3, 2, 1, 4), rotated);
-
-        BasicTabbedPaneUI.rotateInsets(insets, rotated, JTabbedPane.RIGHT);
+        BasicTabbedPaneUI.rotateInsets(insets, rotated, SwingConstants.RIGHT);
         assertEquals(new Insets(2, 3, 4, 1), rotated);
     }
 
@@ -124,8 +120,7 @@
         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 testCalculateMaxTabWidth() {
@@ -133,21 +128,18 @@
         FontMetrics fm = tabbed.getFontMetrics(tabbed.getFont());
         int w1 = ui.calculateTabWidth(tabPlacement, 0, fm);
         int w2 = ui.calculateTabWidth(tabPlacement, 1, fm);
-        assertEquals(Math.max(w1, w2),
-                     ui.calculateMaxTabWidth(tabPlacement));
+        assertEquals(Math.max(w1, w2), ui.calculateMaxTabWidth(tabPlacement));
     }
 
     public void testCalculateTabAreaHeight() {
-        int tabPlacement = JTabbedPane.TOP;
-
+        int tabPlacement = SwingConstants.TOP;
         assertEquals(14, ui.calculateTabAreaHeight(tabPlacement, 1, 10));
         assertEquals(22, ui.calculateTabAreaHeight(tabPlacement, 2, 10));
         assertEquals(30, ui.calculateTabAreaHeight(tabPlacement, 3, 10));
     }
 
     public void testCalculateTabAreaWidth() {
-        int tabPlacement = JTabbedPane.LEFT;
-
+        int tabPlacement = SwingConstants.LEFT;
         assertEquals(14, ui.calculateTabAreaWidth(tabPlacement, 1, 10));
         assertEquals(22, ui.calculateTabAreaWidth(tabPlacement, 2, 10));
         assertEquals(30, ui.calculateTabAreaWidth(tabPlacement, 3, 10));
@@ -157,7 +149,6 @@
         if (!isHarmony()) {
             return;
         }
-
         tabbed.setSelectedIndex(0);
         assertEquals(27, ui.calculateTabHeight(tabbed.getTabPlacement(), 0, 20));
         tabbed.setSelectedIndex(1);
@@ -168,31 +159,26 @@
         final FontMetrics fm = tabbed.getFontMetrics(tabbed.getFont());
         final int tabIndex = 0;
         final int textWidth = fm.stringWidth(tabbed.getTitleAt(tabIndex));
-        assertEquals(textWidth + 24, ui.calculateTabWidth(tabbed.getTabPlacement(), tabIndex, fm));
+        assertEquals(textWidth + 24, ui.calculateTabWidth(tabbed.getTabPlacement(), tabIndex,
+                fm));
     }
 
     public void testCreateChangeListener() {
-        assertTrue(ui.createChangeListener()
-                   instanceof BasicTabbedPaneUI.TabSelectionHandler);
+        assertTrue(ui.createChangeListener() instanceof BasicTabbedPaneUI.TabSelectionHandler);
     }
 
     public void testCreateFocusListener() {
-        assertTrue(ui.createFocusListener()
-                   instanceof BasicTabbedPaneUI.FocusHandler);
+        assertTrue(ui.createFocusListener() instanceof BasicTabbedPaneUI.FocusHandler);
     }
 
     public void testCreateLayoutManager() {
-        assertTrue(ui.createLayoutManager()
-                   instanceof BasicTabbedPaneUI.TabbedPaneLayout);
-
+        assertTrue(ui.createLayoutManager() instanceof BasicTabbedPaneUI.TabbedPaneLayout);
         tabbed.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
-        assertFalse(ui.createLayoutManager().getClass()
-                    == BasicTabbedPaneUI.TabbedPaneLayout.class);
+        assertFalse(ui.createLayoutManager().getClass() == BasicTabbedPaneUI.TabbedPaneLayout.class);
     }
 
     public void testCreateMouseListener() {
-        assertTrue(ui.createMouseListener()
-                   instanceof BasicTabbedPaneUI.MouseHandler);
+        assertTrue(ui.createMouseListener() instanceof BasicTabbedPaneUI.MouseHandler);
     }
 
     public void testCreatePropertyChangeListener() {
@@ -201,7 +187,7 @@
     }
 
     public void testCreateScrollButton() {
-        JButton b = ui.createScrollButton(JTabbedPane.NORTH);
+        JButton b = ui.createScrollButton(SwingConstants.NORTH);
         assertTrue(b instanceof UIResource);
         assertFalse(b.isFocusable());
         assertTrue(b.getWidth() > 5);
@@ -215,23 +201,17 @@
     }
 
     public void testGetContentBorderInsets() {
-        assertEquals(ui.contentBorderInsets,
-                     ui.getContentBorderInsets(JTabbedPane.TOP));
-        assertSame(ui.contentBorderInsets,
-                   ui.getContentBorderInsets(JTabbedPane.TOP));
-        assertEquals(ui.contentBorderInsets,
-                     ui.getContentBorderInsets(JTabbedPane.LEFT));
-        assertEquals(ui.contentBorderInsets,
-                     ui.getContentBorderInsets(JTabbedPane.BOTTOM));
-        assertEquals(ui.contentBorderInsets,
-                     ui.getContentBorderInsets(JTabbedPane.RIGHT));
+        assertEquals(ui.contentBorderInsets, ui.getContentBorderInsets(SwingConstants.TOP));
+        assertSame(ui.contentBorderInsets, ui.getContentBorderInsets(SwingConstants.TOP));
+        assertEquals(ui.contentBorderInsets, ui.getContentBorderInsets(SwingConstants.LEFT));
+        assertEquals(ui.contentBorderInsets, ui.getContentBorderInsets(SwingConstants.BOTTOM));
+        assertEquals(ui.contentBorderInsets, ui.getContentBorderInsets(SwingConstants.RIGHT));
     }
 
     public void testGetFocusIndex() {
         showTabPane();
-
-        Component focusOwner =
-            KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
+        Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager()
+                .getFocusOwner();
         int expected = focusOwner != tabbed ? -1 : tabbed.getSelectedIndex();
         assertEquals(expected, ui.getFocusIndex());
     }
@@ -245,10 +225,8 @@
     public void testGetIconForTab() {
         tabbed.setEnabledAt(0, true);
         assertSame(tabbed.getIconAt(0), ui.getIconForTab(0));
-
         tabbed.setEnabledAt(0, false);
         assertSame(tabbed.getDisabledIconAt(0), ui.getIconForTab(0));
-
         tabbed.setDisabledIconAt(0, null);
         assertNull(ui.getIconForTab(0));
     }
@@ -274,7 +252,6 @@
     public void testGetNextTabIndexInRun() {
         create2TabRuns();
         int tabCount = tabbed.getTabCount();
-
         assertEquals(1, ui.getNextTabIndexInRun(tabCount, 0));
         assertEquals(0, ui.getNextTabIndexInRun(tabCount, 1));
         assertEquals(2, ui.getNextTabIndexInRun(tabCount, 2));
@@ -282,7 +259,6 @@
 
     public void testGetNextTabRun() {
         create3TabRuns();
-
         assertEquals(1, ui.getNextTabRun(0));
         assertEquals(0, ui.getNextTabRun(2));
     }
@@ -290,7 +266,6 @@
     public void testGetPreviousTabIndexInRun() {
         create2TabRuns();
         int tabCount = tabbed.getTabCount();
-
         assertEquals(1, ui.getPreviousTabIndexInRun(tabCount, 0));
         assertEquals(0, ui.getPreviousTabIndexInRun(tabCount, 1));
         assertEquals(2, ui.getPreviousTabIndexInRun(tabCount, 2));
@@ -298,7 +273,6 @@
 
     public void testGetPreviousTabRun() {
         create3TabRuns();
-
         assertEquals(2, ui.getPreviousTabRun(0));
         assertEquals(0, ui.getPreviousTabRun(1));
     }
@@ -309,40 +283,29 @@
 
     public void testGetSelectedTabPadInsets() {
         Insets rotatedInsets = new Insets(0, 0, 0, 0);
-        BasicTabbedPaneUI.rotateInsets(ui.selectedTabPadInsets,
-                                       rotatedInsets, JTabbedPane.LEFT);
-
-        assertEquals(rotatedInsets,
-                     ui.getSelectedTabPadInsets(JTabbedPane.LEFT));
-
+        BasicTabbedPaneUI.rotateInsets(ui.selectedTabPadInsets, rotatedInsets,
+                SwingConstants.LEFT);
+        assertEquals(rotatedInsets, ui.getSelectedTabPadInsets(SwingConstants.LEFT));
         tabbed.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
-        assertEquals(rotatedInsets,
-                     ui.getSelectedTabPadInsets(JTabbedPane.LEFT));
+        assertEquals(rotatedInsets, ui.getSelectedTabPadInsets(SwingConstants.LEFT));
     }
 
     public void testGetTabAreaInsets() {
         ui.tabAreaInsets = new Insets(1, 2, 3, 4);
-        assertEquals(ui.tabAreaInsets,
-                     ui.getTabAreaInsets(JTabbedPane.TOP));
-        assertEquals(new Insets(2, 1, 4, 3),
-                     ui.getTabAreaInsets(JTabbedPane.LEFT));
-        assertEquals(new Insets(3, 2, 1, 4),
-                     ui.getTabAreaInsets(JTabbedPane.BOTTOM));
-        assertEquals(new Insets(2, 3, 4, 1),
-                     ui.getTabAreaInsets(JTabbedPane.RIGHT));
-        assertNotSame(ui.tabAreaInsets,
-                      ui.getTabAreaInsets(JTabbedPane.TOP));
+        assertEquals(ui.tabAreaInsets, ui.getTabAreaInsets(SwingConstants.TOP));
+        assertEquals(new Insets(2, 1, 4, 3), ui.getTabAreaInsets(SwingConstants.LEFT));
+        assertEquals(new Insets(3, 2, 1, 4), ui.getTabAreaInsets(SwingConstants.BOTTOM));
+        assertEquals(new Insets(2, 3, 4, 1), ui.getTabAreaInsets(SwingConstants.RIGHT));
+        assertNotSame(ui.tabAreaInsets, ui.getTabAreaInsets(SwingConstants.TOP));
     }
 
     public void testGetTabBoundsintRectangle() {
         tabbed.setSize(220, 100);
         tabbed.doLayout();
-
         Rectangle r = new Rectangle();
         Rectangle rc = ui.getTabBounds(0, r);
         assertSame(r, rc);
         assertEquals(ui.rects[0], r);
-
         assertTrue(r.x >= 0 && r.x <= 10);
         assertTrue(r.y >= 0 && r.y <= 10);
         assertTrue(r.width < 80 && r.width > 0);
@@ -352,7 +315,6 @@
     public void testGetTabBoundsJTabbedPaneint() {
         tabbed.setSize(220, 100);
         tabbed.doLayout();
-
         Rectangle r1 = ui.getTabBounds(tabbed, 0);
         Rectangle r2 = new Rectangle();
         ui.getTabBounds(0, r2);
@@ -361,43 +323,39 @@
 
     public void testGetTabInsets() {
         tabbed.setSelectedIndex(0);
-        assertSame(ui.tabInsets, ui.getTabInsets(JTabbedPane.LEFT, 0));
+        assertSame(ui.tabInsets, ui.getTabInsets(SwingConstants.LEFT, 0));
         tabbed.setSelectedIndex(1);
-        assertSame(ui.tabInsets, ui.getTabInsets(JTabbedPane.LEFT, 0));
-        assertSame(ui.tabInsets, ui.getTabInsets(JTabbedPane.TOP, 1));
-        assertSame(ui.tabInsets, ui.getTabInsets(JTabbedPane.RIGHT, 1));
-        assertSame(ui.tabInsets, ui.getTabInsets(JTabbedPane.BOTTOM, 1));
+        assertSame(ui.tabInsets, ui.getTabInsets(SwingConstants.LEFT, 0));
+        assertSame(ui.tabInsets, ui.getTabInsets(SwingConstants.TOP, 1));
+        assertSame(ui.tabInsets, ui.getTabInsets(SwingConstants.RIGHT, 1));
+        assertSame(ui.tabInsets, ui.getTabInsets(SwingConstants.BOTTOM, 1));
     }
 
     public void testGetTabLabelShiftX() {
         if (!isHarmony()) {
             return;
         }
-
         tabbed.setSelectedIndex(0);
         tabbed.doLayout();
-
-        assertEquals(-1, ui.getTabLabelShiftX(JTabbedPane.TOP, 0, true));
-        assertEquals(-1, ui.getTabLabelShiftX(JTabbedPane.LEFT, 0, true));
-        assertEquals(1, ui.getTabLabelShiftX(JTabbedPane.RIGHT, 0, true));
-        assertEquals(-1, ui.getTabLabelShiftX(JTabbedPane.BOTTOM, 0, true));
-
-        assertEquals(-1, ui.getTabLabelShiftX(JTabbedPane.TOP, 0, false));
-        assertEquals(1, ui.getTabLabelShiftX(JTabbedPane.LEFT, 0, false));
-        assertEquals(-1, ui.getTabLabelShiftX(JTabbedPane.RIGHT, 0, false));
-        assertEquals(-1, ui.getTabLabelShiftX(JTabbedPane.BOTTOM, 0, false));
+        assertEquals(-1, ui.getTabLabelShiftX(SwingConstants.TOP, 0, true));
+        assertEquals(-1, ui.getTabLabelShiftX(SwingConstants.LEFT, 0, true));
+        assertEquals(1, ui.getTabLabelShiftX(SwingConstants.RIGHT, 0, true));
+        assertEquals(-1, ui.getTabLabelShiftX(SwingConstants.BOTTOM, 0, true));
+        assertEquals(-1, ui.getTabLabelShiftX(SwingConstants.TOP, 0, false));
+        assertEquals(1, ui.getTabLabelShiftX(SwingConstants.LEFT, 0, false));
+        assertEquals(-1, ui.getTabLabelShiftX(SwingConstants.RIGHT, 0, false));
+        assertEquals(-1, ui.getTabLabelShiftX(SwingConstants.BOTTOM, 0, false));
     }
 
     public void testGetTabLabelShiftY() {
-        assertEquals(-1, ui.getTabLabelShiftY(JTabbedPane.TOP, 0, true));
-        assertEquals(1, ui.getTabLabelShiftY(JTabbedPane.LEFT, 0, true));
-        assertEquals(1, ui.getTabLabelShiftY(JTabbedPane.RIGHT, 0, true));
-        assertEquals(1, ui.getTabLabelShiftY(JTabbedPane.BOTTOM, 0, true));
-
-        assertEquals(1, ui.getTabLabelShiftY(JTabbedPane.TOP, 0, false));
-        assertEquals(1, ui.getTabLabelShiftY(JTabbedPane.LEFT, 0, false));
-        assertEquals(1, ui.getTabLabelShiftY(JTabbedPane.RIGHT, 0, false));
-        assertEquals(-1, ui.getTabLabelShiftY(JTabbedPane.BOTTOM, 0, false));
+        assertEquals(-1, ui.getTabLabelShiftY(SwingConstants.TOP, 0, true));
+        assertEquals(1, ui.getTabLabelShiftY(SwingConstants.LEFT, 0, true));
+        assertEquals(1, ui.getTabLabelShiftY(SwingConstants.RIGHT, 0, true));
+        assertEquals(1, ui.getTabLabelShiftY(SwingConstants.BOTTOM, 0, true));
+        assertEquals(1, ui.getTabLabelShiftY(SwingConstants.TOP, 0, false));
+        assertEquals(1, ui.getTabLabelShiftY(SwingConstants.LEFT, 0, false));
+        assertEquals(1, ui.getTabLabelShiftY(SwingConstants.RIGHT, 0, false));
+        assertEquals(-1, ui.getTabLabelShiftY(SwingConstants.BOTTOM, 0, false));
     }
 
     /*
@@ -405,18 +363,16 @@
      */
     public void testGetTabRunCount() {
         create2TabRuns();
-
         assertEquals(2, ui.getTabRunCount(tabbed));
-
         tabbed.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
         assertEquals(1, ui.getTabRunCount(tabbed));
     }
 
     public void testGetTabRunIndent() {
-        assertEquals(0, ui.getTabRunIndent(JTabbedPane.LEFT, 0));
-        assertEquals(0, ui.getTabRunIndent(JTabbedPane.TOP, 1));
-        assertEquals(0, ui.getTabRunIndent(JTabbedPane.BOTTOM, 1));
-        assertEquals(0, ui.getTabRunIndent(JTabbedPane.RIGHT, 1));
+        assertEquals(0, ui.getTabRunIndent(SwingConstants.LEFT, 0));
+        assertEquals(0, ui.getTabRunIndent(SwingConstants.TOP, 1));
+        assertEquals(0, ui.getTabRunIndent(SwingConstants.BOTTOM, 1));
+        assertEquals(0, ui.getTabRunIndent(SwingConstants.RIGHT, 1));
     }
 
     public void testGetTabRunOffset() {
@@ -424,8 +380,8 @@
     }
 
     public void testGetTabRunOverlay() {
-        assertEquals(ui.tabRunOverlay, ui.getTabRunOverlay(JTabbedPane.LEFT));
-        assertEquals(ui.tabRunOverlay, ui.getTabRunOverlay(JTabbedPane.TOP));
+        assertEquals(ui.tabRunOverlay, ui.getTabRunOverlay(SwingConstants.LEFT));
+        assertEquals(ui.tabRunOverlay, ui.getTabRunOverlay(SwingConstants.TOP));
     }
 
     public void testGetTextViewForTab() {
@@ -436,7 +392,6 @@
     public void testSetGetVisibleComponent() {
         assertSame(tabbed.getSelectedComponent(), ui.getVisibleComponent());
         assertTrue(ui.getVisibleComponent().isVisible());
-
         JComponent comp = new JLabel("label");
         Component oldVisible = ui.getVisibleComponent();
         ui.setVisibleComponent(comp);
@@ -445,7 +400,6 @@
         assertFalse(oldVisible.isVisible());
         assertTrue(comp.isVisible());
         assertFalse(tabbed.isAncestorOf(comp));
-
         ui.setVisibleComponent(null);
         assertNull(ui.getVisibleComponent());
     }
@@ -454,19 +408,15 @@
         int count = tabbed.getComponentCount();
         ui.uninstallComponents();
         assertEquals(count, tabbed.getComponentCount());
-
         ui.installComponents();
         assertEquals(count, tabbed.getComponentCount());
-
         tabbed.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
         ui.uninstallComponents();
         count = tabbed.getComponentCount();
-
         ui.installComponents();
         if (isHarmony()) {
             assertEquals(count + 2, tabbed.getComponentCount());
         }
-
         ui.uninstallComponents();
         assertEquals(count, tabbed.getComponentCount());
     }
@@ -477,9 +427,7 @@
         tabbed.setForeground(null);
         tabbed.setLayout(null);
         tabbed.setFont(null);
-
         ui.installDefaults();
-
         assertTrue(tabbed.getBackground() instanceof UIResource);
         assertTrue(tabbed.getForeground() instanceof UIResource);
         assertTrue(tabbed.getFont() instanceof UIResource);
@@ -493,42 +441,33 @@
 
     public void testInstallUninstallKeyboardActions() {
         ui.uninstallKeyboardActions();
-
         ui.installKeyboardActions();
-        assertSame(UIManager.get("TabbedPane.focusInputMap"),
-                   SwingUtilities.getUIInputMap(tabbed, JComponent.WHEN_FOCUSED));
-        assertSame(UIManager.get("TabbedPane.ancestorInputMap"),
-                   SwingUtilities.getUIInputMap(tabbed, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT));
+        assertSame(UIManager.get("TabbedPane.focusInputMap"), SwingUtilities.getUIInputMap(
+                tabbed, JComponent.WHEN_FOCUSED));
+        assertSame(UIManager.get("TabbedPane.ancestorInputMap"), SwingUtilities.getUIInputMap(
+                tabbed, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT));
         assertNotNull(SwingUtilities.getUIActionMap(tabbed));
-
         ui.uninstallKeyboardActions();
         assertNull(SwingUtilities.getUIInputMap(tabbed, JComponent.WHEN_FOCUSED));
-        assertNull(SwingUtilities.getUIInputMap(tabbed, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT));
+        assertNull(SwingUtilities.getUIInputMap(tabbed,
+                JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT));
         assertNull(SwingUtilities.getUIActionMap(tabbed));
     }
 
     public void testInstallUninstallListeners() {
         ui.uninstallListeners();
-
         ui.installListeners();
-        assertTrue(Arrays.asList(tabbed.getPropertyChangeListeners())
-                   .contains(ui.propertyChangeListener));
-        assertTrue(Arrays.asList(tabbed.getMouseListeners())
-                   .contains(ui.mouseListener));
-        assertTrue(Arrays.asList(tabbed.getFocusListeners())
-                   .contains(ui.focusListener));
-        assertTrue(Arrays.asList(tabbed.getChangeListeners())
-                   .contains(ui.tabChangeListener));
-
+        assertTrue(Arrays.asList(tabbed.getPropertyChangeListeners()).contains(
+                ui.propertyChangeListener));
+        assertTrue(Arrays.asList(tabbed.getMouseListeners()).contains(ui.mouseListener));
+        assertTrue(Arrays.asList(tabbed.getFocusListeners()).contains(ui.focusListener));
+        assertTrue(Arrays.asList(tabbed.getChangeListeners()).contains(ui.tabChangeListener));
         ui.uninstallListeners();
-        assertFalse(Arrays.asList(tabbed.getPropertyChangeListeners())
-                    .contains(ui.propertyChangeListener));
-        assertFalse(Arrays.asList(tabbed.getMouseListeners())
-                    .contains(ui.mouseListener));
-        assertFalse(Arrays.asList(tabbed.getFocusListeners())
-                    .contains(ui.focusListener));
-        assertFalse(Arrays.asList(tabbed.getChangeListeners())
-                    .contains(ui.tabChangeListener));
+        assertFalse(Arrays.asList(tabbed.getPropertyChangeListeners()).contains(
+                ui.propertyChangeListener));
+        assertFalse(Arrays.asList(tabbed.getMouseListeners()).contains(ui.mouseListener));
+        assertFalse(Arrays.asList(tabbed.getFocusListeners()).contains(ui.focusListener));
+        assertFalse(Arrays.asList(tabbed.getChangeListeners()).contains(ui.tabChangeListener));
     }
 
     public void testInstallUI() {
@@ -539,38 +478,29 @@
         int compCount = tabbed.getComponentCount();
         tabbed.setLayout(null);
         tabbed.setBackground(null);
-
         ui.installUI(tabbed);
-
         assertNotNull(tabbed.getLayout());
-        assertTrue("called installDefaults()",
-                   tabbed.getBackground() instanceof UIResource);
-        assertTrue("called installComponents()",
-                   tabbed.getComponentCount() > compCount);
+        assertTrue("called installDefaults()", tabbed.getBackground() instanceof UIResource);
+        assertTrue("called installComponents()", tabbed.getComponentCount() > compCount);
         if (isHarmony()) {
-            assertTrue("called installListeners()",
-                       Arrays.asList(tabbed.getMouseListeners())
-                       .contains(ui.mouseListener));
+            assertTrue("called installListeners()", Arrays.asList(tabbed.getMouseListeners())
+                    .contains(ui.mouseListener));
         }
         assertSame("called installKeyboardActions()",
-                   UIManager.get("TabbedPane.focusInputMap"),
-                   SwingUtilities.getUIInputMap(tabbed, JComponent.WHEN_FOCUSED));
+                UIManager.get("TabbedPane.focusInputMap"), SwingUtilities.getUIInputMap(tabbed,
+                        JComponent.WHEN_FOCUSED));
     }
 
     public void testUninstallUI() {
         tabbed.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
         int compCount = tabbed.getComponentCount();
-
         ui.uninstallUI(tabbed);
-
         assertNull(tabbed.getLayout());
-        assertTrue("called uninstallComponents()",
-                   tabbed.getComponentCount() < compCount);
-        assertFalse("called uninstallListeners()",
-                    Arrays.asList(tabbed.getMouseListeners())
-                    .contains(ui.mouseListener));
-        assertNull("called uninstallKeyboardActions()",
-                   SwingUtilities.getUIInputMap(tabbed, JComponent.WHEN_FOCUSED));
+        assertTrue("called uninstallComponents()", tabbed.getComponentCount() < compCount);
+        assertFalse("called uninstallListeners()", Arrays.asList(tabbed.getMouseListeners())
+                .contains(ui.mouseListener));
+        assertNull("called uninstallKeyboardActions()", SwingUtilities.getUIInputMap(tabbed,
+                JComponent.WHEN_FOCUSED));
     }
 
     public void testLastTabInRun() {
@@ -584,22 +514,18 @@
 
     public void testNavigateSelectedTab() {
         create2TabRuns();
-
         tabbed.setSelectedIndex(0);
-        ui.navigateSelectedTab(JTabbedPane.EAST);
-        assertEquals(ui.getNextTabIndexInRun(tabbed.getTabCount(), 0),
-                     tabbed.getSelectedIndex());
-
+        ui.navigateSelectedTab(SwingConstants.EAST);
+        assertEquals(ui.getNextTabIndexInRun(tabbed.getTabCount(), 0), tabbed
+                .getSelectedIndex());
         tabbed.setEnabledAt(0, false);
-        ui.navigateSelectedTab(JTabbedPane.WEST);
+        ui.navigateSelectedTab(SwingConstants.WEST);
         assertEquals(1, tabbed.getSelectedIndex());
         tabbed.setEnabledAt(0, true);
-
-        ui.navigateSelectedTab(JTabbedPane.NORTH);
+        ui.navigateSelectedTab(SwingConstants.NORTH);
         assertEquals(2, tabbed.getSelectedIndex());
-
         if (isHarmony()) {
-            ui.navigateSelectedTab(JTabbedPane.SOUTH);
+            ui.navigateSelectedTab(SwingConstants.SOUTH);
             assertEquals(1, tabbed.getSelectedIndex());
         }
     }
@@ -658,67 +584,57 @@
 
     public void testSelectAdjacentRunTab() {
         create3TabRuns();
-
         tabbed.setSelectedIndex(0);
-        int tabRunOffset = ui.getTabRunOffset(tabbed.getTabPlacement(),
-                                              tabbed.getTabCount(), 0, true);
+        int tabRunOffset = ui.getTabRunOffset(tabbed.getTabPlacement(), tabbed.getTabCount(),
+                0, true);
         ui.selectAdjacentRunTab(tabbed.getTabPlacement(), 0, tabRunOffset);
         assertEquals(3, tabbed.getSelectedIndex());
     }
 
     public void testSelectNextTab() {
         create2TabRuns();
-
         int initIndex = 0;
         tabbed.setSelectedIndex(initIndex);
         ui.selectNextTab(initIndex);
-        assertEquals(ui.getNextTabIndex(initIndex),
-                     tabbed.getSelectedIndex());
+        assertEquals(ui.getNextTabIndex(initIndex), tabbed.getSelectedIndex());
     }
 
     public void testSelectPreviousTab() {
         create2TabRuns();
-
         int initIndex = 0;
         tabbed.setSelectedIndex(initIndex);
         ui.selectPreviousTab(initIndex);
-        assertEquals(ui.getPreviousTabIndex(initIndex),
-                     tabbed.getSelectedIndex());
+        assertEquals(ui.getPreviousTabIndex(initIndex), tabbed.getSelectedIndex());
     }
 
     public void testSelectNextTabInRun() {
         create2TabRuns();
-
         int initIndex = 0;
         tabbed.setSelectedIndex(initIndex);
         ui.selectNextTabInRun(initIndex);
-        assertEquals(ui.getNextTabIndexInRun(tabbed.getTabCount(), initIndex),
-                     tabbed.getSelectedIndex());
+        assertEquals(ui.getNextTabIndexInRun(tabbed.getTabCount(), initIndex), tabbed
+                .getSelectedIndex());
     }
 
     public void testSelectPreviousTabInRun() {
         create2TabRuns();
-
         int initIndex = 0;
         tabbed.setSelectedIndex(initIndex);
         ui.selectPreviousTabInRun(initIndex);
-        assertEquals(ui.getPreviousTabIndexInRun(tabbed.getTabCount(), initIndex),
-                     tabbed.getSelectedIndex());
+        assertEquals(ui.getPreviousTabIndexInRun(tabbed.getTabCount(), initIndex), tabbed
+                .getSelectedIndex());
     }
 
     public void testSetGetRolloverTab() {
         assertEquals(-1, ui.getRolloverTab());
-
         ui.setRolloverTab(1);
         assertEquals(1, ui.getRolloverTab());
-
         ui.setRolloverTab(5);
         assertEquals(5, ui.getRolloverTab());
     }
 
     public void testShouldPadTabRun() {
         assertFalse(ui.shouldPadTabRun(tabbed.getTabPlacement(), 0));
-
         create2TabRuns();
         assertTrue(ui.shouldPadTabRun(tabbed.getTabPlacement(), 0));
         assertTrue(ui.shouldPadTabRun(tabbed.getTabPlacement(), 1));
@@ -735,11 +651,9 @@
     public void testTabForCoordinate() {
         tabbed.setSize(40, 30);
         tabbed.doLayout();
-
         Rectangle tabBounds = ui.getTabBounds(tabbed, 0);
         assertEquals(0, ui.tabForCoordinate(null, tabBounds.x, tabBounds.y));
-        assertEquals(-1, ui.tabForCoordinate(null, tabBounds.x - 1,
-                                             tabBounds.y - 1));
+        assertEquals(-1, ui.tabForCoordinate(null, tabBounds.x - 1, tabBounds.y - 1));
         tabBounds = ui.getTabBounds(tabbed, 1);
         assertEquals(1, ui.tabForCoordinate(null, tabBounds.x + 1, tabBounds.y + 1));
     }
@@ -748,8 +662,7 @@
         tabbed.addTab("tab3", 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.getLayout().layoutContainer(tabbed);
         assertEquals("initialized incorrectly", 2, tabbed.getTabRunCount());
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java Sun Nov 26 12:15:43 2006
@@ -25,14 +25,12 @@
 import java.awt.Dimension;
 import java.awt.Font;
 import java.awt.Graphics;
-
 import javax.swing.BasicSwingTestCase;
 import javax.swing.UIManager;
 import javax.swing.plaf.ColorUIResource;
 import javax.swing.plaf.FontUIResource;
 import javax.swing.table.JTableHeader;
 import javax.swing.table.TableColumn;
-
 import org.apache.harmony.x.swing.Utilities;
 
 public class BasicTableHeaderUITest extends BasicSwingTestCase {
@@ -42,35 +40,36 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         ui = new BasicTableHeaderUI();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         ui = null;
     }
 
     public void testCreateMouseInputListener() throws Exception {
-        assertSame(BasicTableHeaderUI.MouseInputHandler.class, ui.createMouseInputListener().getClass());
+        assertSame(BasicTableHeaderUI.MouseInputHandler.class, ui.createMouseInputListener()
+                .getClass());
         assertNotSame(ui.createMouseInputListener(), ui.createMouseInputListener());
     }
 
     public void testCreate() throws Exception {
         assertSame(BasicTableHeaderUI.class, BasicTableHeaderUI.createUI(null).getClass());
         assertNotSame(BasicTableHeaderUI.createUI(null), BasicTableHeaderUI.createUI(null));
-        assertNull(((BasicTableHeaderUI)BasicTableHeaderUI.createUI(new JTableHeader())).header);
+        assertNull(((BasicTableHeaderUI) BasicTableHeaderUI.createUI(new JTableHeader())).header);
     }
 
     public void testInstallUninstallUI() throws Exception {
         assertNull(ui.header);
         assertNull(ui.rendererPane);
-
         JTableHeader header = new JTableHeader();
         ui.installUI(header);
         assertSame(header, ui.header);
         assertNotNull(ui.rendererPane);
         assertTrue(ui.header.isOpaque());
-
         ui.uninstallUI(null);
         assertNull(ui.header);
         assertNull(ui.rendererPane);
@@ -81,12 +80,10 @@
         ui.header.setForeground(new ColorUIResource(Color.RED));
         ui.header.setBackground(new ColorUIResource(Color.BLUE));
         ui.header.setFont(new FontUIResource(new Font("any", Font.BOLD, 20)));
-
         ui.installDefaults();
         assertEquals(UIManager.getColor("TableHeader.background"), ui.header.getBackground());
         assertEquals(UIManager.getColor("TableHeader.foreground"), ui.header.getForeground());
         assertEquals(UIManager.getFont("TableHeader.font"), ui.header.getFont());
-
         ui.uninstallDefaults();
         if (isHarmony()) {
             assertNull(ui.header.getForeground());
@@ -100,12 +97,10 @@
         assertNull(ui.mouseInputListener);
         int mouseListenersCount = ui.header.getMouseListeners().length;
         int mouseMotionListenersCount = ui.header.getMouseMotionListeners().length;
-
         ui.installListeners();
         assertEquals(mouseListenersCount + 1, ui.header.getMouseListeners().length);
         assertEquals(mouseMotionListenersCount + 1, ui.header.getMouseMotionListeners().length);
         assertNotNull(ui.mouseInputListener);
-
         ui.uninstallListeners();
         assertEquals(mouseListenersCount, ui.header.getMouseListeners().length);
         assertEquals(mouseMotionListenersCount, ui.header.getMouseMotionListeners().length);
@@ -128,12 +123,9 @@
 
     public void testGetMinimumMaximumPreferredSize() throws Exception {
         ui.header = new JTableHeader();
-
-
         assertEquals(new Dimension(), ui.getMinimumSize(null));
         assertEquals(new Dimension(), ui.getMaximumSize(null));
         assertEquals(new Dimension(), ui.getPreferredSize(null));
-
         TableColumn column1 = new TableColumn(0, 30);
         column1.setMinWidth(20);
         column1.setMaxWidth(60);
@@ -141,8 +133,6 @@
         assertEquals(new Dimension(20, 0), ui.getMinimumSize(null));
         assertEquals(new Dimension(60, 0), ui.getMaximumSize(null));
         assertEquals(new Dimension(30, 0), ui.getPreferredSize(null));
-
-
         TableColumn column2 = new TableColumn(0, 40);
         column2.setMinWidth(30);
         column2.setMaxWidth(100);
@@ -150,11 +140,14 @@
         assertEquals(new Dimension(50, 0), ui.getMinimumSize(null));
         assertEquals(new Dimension(160, 0), ui.getMaximumSize(null));
         assertEquals(new Dimension(70, 0), ui.getPreferredSize(null));
-
         column1.setHeaderValue("any");
-        Component renderingComponent = ui.header.getDefaultRenderer().getTableCellRendererComponent(null, "any", false, false, 0, 0);
-        assertEquals(new Dimension(50, renderingComponent.getMinimumSize().height), ui.getMinimumSize(null));
-        assertEquals(new Dimension(160, renderingComponent.getMaximumSize().height), ui.getMaximumSize(null));
-        assertEquals(new Dimension(70, renderingComponent.getPreferredSize().height), ui.getPreferredSize(null));
+        Component renderingComponent = ui.header.getDefaultRenderer()
+                .getTableCellRendererComponent(null, "any", false, false, 0, 0);
+        assertEquals(new Dimension(50, renderingComponent.getMinimumSize().height), ui
+                .getMinimumSize(null));
+        assertEquals(new Dimension(160, renderingComponent.getMaximumSize().height), ui
+                .getMaximumSize(null));
+        assertEquals(new Dimension(70, renderingComponent.getPreferredSize().height), ui
+                .getPreferredSize(null));
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableUITest.java Sun Nov 26 12:15:43 2006
@@ -22,7 +22,6 @@
 
 import java.awt.Dimension;
 import java.awt.Graphics;
-
 import javax.swing.BasicSwingTestCase;
 import javax.swing.CellRendererPane;
 import javax.swing.JTable;
@@ -37,15 +36,16 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         ui = new BasicTableUI();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         ui = null;
     }
 
-
     public void testBasicTableUI() throws Exception {
         assertNull(ui.table);
         assertNull(ui.rendererPane);
@@ -85,7 +85,6 @@
     public void testUninstallUI() throws Exception {
         JTable table = new JTable();
         ui.installUI(table);
-
         ui.uninstallUI(null);
         assertNull(ui.table);
         assertNull(ui.rendererPane);
@@ -94,9 +93,7 @@
     public void testGetMinimumMaximumPreferredSize() throws Exception {
         JTable table = new JTable();
         ui.table = table;
-
         assertEquals(new Dimension(), ui.getMinimumSize(null));
-
         TableColumn column1 = new TableColumn();
         column1.setMinWidth(20);
         column1.setPreferredWidth(50);
@@ -105,7 +102,6 @@
         assertEquals(new Dimension(20, 0), ui.getMinimumSize(null));
         assertEquals(new Dimension(100, 0), ui.getMaximumSize(null));
         assertEquals(new Dimension(50, 0), ui.getPreferredSize(null));
-
         TableColumn column2 = new TableColumn();
         column2.setMinWidth(10);
         column2.setPreferredWidth(20);
@@ -114,14 +110,12 @@
         assertEquals(new Dimension(30, 0), ui.getMinimumSize(null));
         assertEquals(new Dimension(140, 0), ui.getMaximumSize(null));
         assertEquals(new Dimension(70, 0), ui.getPreferredSize(null));
-
         table.setRowHeight(30);
-        ((DefaultTableModel)table.getModel()).addRow(new Object[] {"1"});
+        ((DefaultTableModel) table.getModel()).addRow(new Object[] { "1" });
         assertEquals(new Dimension(30, 30), ui.getMinimumSize(null));
         assertEquals(new Dimension(140, 30), ui.getMaximumSize(null));
         assertEquals(new Dimension(70, 30), ui.getPreferredSize(null));
-
-        ((DefaultTableModel)table.getModel()).addRow(new Object[] {"2", "2"});
+        ((DefaultTableModel) table.getModel()).addRow(new Object[] { "2", "2" });
         table.setRowHeight(1, 20);
         assertEquals(new Dimension(30, 50), ui.getMinimumSize(null));
         assertEquals(new Dimension(140, 50), ui.getMaximumSize(null));
@@ -131,10 +125,9 @@
     public void testPaint() throws Exception {
         ui.table = new JTable();
         ui.paint(null, null);
-
-        DefaultTableModel model = (DefaultTableModel)ui.table.getModel();
+        DefaultTableModel model = (DefaultTableModel) ui.table.getModel();
         model.addColumn("column1");
-        model.addRow(new Object[] {"1"});
+        model.addRow(new Object[] { "1" });
         ui.rendererPane = new CellRendererPane();
         Graphics g = createTestGraphics();
         g.setClip(0, 0, 100, 100);
@@ -148,7 +141,9 @@
         assertSame(UIManager.getColor("Table.gridColor"), ui.table.getGridColor());
         assertSame(UIManager.getColor("Table.foreground"), ui.table.getForeground());
         assertSame(UIManager.getColor("Table.background"), ui.table.getBackground());
-        assertSame(UIManager.getColor("Table.selectionForeground"), ui.table.getSelectionForeground());
-        assertSame(UIManager.getColor("Table.selectionBackground"), ui.table.getSelectionBackground());
+        assertSame(UIManager.getColor("Table.selectionForeground"), ui.table
+                .getSelectionForeground());
+        assertSame(UIManager.getColor("Table.selectionBackground"), ui.table
+                .getSelectionBackground());
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextAreaUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextAreaUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextAreaUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextAreaUITest.java Sun Nov 26 12:15:43 2006
@@ -18,7 +18,6 @@
  * @author Evgeniya G. Maenkova
  * @version $Revision$
  */
-
 package javax.swing.plaf.basic;
 
 import java.awt.Container;
@@ -26,7 +25,6 @@
 import javax.swing.JFrame;
 import javax.swing.JTextArea;
 import javax.swing.SwingTestCase;
-import javax.swing.SwingWaitTestCase;
 import javax.swing.UIManager;
 import javax.swing.plaf.ComponentUI;
 import javax.swing.text.Document;
@@ -36,26 +34,31 @@
 import junit.framework.AssertionFailedError;
 
 public class BasicTextAreaUITest extends SwingTestCase {
-
     JFrame jf;
+
     JTextArea jta;
+
     JTextArea bidiJta;
+
     String sLTR = "aaaa";
+
     String sRTL = "\u05dc" + "\u05dc" + "\u05dc" + "\u05dc";
-    String content = "Edison accumul\tator, Edison base: Edison battery" +
-                     " Edison cap, \tEdison effect\n" +
-                     "Edison screw, Edison screw cap, Edison screw \n" +
-                     "holder, Edison screw lampholder, Edison screw " +
-                     "plug\n" +
-                     "Edison screw terminal, Edison storage battery" +
-                     "Edison storage \t\tcell";
-    String bidiContent = sLTR + sRTL + sRTL + " \t" + sLTR + sRTL + sLTR + "\n" +
-                         sRTL + "." + sLTR + sRTL + "\t" + sRTL + "\n" +
-                         sLTR + sLTR + sRTL + sRTL + sRTL + sLTR + sLTR +
-                         sLTR + sRTL + sLTR + sRTL + sLTR;
+
+    String content = "Edison accumul\tator, Edison base: Edison battery"
+            + " Edison cap, \tEdison effect\n"
+            + "Edison screw, Edison screw cap, Edison screw \n"
+            + "holder, Edison screw lampholder, Edison screw " + "plug\n"
+            + "Edison screw terminal, Edison storage battery" + "Edison storage \t\tcell";
+
+    String bidiContent = sLTR + sRTL + sRTL + " \t" + sLTR + sRTL + sLTR + "\n" + sRTL + "."
+            + sLTR + sRTL + "\t" + sRTL + "\n" + sLTR + sLTR + sRTL + sRTL + sRTL + sLTR + sLTR
+            + sLTR + sRTL + sLTR + sRTL + sLTR;
+
     AssertionFailedError afe[];
+
     int i;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         afe = new AssertionFailedError[50];
@@ -64,82 +67,71 @@
         jta = new JTextArea(content);
         bidiJta = new JTextArea(bidiContent);
         jf = new JFrame();
-        Container cont= jf.getContentPane();
-        cont.setLayout(new GridLayout(1,2,4,4));
-
+        Container cont = jf.getContentPane();
+        cont.setLayout(new GridLayout(1, 2, 4, 4));
         cont.add(jta);
         cont.add(bidiJta);
-        jf.setLocation(200,300);
-        jf.setSize(350,400);
+        jf.setLocation(200, 300);
+        jf.setSize(350, 400);
         jf.pack();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         jf.dispose();
         UIManager.put("TextAreaUI", "javax.swing.plaf.basic.BasicTextAreaUI");
         super.tearDown();
     }
-    // TODO add test for bidirectional text (after creation PlainViewi18n)
-
-    public void testCreateElement() throws Exception{
-
-                Document doc = jta.getDocument();
-                Element elem = doc.getDefaultRootElement();
-                BasicTextUI ui = (BasicTextUI)jta.getUI();
-                assertTrue(ui.create(elem) instanceof PlainView);
-                jta.setLineWrap(true);
-                assertTrue(ui.create(elem) instanceof WrappedPlainView);
-                jta.setLineWrap(false);
-                elem = elem.getElement(0);
-                assertTrue(ui.create(elem) instanceof PlainView);
-                jta.setLineWrap(true);
-                assertTrue(ui.create(elem) instanceof WrappedPlainView);
-
 
+    // TODO add test for bidirectional text (after creation PlainViewi18n)
+    public void testCreateElement() throws Exception {
+        Document doc = jta.getDocument();
+        Element elem = doc.getDefaultRootElement();
+        BasicTextUI ui = (BasicTextUI) jta.getUI();
+        assertTrue(ui.create(elem) instanceof PlainView);
+        jta.setLineWrap(true);
+        assertTrue(ui.create(elem) instanceof WrappedPlainView);
+        jta.setLineWrap(false);
+        elem = elem.getElement(0);
+        assertTrue(ui.create(elem) instanceof PlainView);
+        jta.setLineWrap(true);
+        assertTrue(ui.create(elem) instanceof WrappedPlainView);
     }
 
     public void testGetPropertyPrefix() {
-        assertEquals("TextArea",((BasicTextAreaUI)jta.getUI()).getPropertyPrefix());
-        assertEquals("TextArea",((BasicTextAreaUI)bidiJta.getUI()).getPropertyPrefix());
-
+        assertEquals("TextArea", ((BasicTextAreaUI) jta.getUI()).getPropertyPrefix());
+        assertEquals("TextArea", ((BasicTextAreaUI) bidiJta.getUI()).getPropertyPrefix());
     }
 
-    public void testPropertyChange()throws Exception {
-
-
-                TextAreaUI ui = (TextAreaUI)jta.getUI();
-
-                ui.flagModelChanged = false;
-                jta.setLineWrap(true);
-                assertTrue(ui.flagModelChanged);
-
-                ui.flagModelChanged = false;
-                jta.setLineWrap(false);
-                assertTrue(ui.flagModelChanged);
-
-                ui.flagModelChanged = false;
-                jta.setWrapStyleWord(true);
-                assertTrue(ui.flagModelChanged);
-
-                ui.flagModelChanged = false;
-                jta.setWrapStyleWord(false);
-                assertTrue(ui.flagModelChanged);
-
+    public void testPropertyChange() throws Exception {
+        TextAreaUI ui = (TextAreaUI) jta.getUI();
+        ui.flagModelChanged = false;
+        jta.setLineWrap(true);
+        assertTrue(ui.flagModelChanged);
+        ui.flagModelChanged = false;
+        jta.setLineWrap(false);
+        assertTrue(ui.flagModelChanged);
+        ui.flagModelChanged = false;
+        jta.setWrapStyleWord(true);
+        assertTrue(ui.flagModelChanged);
+        ui.flagModelChanged = false;
+        jta.setWrapStyleWord(false);
+        assertTrue(ui.flagModelChanged);
     }
 
     public void testCreateUIJComponent() {
-        JTextArea jta  = new JTextArea();
-        ComponentUI ui =  BasicTextAreaUI.createUI(jta);
+        JTextArea jta = new JTextArea();
+        ComponentUI ui = BasicTextAreaUI.createUI(jta);
         assertTrue(ui instanceof BasicTextAreaUI);
-        assertNotSame(ui,BasicTextAreaUI.createUI(jta));
+        assertNotSame(ui, BasicTextAreaUI.createUI(jta));
     }
 
-    public void testGetPrefferedSize(){
-
+    public void testGetPrefferedSize() {
     }
-    public void testGetMinimumSize(){
+
+    public void testGetMinimumSize() {
     }
 
-    public void testInstallDefaults(){
+    public void testInstallDefaults() {
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextFieldUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextFieldUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextFieldUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextFieldUITest.java Sun Nov 26 12:15:43 2006
@@ -18,12 +18,10 @@
  * @author Evgeniya G. Maenkova
  * @version $Revision$
  */
-
 package javax.swing.plaf.basic;
 
 import java.awt.Container;
 import java.awt.GridLayout;
-
 import javax.swing.JFrame;
 import javax.swing.JTextField;
 import javax.swing.SwingTestCase;
@@ -32,34 +30,37 @@
 import javax.swing.text.FieldView;
 import javax.swing.text.View;
 
-
-
 public class BasicTextFieldUITest extends SwingTestCase {
     JFrame jf;
+
     JTextField jtf;
+
     JTextField jtfBidi;
+
     BasicTextFieldUI ui;
+
     final String S_RTL = "\u05dc" + "\u05dc" + "\u05dc" + "\u05dc";
+
     final String S_LTR = "aaaa";
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         jf = new JFrame();
         jtf = new JTextField("JTextField \n JTextField");
-        jtfBidi = new JTextField(S_LTR + S_RTL +  "\n" + S_LTR);
+        jtfBidi = new JTextField(S_LTR + S_RTL + "\n" + S_LTR);
         ui = new BasicTextFieldUI();
         jtf.setUI(ui);
         jtfBidi.setUI(new BasicTextFieldUI());
-
         Container container = jf.getContentPane();
-        container.setLayout(new GridLayout(2,1,4,4));
+        container.setLayout(new GridLayout(2, 1, 4, 4));
         container.add(jtf);
         container.add(jtfBidi);
-
-        jf.setSize(200,200);
+        jf.setSize(200, 200);
         jf.pack();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         jf.dispose();
         super.tearDown();
@@ -73,11 +74,11 @@
         view = ui.create(element);
         assertTrue(view instanceof FieldView);
         /* no view support for bidi text
-        ui = (BasicTextFieldUI)jtfBidi.getUI();
-        element = jtfBidi.getDocument().getDefaultRootElement();
-        view = ui.create(element);
-        assertFalse(view instanceof FieldView);
-        */
+         ui = (BasicTextFieldUI)jtfBidi.getUI();
+         element = jtfBidi.getDocument().getDefaultRootElement();
+         view = ui.create(element);
+         assertFalse(view instanceof FieldView);
+         */
     }
 
     public void testGetPropertyPrefix() {
@@ -98,5 +99,4 @@
         assertTrue(componentUI instanceof BasicTextFieldUI);
         assertNotSame(BasicTextFieldUI.createUI(jtf), componentUI);
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextPaneUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextPaneUITest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextPaneUITest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextPaneUITest.java Sun Nov 26 12:15:43 2006
@@ -22,7 +22,6 @@
 
 import java.awt.Color;
 import java.awt.Font;
-
 import javax.swing.JFrame;
 import javax.swing.JTextArea;
 import javax.swing.JTextField;
@@ -36,39 +35,45 @@
 import javax.swing.text.StyleContext;
 import javax.swing.text.StyledDocument;
 
-
 public class BasicTextPaneUITest extends SwingTestCase {
-
     JTextPane textPane;
+
     JFrame frame;
+
     BasicTextPaneUI ui;
 
     Font font = new Font("", Font.BOLD | Font.ITALIC, 25) {
+        private static final long serialVersionUID = 1L;
+
+        @Override
         public String getFamily() {
             return "My FontFamily";
         }
 
+        @Override
         public String getFontName() {
             return "My FontName";
         }
 
+        @Override
         public String getName() {
             return "My Name";
         }
     };
 
-
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         setIgnoreNotImplemented(true);
         frame = new JFrame();
         textPane = new JTextPane();
-        ui = (BasicTextPaneUI)textPane.getUI();
+        ui = (BasicTextPaneUI) textPane.getUI();
         frame.getContentPane().add(textPane);
         frame.setSize(200, 300);
         frame.pack();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         frame.dispose();
         super.tearDown();
@@ -81,7 +86,6 @@
         ui1 = BasicTextPaneUI.createUI(new JTextArea());
         assertTrue(ui1 instanceof BasicTextPaneUI);
         assertTrue(ui1 instanceof BasicTextPaneUI);
-
         ComponentUI ui2 = BasicTextPaneUI.createUI(textPane);
         assertTrue(ui2 instanceof BasicTextPaneUI);
     }
@@ -92,87 +96,49 @@
 
     public void testPropertyChange() throws BadLocationException {
         Style style = textPane.getStyle(StyleContext.DEFAULT_STYLE);
-
         //Font
-        assertFalse(25 == ((Integer)style.getAttribute(StyleConstants.FontSize))
-                          .intValue());
+        assertFalse(25 == ((Integer) style.getAttribute(StyleConstants.FontSize)).intValue());
         textPane.setFont(font);
-
-        assertEquals(25,
-                     ((Integer)style.getAttribute(StyleConstants.FontSize))
-                     .intValue());
-
-        assertEquals(font.getName(),
-                     style.getAttribute(StyleConstants.FontFamily));
-        assertFalse(font.getFontName().equals(style.getAttribute(StyleConstants
-                                         .FontFamily)));
-        assertEquals(font.getName(),
-                     style.getAttribute(StyleConstants.FontFamily));
-
+        assertEquals(25, ((Integer) style.getAttribute(StyleConstants.FontSize)).intValue());
+        assertEquals(font.getName(), style.getAttribute(StyleConstants.FontFamily));
+        assertFalse(font.getFontName().equals(style.getAttribute(StyleConstants.FontFamily)));
+        assertEquals(font.getName(), style.getAttribute(StyleConstants.FontFamily));
         // Foreground
-        assertFalse(Color.BLUE.equals(style.getAttribute(StyleConstants
-                                                         .Foreground)));
+        assertFalse(Color.BLUE.equals(style.getAttribute(StyleConstants.Foreground)));
         textPane.setForeground(Color.BLUE);
         assertEquals(Color.BLUE, style.getAttribute(StyleConstants.Foreground));
-
         // Document
         style.addAttribute(StyleConstants.Subscript, Boolean.TRUE);
-
         StyledDocument newDoc = new DefaultStyledDocument();
         Style newStyle = newDoc.getStyle(StyleContext.DEFAULT_STYLE);
         assertNull(newStyle.getAttribute(StyleConstants.FontSize));
         assertNull(newStyle.getAttribute(StyleConstants.FontFamily));
-
         newStyle.addAttribute(StyleConstants.FontFamily, "family2");
-        newStyle.addAttribute(StyleConstants.FontSize,
-                              new Integer(10));
+        newStyle.addAttribute(StyleConstants.FontSize, new Integer(10));
         newStyle.addAttribute(StyleConstants.Italic, Boolean.FALSE);
         newStyle.addAttribute(StyleConstants.StrikeThrough, Boolean.TRUE);
         newStyle.addAttribute(StyleConstants.Subscript, Boolean.FALSE);
         newStyle.addAttribute(StyleConstants.Foreground, Color.RED);
-
         textPane.setDocument(newDoc);
-
         assertNotSame(style, newStyle);
-        assertEquals(25,
-                ((Integer)newStyle.getAttribute(StyleConstants.FontSize))
-                .intValue());
-        assertEquals(font.getName(),
-                     newStyle.getAttribute(StyleConstants.FontFamily));
-
-        assertEquals(Boolean.TRUE,
-                     newStyle.getAttribute(StyleConstants.Italic));
-
-        assertEquals(Boolean.TRUE,
-             newStyle.getAttribute(StyleConstants.Bold));
-
-        assertEquals(Boolean.TRUE,
-                     newStyle.getAttribute(StyleConstants.StrikeThrough));
-
-        assertEquals(Boolean.FALSE,
-                newStyle.getAttribute(StyleConstants.Subscript));
-
-        assertEquals(Color.BLUE,
-                     newStyle.getAttribute(StyleConstants.Foreground));
+        assertEquals(25, ((Integer) newStyle.getAttribute(StyleConstants.FontSize)).intValue());
+        assertEquals(font.getName(), newStyle.getAttribute(StyleConstants.FontFamily));
+        assertEquals(Boolean.TRUE, newStyle.getAttribute(StyleConstants.Italic));
+        assertEquals(Boolean.TRUE, newStyle.getAttribute(StyleConstants.Bold));
+        assertEquals(Boolean.TRUE, newStyle.getAttribute(StyleConstants.StrikeThrough));
+        assertEquals(Boolean.FALSE, newStyle.getAttribute(StyleConstants.Subscript));
+        assertEquals(Color.BLUE, newStyle.getAttribute(StyleConstants.Foreground));
     }
 
     public void testProPertyChange_FontFamilyName() {
         Style style = textPane.getStyle(StyleContext.DEFAULT_STYLE);
-
         textPane.setFont(font);
-
-        assertFalse(font.getFamily().equals(style.getAttribute(StyleConstants
-                                                               .FontFamily)));
-        assertEquals(font.getName(),
-                     style.getAttribute(StyleConstants.FontFamily));
-
+        assertFalse(font.getFamily().equals(style.getAttribute(StyleConstants.FontFamily)));
+        assertEquals(font.getName(), style.getAttribute(StyleConstants.FontFamily));
         StyledDocument newDoc = new DefaultStyledDocument();
         Style newStyle = newDoc.getStyle(StyleContext.DEFAULT_STYLE);
         textPane.setDocument(newDoc);
-
         assertFalse(font.getFamily().equals(newStyle.getAttribute(StyleConstants.FontFamily)));
-        assertEquals(font.getName(),
-                     newStyle.getAttribute(StyleConstants.FontFamily));
+        assertEquals(font.getName(), newStyle.getAttribute(StyleConstants.FontFamily));
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextUIRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextUIRTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextUIRTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTextUIRTest.java Sun Nov 26 12:15:43 2006
@@ -21,9 +21,9 @@
 package javax.swing.plaf.basic;
 
 import java.awt.KeyboardFocusManager;
+import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import java.util.Set;
-
 import javax.swing.JEditorPane;
 import javax.swing.JTextArea;
 import javax.swing.JTextField;
@@ -33,100 +33,73 @@
 import javax.swing.text.JTextComponent;
 
 public class BasicTextUIRTest extends SwingTestCase {
-    private void checkEditableFTK(final JTextComponent comp,
-                                  final int hashCode1,
-                                  final int hashCode2) {
-        Set keys = comp.getFocusTraversalKeys(KeyboardFocusManager
-                                              .FORWARD_TRAVERSAL_KEYS);
+    private void checkEditableFTK(final JTextComponent comp, final int hashCode1,
+            final int hashCode2) {
+        Set<?> keys = comp.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
         assertEquals(1, keys.size());
         assertEquals(hashCode1, keys.hashCode());
         assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
-                                              KeyEvent.CTRL_DOWN_MASK)));
-        keys = comp.getFocusTraversalKeys(KeyboardFocusManager
-                                          .BACKWARD_TRAVERSAL_KEYS);
+                InputEvent.CTRL_DOWN_MASK)));
+        keys = comp.getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS);
         assertEquals(1, keys.size());
         assertEquals(hashCode2, keys.hashCode());
-        assertTrue(keys
-                   .contains(KeyStroke
-                             .getKeyStroke(KeyEvent.VK_TAB,
-                                           KeyEvent.CTRL_DOWN_MASK
-                                           | KeyEvent.SHIFT_DOWN_MASK)));
+        assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
+                InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)));
     }
 
     private void checkNotEditableFTK(final JTextComponent comp) {
-        Set keys = comp.getFocusTraversalKeys(KeyboardFocusManager
-                                              .FORWARD_TRAVERSAL_KEYS);
+        Set<?> keys = comp.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
         assertEquals(2, keys.size());
-
         assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
-                                              KeyEvent.CTRL_DOWN_MASK)));
+                InputEvent.CTRL_DOWN_MASK)));
         assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)));
-
-        keys = comp.getFocusTraversalKeys(KeyboardFocusManager
-                                          .BACKWARD_TRAVERSAL_KEYS);
+        keys = comp.getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS);
         assertEquals(2, keys.size());
-        assertTrue(keys.contains(KeyStroke
-                                 .getKeyStroke(KeyEvent
-                                               .VK_TAB,
-                                               KeyEvent.CTRL_DOWN_MASK
-                                               | KeyEvent.SHIFT_DOWN_MASK)));
-        assertTrue(keys.contains(KeyStroke
-                                 .getKeyStroke(KeyEvent.VK_TAB,
-                                               KeyEvent.SHIFT_DOWN_MASK)));
+        assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
+                InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)));
+        assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
+                InputEvent.SHIFT_DOWN_MASK)));
     }
 
-
-    public void  testFocusTraversalKeys() {
+    public void testFocusTraversalKeys() {
         JTextComponent textComp = new JTextArea();
-        int forwardFTKHashCode = textComp
-           .getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)
-           .hashCode();
-        int backwardFTKHashCode = textComp
-           .getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS)
-           .hashCode();
+        int forwardFTKHashCode = textComp.getFocusTraversalKeys(
+                KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS).hashCode();
+        int backwardFTKHashCode = textComp.getFocusTraversalKeys(
+                KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS).hashCode();
         checkEditableFTK(textComp, forwardFTKHashCode, backwardFTKHashCode);
         textComp.setEditable(false);
         checkNotEditableFTK(textComp);
         textComp.setEditable(true);
         checkEditableFTK(textComp, forwardFTKHashCode, backwardFTKHashCode);
-
         textComp = new JEditorPane();
-        forwardFTKHashCode = textComp
-           .getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)
-           .hashCode();
-        backwardFTKHashCode = textComp
-           .getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS)
-           .hashCode();
+        forwardFTKHashCode = textComp.getFocusTraversalKeys(
+                KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS).hashCode();
+        backwardFTKHashCode = textComp.getFocusTraversalKeys(
+                KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS).hashCode();
         checkEditableFTK(textComp, forwardFTKHashCode, backwardFTKHashCode);
         textComp.setEditable(false);
         checkNotEditableFTK(textComp);
         textComp.setEditable(true);
         checkEditableFTK(textComp, forwardFTKHashCode, backwardFTKHashCode);
-
         textComp = new JTextField();
-        forwardFTKHashCode = textComp
-           .getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)
-           .hashCode();
-        backwardFTKHashCode = textComp
-           .getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS)
-           .hashCode();
+        forwardFTKHashCode = textComp.getFocusTraversalKeys(
+                KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS).hashCode();
+        backwardFTKHashCode = textComp.getFocusTraversalKeys(
+                KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS).hashCode();
         checkNotEditableFTK(textComp);
         textComp.setEditable(false);
         checkNotEditableFTK(textComp);
         textComp.setEditable(true);
         checkNotEditableFTK(textComp);
-
     }
-    
+
     public void testUninstallUI() {
         // Regression for HARMONY-1475
         JTextComponent textComp = new JTextField();
         AbstractDocument doc = ((AbstractDocument) textComp.getDocument());
-        assertTrue("listeners installed", 
-                   doc.getDocumentListeners().length > 0);
+        assertTrue("listeners installed", doc.getDocumentListeners().length > 0);
         textComp.getUI().uninstallUI(textComp);
-        assertEquals("no listeners installed", 0,
-                     doc.getDocumentListeners().length);
+        assertEquals("no listeners installed", 0, doc.getDocumentListeners().length);
     }
-
 }



Mime
View raw message