changeset 1423:ae9e74a17059

6848364: javax/swing/border/Test4856008.java regression test fails due to BorderedComponent package not found Reviewed-by: alexp
author malenkov
date Thu, 25 Jun 2009 18:50:51 +0400
parents e0707baa1593
children f1f9d228800e
files test/javax/swing/border/Test4856008.java
diffstat 1 files changed, 7 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/swing/border/Test4856008.java	Thu Jun 25 21:55:39 2009 +0900
+++ b/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;
         }