6848364: javax/swing/border/Test4856008.java regression test fails due to BorderedComponent package not found
authormalenkov
Thu, 25 Jun 2009 18:50:51 +0400
changeset 3102 f637322451dc
parent 3101 2dde80384b3d
child 3103 6c55d4ab4ebe
6848364: javax/swing/border/Test4856008.java regression test fails due to BorderedComponent package not found Reviewed-by: alexp
jdk/test/javax/swing/border/Test4856008.java
--- a/jdk/test/javax/swing/border/Test4856008.java	Thu Jun 25 21:55:39 2009 +0900
+++ b/jdk/test/javax/swing/border/Test4856008.java	Thu Jun 25 18:50:51 2009 +0400
@@ -35,6 +35,7 @@
 import java.awt.Font;
 import java.awt.Insets;
 
+import javax.swing.ActionMap;
 import javax.swing.JComponent;
 import javax.swing.JFileChooser;
 import javax.swing.JLabel;
@@ -51,6 +52,7 @@
 import javax.swing.border.MatteBorder;
 import javax.swing.border.SoftBevelBorder;
 import javax.swing.border.TitledBorder;
+import javax.swing.plaf.ActionMapUIResource;
 import javax.swing.plaf.BorderUIResource;
 import javax.swing.plaf.synth.SynthLookAndFeel;
 import javax.swing.plaf.basic.BasicBorders;
@@ -59,7 +61,6 @@
 import javax.swing.plaf.metal.MetalComboBoxEditor;
 
 import sun.swing.plaf.synth.SynthFileChooserUI;
-import sun.tools.jconsole.BorderedComponent;
 
 public class Test4856008 {
     private static final JLabel LABEL = new JLabel();
@@ -133,11 +134,6 @@
 
             //+ SynthFileChooserUI.UIBorder:
             new SynthFileChooser().getUIBorder(),
-
-            //+ BorderedComponent.FocusBorder:
-            getBorder(false),
-            //+ BorderedComponent.LabeledBorder:
-            getBorder(true),
     };
 
     public static void main(String[] args) {
@@ -182,15 +178,6 @@
         return LABEL;
     }
 
-    // This method is used to get the border from BorderedComponent
-    private static Border getBorder(boolean labeled) {
-        JComponent component = new BorderedComponent("4856008", null, true);
-        CompoundBorder border = (CompoundBorder) component.getBorder();
-        return labeled
-                ? border.getInsideBorder()
-                : border.getOutsideBorder();
-    }
-
     // This class is used to get the instance of BasicBorders.RolloverMarginBorder
     private static class ToolBar extends BasicToolBarUI {
         private Border getRolloverMarginBorder() {
@@ -224,6 +211,11 @@
         }
 
         @Override
+        protected ActionMap createActionMap() {
+            return new ActionMapUIResource();
+        }
+
+        @Override
         public String getFileName() {
             return this.name;
         }