* FYI: BasicButtonUI.defaultTextIconGap test updated to 1.5
@ 2006-02-01 14:24 David Gilbert
0 siblings, 0 replies; only message in thread
From: David Gilbert @ 2006-02-01 14:24 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
I updated this test to JDK 1.5 as the behaviour seems to have changed:
2006-02-01 David Gilbert <david.gilbert@object-refinery.com>
*
gnu/testlet/javax/swing/plaf/basic/BasicButtonUI/defaultTextIconGap.java
(test): Updated expected results and test tag to JDK1.5.
Regards,
Dave
[-- Attachment #2: diff.txt --]
[-- Type: text/plain, Size: 1893 bytes --]
Index: gnu/testlet/javax/swing/plaf/basic/BasicButtonUI/defaultTextIconGap.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/basic/BasicButtonUI/defaultTextIconGap.java,v
retrieving revision 1.1
diff -u -r1.1 defaultTextIconGap.java
--- gnu/testlet/javax/swing/plaf/basic/BasicButtonUI/defaultTextIconGap.java 2 Oct 2005 06:32:16 -0000 1.1
+++ gnu/testlet/javax/swing/plaf/basic/BasicButtonUI/defaultTextIconGap.java 1 Feb 2006 14:20:11 -0000
@@ -1,6 +1,6 @@
-// Tags: JDK1.2
+// Tags: JDK1.5
-// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.com>
+// Copyright (C) 2005, 2006 David Gilbert <david.gilbert@object-refinery.com>
// This file is part of Mauve.
@@ -26,6 +26,10 @@
import gnu.testlet.Testlet;
import javax.swing.JButton;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.plaf.metal.DefaultMetalTheme;
+import javax.swing.plaf.metal.MetalLookAndFeel;
/**
* Checks the defaultTextIconGap field.
@@ -40,13 +44,25 @@
*/
public void test(TestHarness harness)
{
+ // test with DefaultMetalTheme
+ try
+ {
+ MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
+ UIManager.setLookAndFeel(new MetalLookAndFeel());
+ }
+ catch (UnsupportedLookAndFeelException e)
+ {
+ e.printStackTrace();
+ }
+
// at first the field value is 0
MyBasicButtonUI ui = new MyBasicButtonUI();
harness.check(ui.getDefaultTextIconGapField(), 0);
// the field value is updated after a call to installUI()
+ // UPDATE: in JDK1.5, it seems this update no longer happens
ui.installUI(new JButton());
- harness.check(ui.getDefaultTextIconGapField(), 4);
+ harness.check(ui.getDefaultTextIconGapField(), 0 /* 4 */);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-01 14:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-01 14:24 FYI: BasicButtonUI.defaultTextIconGap test updated to 1.5 David Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).