# Class ShaderListCellRenderer

java.lang.Object
uk.ac.starlink.ttools.gui.ShaderListCellRenderer

All Implemented Interfaces:
  `ListCellRenderer<Shader>`

public class ShaderListCellRenderer extends Object implements ListCellRenderer<Shader>
ListCellRenderer suitable for a combo box containing `Shader`s.

Since:
  3 Apr 2008
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`ShaderListCellRenderer(JComboBox<Shader> comboBox)`
Constructs a renderer suitable for use with a combo box containing shaders.

## Method Summary

Modifier and Type
Method
Description
`Component`
`getListCellRendererComponent(JList<? extends Shader> list, Shader shader, int index, boolean isSel, boolean hasFocus)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ShaderListCellRenderer

public ShaderListCellRenderer(JComboBox<Shader> comboBox)
Constructs a renderer suitable for use with a combo box containing shaders. The renderer will listen to the supplied `comboBox`'s properties in order to update its enabledness appropriately.

Parameters:
  `comboBox` - combo box to contain renderer

## Method Details

### getListCellRendererComponent

public Component getListCellRendererComponent(JList<? extends Shader> list, Shader shader, int index, boolean isSel, boolean hasFocus)

Specified by:
  `getListCellRendererComponent` in interface `ListCellRenderer<Shader>`