Examples of DefaultMetalTheme


Examples of javax.swing.plaf.metal.DefaultMetalTheme

* Runs the test using the specified harness.
*
* @param harness  the test harness (<code>null</code> not permitted).
*/
  public void test(TestHarness harness) {
  MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
    FontUIResource f = MetalLookAndFeel.getUserTextFont();
    harness.check(f, new FontUIResource("Dialog", Font.PLAIN, 12));

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public FontUIResource getUserTextFont() {
        return new FontUIResource("Dialog", Font.PLAIN, 99);
      }
    });

    f = MetalLookAndFeel.getUserTextFont();
    harness.check(f, new FontUIResource("Dialog", Font.PLAIN, 99));

    // reset the theme so that other tests won't be affected
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.