*
* @param harness the test harness (<code>null</code> not permitted).
*/
public void test(TestHarness harness)
{
DefaultMetalTheme t = new DefaultMetalTheme();
FontUIResource f = t.getControlTextFont();
harness.check(f, new FontUIResource("Dialog", Font.BOLD, 12));
FontUIResource f2 = t.getControlTextFont();
harness.check(f == f2);
// setting defaults property doesn't affect already created themes...
UIManager.put("swing.boldMetal", Boolean.FALSE);
f = t.getControlTextFont();
harness.check(f, new FontUIResource("Dialog", Font.BOLD, 12));
// ...but is picked up by new themes
DefaultMetalTheme t2 = new DefaultMetalTheme();
f = t2.getControlTextFont();
harness.check(f, new FontUIResource("Dialog", Font.PLAIN, 12));
// set it to true
UIManager.put("swing.boldMetal", Boolean.TRUE);
DefaultMetalTheme t3 = new DefaultMetalTheme();
f = t3.getControlTextFont();
harness.check(f, new FontUIResource("Dialog", Font.BOLD, 12));
// clear it again
UIManager.put("swing.boldMetal", null);
DefaultMetalTheme t4 = new DefaultMetalTheme();
f = t4.getControlTextFont();
harness.check(f, new FontUIResource("Dialog", Font.BOLD, 12));
}