Package javax.swing.plaf.metal

Examples of javax.swing.plaf.metal.DefaultMetalTheme$FontDelegate


   * 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.getSeparatorForeground();
    harness.check(c, new ColorUIResource(new Color(102, 102, 153)));

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

    c = MetalLookAndFeel.getSeparatorForeground();
    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.getPrimaryControl();
    harness.check(c, new ColorUIResource(new Color(204, 204, 255)));

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

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

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

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

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

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

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

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

    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getWhite() {
        return new ColorUIResource(Color.red);
      }
    });
    white = MetalLookAndFeel.getWhite();
    harness.check(white, 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.getControlDarkShadow();
    harness.check(c, new ColorUIResource(new Color(102, 102, 102)));

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

    c = MetalLookAndFeel.getControlDarkShadow();
    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 black = MetalLookAndFeel.getBlack();
    harness.check(black, new ColorUIResource(Color.black));
 
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
      public ColorUIResource getBlack() {
          return new ColorUIResource(Color.red);
      }
    });
   
    black = MetalLookAndFeel.getBlack();
    harness.check(black, 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.getMenuDisabledForeground();
    harness.check(c, new ColorUIResource(new Color(153, 153, 153)));

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

    c = MetalLookAndFeel.getMenuDisabledForeground();
    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.getControlTextFont();
    harness.check(f, new FontUIResource("Dialog", Font.BOLD, 12));

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

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

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

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.