This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: MetalLookAndFeel.getDefaults()


I added a couple of additional checks for the 'List.focusCellHighlightBorder' default:

2005-10-13 David Gilbert <david.gilbert@object-refinery.com>

   * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java
   (test): Strengthened the test for the 'List.focusCellHighlightBorder'
   default.

Regards,

Dave

Index: gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java,v
retrieving revision 1.4
diff -u -r1.4 getDefaults.java
--- gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java	12 Oct 2005 16:32:10 -0000	1.4
+++ gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java	13 Oct 2005 10:58:18 -0000
@@ -37,6 +37,7 @@
 import javax.swing.ListCellRenderer;
 import javax.swing.UIDefaults;
 import javax.swing.border.Border;
+import javax.swing.border.LineBorder;
 import javax.swing.plaf.BorderUIResource;
 import javax.swing.plaf.ColorUIResource;
 import javax.swing.plaf.DimensionUIResource;
@@ -407,7 +408,10 @@
     harness.checkPoint("List");
     harness.check(defaults.get("List.background"), new ColorUIResource(0, 0, 30));
     harness.check(defaults.get("List.cellRenderer") instanceof ListCellRenderer);
-    harness.check(defaults.get("List.focusCellHighlightBorder") instanceof BorderUIResource.LineBorderUIResource);
+    LineBorder lb = (LineBorder) defaults.getBorder("List.focusCellHighlightBorder");
+    harness.check(lb instanceof BorderUIResource.LineBorderUIResource);
+    harness.check(lb.getThickness(), 1);
+    harness.check(lb.getLineColor(), MetalLookAndFeel.getFocusColor());
     harness.check(defaults.get("List.focusInputMap") instanceof InputMapUIResource);
     harness.check(defaults.get("List.focusInputMap.RightToLeft") instanceof InputMapUIResource);
     harness.check(defaults.get("List.font"), new FontUIResource("Dialog", Font.BOLD, 12));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]