Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  *  Copyright (c) 2011 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the GNU Lesser Public License v2.1
  *  which accompanies this distribution, and is available at
  *  http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  *
  *  Contributors:
  *      Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany - RMI Client, FileChooser and WebDAV
 */
package de.ipk_gatersleben.bit.bi.edal.rmi.client.util;
	private static final long serialVersionUID = 1L;
	private static final Color TABLE_GRID_COLOR = new Color(0xd9d9d9);
	private static final Color TABLE_selectionForeground = new Color(51,51,51);
	private static final Color TABLE_selectionBackground = new Color(184,207,229);
	private final TreeCellRenderer renderer;
        this. = renderer;
    }
    @Override
            JTree treeObject valueboolean isSelectedboolean expanded,
            boolean leafint rowboolean hasFocus) {
                treevalueisSelectedexpandedleafrowhasFocus);
        
        if(isSelected && !hasFocus)
        {
        	c.setOpaque(true);
        	c.setBackground();
        }
        else if(isSelected && hasFocus)
        {
        	c.setOpaque(true);
            c.setForeground();
            c.setBackground();
        }
        else
        {
        	c.setOpaque(true);
        	
        }
        
        return c;
    }
New to GrepCode? Check out our FAQ X