Package javax.swing.plaf.metal

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());
    ColorUIResource c = MetalLookAndFeel.getPrimaryControlInfo();
    harness.check(c, new ColorUIResource(Color.black));

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getPrimaryControlInfo() {
        return new ColorUIResource(Color.red);
      }
    });

    c = MetalLookAndFeel.getPrimaryControlInfo();
    harness.check(c, new ColorUIResource(Color.red));
   
    // reset the theme so that other tests won't be affected
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

  }
View Full Code Here


   * 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());
    ColorUIResource c = MetalLookAndFeel.getMenuSelectedForeground();
    harness.check(c, new ColorUIResource(Color.black));

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getMenuSelectedForeground() {
        return new ColorUIResource(Color.red);
      }
    });

    c = MetalLookAndFeel.getMenuSelectedForeground();
    harness.check(c, new ColorUIResource(Color.red));  
   
    // reset the theme so that other tests won't be affected
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

  }
View Full Code Here

   * 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());
    ColorUIResource c = MetalLookAndFeel.getWindowBackground();
    harness.check(c, new ColorUIResource(Color.white));

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getWindowBackground() {
        return new ColorUIResource(Color.red);
      }
    });

    c = MetalLookAndFeel.getWindowBackground();
    harness.check(c, new ColorUIResource(Color.red))
   
    // reset the theme so that other tests won't be affected
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

   }
View Full Code Here

   * 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());
    ColorUIResource c = MetalLookAndFeel.getMenuForeground();
    harness.check(c, new ColorUIResource(Color.black));

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getMenuForeground() {
        return new ColorUIResource(Color.red);
      }
    });

    c = MetalLookAndFeel.getMenuForeground();
    harness.check(c, new ColorUIResource(Color.red))
   
    // reset the theme so that other tests won't be affected
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

  }
View Full Code Here

   * 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());
    ColorUIResource c = MetalLookAndFeel.getControlTextColor();
    harness.check(c, new ColorUIResource(Color.black));

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getControlTextColor() {
        return new ColorUIResource(Color.red);
      }
    });

    c = MetalLookAndFeel.getControlTextColor();
    harness.check(c, new ColorUIResource(Color.red));
   
    // reset the theme so that other tests won't be affected
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

  }
View Full Code Here

   * 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());
    ColorUIResource c = MetalLookAndFeel.getPrimaryControlShadow();
    harness.check(c, new ColorUIResource(new Color(153, 153, 204)));

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getPrimaryControlShadow() {
        return new ColorUIResource(Color.red);
      }
    });

    c = MetalLookAndFeel.getPrimaryControlShadow();
    harness.check(c, new ColorUIResource(Color.red))
   
    // reset the theme so that other tests won't be affected
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

  }
View Full Code Here

   * 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.getSubTextFont();
    harness.check(f, new FontUIResource("Dialog", Font.PLAIN, 10));

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

    f = MetalLookAndFeel.getSubTextFont();
    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

   * 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());
    ColorUIResource c = MetalLookAndFeel.getUserTextColor();
    harness.check(c, new ColorUIResource(Color.black));

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getUserTextColor() {
        return new ColorUIResource(Color.red);
      }
    });

    c = MetalLookAndFeel.getUserTextColor();
    harness.check(c, new ColorUIResource(Color.red));
   
    // reset the theme so that other tests won't be affected
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

  }
View Full Code Here

   * 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.getSystemTextFont();
    harness.check(f, new FontUIResource("Dialog", Font.PLAIN, 12));

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

    f = MetalLookAndFeel.getSystemTextFont();
    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

   * 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());
    ColorUIResource c = MetalLookAndFeel.getMenuSelectedBackground();
    harness.check(c, new ColorUIResource(new Color(153, 153, 204)));

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getMenuSelectedBackground() {
        return new ColorUIResource(Color.red);
      }
    });

    c = MetalLookAndFeel.getMenuSelectedBackground();
    harness.check(c, new ColorUIResource(Color.red))
   
    // reset the theme so that other tests won't be affected
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

  }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.metal.DefaultMetalTheme

Copyright © 2018 www.massapicom. 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.