/*
 * StyleCellRenderer.java
 *
 * Created on March 22, 2006, 4:44 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package it.businesslogic.ireport.gui.style;

import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JComponent;
import javax.swing.JList;

/**
 *
 * @author gtoffoli
 */
public class StyleCellRenderer extends DefaultListCellRenderer {
    
    /** Creates a new instance of StyleCellRenderer */
    public StyleCellRenderer() {
        super();
    }
    
    public Component getListCellRendererComponent(
         JList list,
         Object value,
         int index,
         boolean isSelected,
         boolean cellHasFocus)
     {
         Component c = super.getListCellRendererComponent(list,value,index,isSelected,cellHasFocus);
         ((JComponent)c).setOpaque(isSelected);
         return c;
     }
   
}
