Package javax.swing.plaf

Examples of javax.swing.plaf.ColorUIResource


  public void test(TestHarness harness)
  {
    MyBasicLookAndFeel laf = new MyBasicLookAndFeel();
    UIDefaults defaults = new UIDefaults();
    laf.initSystemColorDefaults(defaults);
    harness.check(defaults.get("activeCaption"), new ColorUIResource(0, 0, 128));
    harness.check(defaults.get("activeCaptionBorder"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("activeCaptionText"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("control"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("controlDkShadow"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("controlHighlight"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("controlLtHighlight"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("controlShadow"), new ColorUIResource(128, 128, 128));
    harness.check(defaults.get("controlText"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("desktop"), new ColorUIResource(0, 92, 92));
    harness.check(defaults.get("inactiveCaption"), new ColorUIResource(128, 128, 128));
    harness.check(defaults.get("inactiveCaptionBorder"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("inactiveCaptionText"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("info"), new ColorUIResource(255, 255, 225));
    harness.check(defaults.get("infoText"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("menu"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("menuText"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("scrollbar"), new ColorUIResource(224, 224, 224));
    harness.check(defaults.get("text"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("textHighlight"), new ColorUIResource(0, 0, 128));
    harness.check(defaults.get("textHighlightText"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("textInactiveText"), new ColorUIResource(128, 128, 128));
    harness.check(defaults.get("textText"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("window"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("windowBorder"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("windowText"), new ColorUIResource(0, 0, 0));
  }
View Full Code Here


  
   * @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

   *
   * @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

   *
   * @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

   *
   * @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

   *
   * @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

   *
   * @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

   *
   * @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

   *
   * @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

   *
   * @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

TOP

Related Classes of javax.swing.plaf.ColorUIResource

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.