public ComponentCellRenderer(TreeCellRenderer renderer){
  this.renderer=renderer;
  Boolean booleanValue=(Boolean)UIManager.get("Tree.drawsFocusBorderAroundIcon");
  leafRenderer.setFocusPainted((booleanValue != null) && (booleanValue.booleanValue()));
  selectionForeground=UIManager.getColor("Tree.selectionForeground");
  selectionBackground=UIManager.getColor("Tree.selectionBackground");
  textForeground=UIManager.getColor("Tree.textForeground");
  textBackground=UIManager.getColor("Tree.textBackground");
  checkBox=new JCheckBox();
  checkBox.setBackground(UIManager.getColor("Tree.background"));
  checkBox.setBorder(null);
  label=new JLabel();
  label.setBackground(UIManager.getColor("Tree.background"));
  label.setBorder(null);
  panel=new JPanel();
  panel.setOpaque(false);
  panel.add(checkBox);
  panel.add(label);
}

public ComponentCellRenderer ( TreeCellRenderer renderer ) { this . renderer = renderer ; Boolean booleanValue = ( Boolean ) UIManager . get ( "Tree.drawsFocusBorderAroundIcon" ) ; leafRenderer . setFocusPainted ( ( booleanValue != null ) && ( booleanValue . booleanValue ( ) ) ) ; selectionForeground = UIManager . getColor ( "Tree.selectionForeground" ) ; selectionBackground = UIManager . getColor ( "Tree.selectionBackground" ) ; textForeground = UIManager . getColor ( "Tree.textForeground" ) ; textBackground = UIManager . getColor ( "Tree.textBackground" ) ; checkBox = new JCheckBox ( ) ; checkBox . setBackground ( UIManager . getColor ( "Tree.background" ) ) ; checkBox . setBorder ( null ) ; label = new JLabel ( ) ; label . setBackground ( UIManager . getColor ( "Tree.background" ) ) ; label . setBorder ( null ) ; panel = new JPanel ( ) ; panel . setOpaque ( false ) ; panel . add ( checkBox ) ; panel . add ( label ) ; }
instantiates a new component cell renderer .
