com.alee.extended.list
Class WebCheckBoxListCellRenderer

java.lang.Object
  extended by com.alee.extended.list.WebCheckBoxListCellRenderer
All Implemented Interfaces:
javax.swing.ListCellRenderer

public class WebCheckBoxListCellRenderer
extends java.lang.Object
implements javax.swing.ListCellRenderer

Custom default checkbox list cell renderer for WebLookAndFeel.

Author:
Mikle Garin

Field Summary
protected  java.util.Map<java.lang.String,WebCheckBoxListElement> elements
          Checkbox list elements cache.
 
Constructor Summary
WebCheckBoxListCellRenderer()
          Constructs default checkbox list cell renderer.
 
Method Summary
 WebCheckBoxListElement getElement(CheckBoxCellData data)
          Returns cached checkbox element for specified data.
 java.awt.Component getListCellRendererComponent(javax.swing.JList list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)
          Returns list cell renderer component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elements

protected java.util.Map<java.lang.String,WebCheckBoxListElement> elements
Checkbox list elements cache.

Constructor Detail

WebCheckBoxListCellRenderer

public WebCheckBoxListCellRenderer()
Constructs default checkbox list cell renderer.

Method Detail

getListCellRendererComponent

public java.awt.Component getListCellRendererComponent(javax.swing.JList list,
                                                       java.lang.Object value,
                                                       int index,
                                                       boolean isSelected,
                                                       boolean cellHasFocus)
Returns list cell renderer component.

Specified by:
getListCellRendererComponent in interface javax.swing.ListCellRenderer
Parameters:
list - tree
value - cell value
index - cell index
isSelected - whether cell is selected or not
cellHasFocus - whether cell has focus or not
Returns:
cell renderer component

getElement

public WebCheckBoxListElement getElement(CheckBoxCellData data)
Returns cached checkbox element for specified data.

Parameters:
data - data to process
Returns:
cached checkbox element