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

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

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

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

    c = MetalLookAndFeel.getHighlightedTextColor();
    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) {
    DefaultMetalTheme theme = new DefaultMetalTheme();
    MetalLookAndFeel.setCurrentTheme(theme);
    ColorUIResource c = MetalLookAndFeel.getAcceleratorForeground();
    harness.check(c, theme.getAcceleratorForeground());

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

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

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

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

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

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

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

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

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

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

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

    c = MetalLookAndFeel.getWindowTitleBackground();
    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

  public void test(TestHarness harness)     
  {
    // this test is theme-dependent
    try
      {
        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        UIManager.setLookAndFeel(new MetalLookAndFeel());
      }
    catch (UnsupportedLookAndFeelException e)
      {
        // ignore
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.getAcceleratorSelectedForeground();
    harness.check(c, new ColorUIResource(Color.black));

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

    c = MetalLookAndFeel.getAcceleratorSelectedForeground();
    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$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.