Package javax.swing.tree

Examples of javax.swing.tree.DefaultTreeCellRenderer


public class getDefaultOpenIcon implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    harness.check(r.getDefaultOpenIcon(), UIManager.get("Tree.openIcon"));
    UIManager.put("Tree.openIcon", MetalIconFactory.getCheckBoxIcon());
    harness.check(r.getDefaultOpenIcon(), MetalIconFactory.getCheckBoxIcon());
  }
View Full Code Here


public class constructor implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    harness.check(r.getLeafIcon(), r.getDefaultLeafIcon());
  }
View Full Code Here

public class getClosedIcon implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    harness.check(r.getClosedIcon(), r.getDefaultClosedIcon());
    r.setClosedIcon(null);
    harness.check(r.getClosedIcon(), null);
  }
View Full Code Here

public class getDefaultClosedIcon implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    harness.check(r.getDefaultClosedIcon(), UIManager.get("Tree.closedIcon"));
    UIManager.put("Tree.closedIcon", MetalIconFactory.getCheckBoxIcon());
    harness.check(r.getDefaultClosedIcon(), MetalIconFactory.getCheckBoxIcon());
  }
View Full Code Here

public class getBackgroundNonSelectionColor implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    harness.check(r.getBackgroundNonSelectionColor(), UIManager.getColor(
            "Tree.textBackground"));
    r.setBackgroundNonSelectionColor(null);
    harness.check(r.getBackgroundNonSelectionColor(), null);
   
    UIManager.put("Tree.textBackground", Color.red);
    DefaultTreeCellRenderer r2 = new DefaultTreeCellRenderer();
    harness.check(r2.getBackgroundNonSelectionColor(), Color.red);
  }
View Full Code Here

public class getBorderSelectionColor implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    harness.check(r.getBorderSelectionColor(), UIManager.getColor(
            "Tree.selectionBorderColor"));
    r.setBorderSelectionColor(null);
    harness.check(r.getBorderSelectionColor(), null);
  }
View Full Code Here

public class getOpenIcon implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    harness.check(r.getOpenIcon(), r.getDefaultOpenIcon());
    r.setOpenIcon(null);
    harness.check(r.getOpenIcon(), null);
  }
View Full Code Here

    lastEvent = e;
  }

  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    r.addPropertyChangeListener(this);
    harness.check(r.getBorderSelectionColor(), UIManager.getColor(
            "Tree.selectionBorderColor"));
    r.setBorderSelectionColor(Color.yellow);
    harness.check(r.getBorderSelectionColor(), Color.yellow);
    harness.check(lastEvent, null);
    r.setBorderSelectionColor(null);
    harness.check(r.getBorderSelectionColor(), null);
    harness.check(lastEvent, null);
  }
View Full Code Here

public class getDefaultLeafIcon implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    harness.check(r.getDefaultLeafIcon(), UIManager.get("Tree.leafIcon"));
    UIManager.put("Tree.leafIcon", MetalIconFactory.getCheckBoxIcon());
    harness.check(r.getDefaultLeafIcon(), MetalIconFactory.getCheckBoxIcon());
  }
View Full Code Here

    lastEvent = e;
  }

  public void test(TestHarness harness)
  {
    DefaultTreeCellRenderer r = new DefaultTreeCellRenderer();
    r.addPropertyChangeListener(this);
    harness.check(r.getOpenIcon(), r.getDefaultOpenIcon());
    r.setOpenIcon(MetalIconFactory.getRadioButtonIcon());
    harness.check(r.getOpenIcon(), MetalIconFactory.getRadioButtonIcon());
    harness.check(lastEvent, null);
    r.setOpenIcon(null);
    harness.check(r.getOpenIcon(), null);
    harness.check(lastEvent, null);
  }
View Full Code Here

TOP

Related Classes of javax.swing.tree.DefaultTreeCellRenderer

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.