This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
FYI: UIManager.getUI() - minor change
- From: David Gilbert <david dot gilbert at object-refinery dot com>
- To: mauve-patches at sources dot redhat dot com
- Date: Wed, 01 Feb 2006 09:36:12 +0000
- Subject: FYI: UIManager.getUI() - minor change
I added some code to set the MetalLookAndFeel at the end of the test -
the custom look and feel that is installed can interfere with tests run
subsequent to this one:
2006-02-01 David Gilbert <david.gilbert@object-refinery.com>
* gnu/testlet/javax/swing/UIManager/getUI.java
(test): Set MetalLookAndFeel at end of test.
Regards,
Dave
Index: gnu/testlet/javax/swing/UIManager/getUI.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/UIManager/getUI.java,v
retrieving revision 1.2
diff -u -r1.2 getUI.java
--- gnu/testlet/javax/swing/UIManager/getUI.java 3 Jan 2006 19:03:15 -0000 1.2
+++ gnu/testlet/javax/swing/UIManager/getUI.java 1 Feb 2006 09:31:33 -0000
@@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Mauve; see the file COPYING. If not, write to
-// the Free Software Foundation, 59 Temple Place - Suite 330,
-// Boston, MA 02111-1307, USA. */
+// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301 USA.
package gnu.testlet.javax.swing.UIManager;
@@ -24,7 +24,9 @@
import javax.swing.JLabel;
import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.LabelUI;
+import javax.swing.plaf.metal.MetalLookAndFeel;
/**
* Some checks for the getUI() method in the
@@ -59,5 +61,16 @@
TestLabel l = new TestLabel();
UIManager.getUI(l);
harness.check(TestLabelUI.installUICalled, false);
+
+ // restore a sane look and feel
+ try
+ {
+ UIManager.setLookAndFeel(new MetalLookAndFeel());
+ }
+ catch (UnsupportedLookAndFeelException e)
+ {
+ e.printStackTrace();
+ }
+
}
}