public abstract class CheckBoxListCellRenderer<HL extends HasLabel> extends Object implements ListCellRenderer<Object>, Serializable
Implementation Note:
This class overrides
invalidate,
validate,
revalidate,
repaint,
isOpaque,
and
firePropertyChange
solely to improve performance.
If not overridden, these frequently called methods would execute code paths
that are unnecessary for the default list cell renderer.
If you write your own renderer,
take care to weigh the benefits and
drawbacks of overriding these methods.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the java.beans package.
Please see XMLEncoder.
| Modifier and Type | Class and Description |
|---|---|
protected class |
CheckBoxListCellRenderer.CheckBoxListCellRendererCheckBox |
protected class |
CheckBoxListCellRenderer.CheckBoxListCellRendererLabel |
static class |
CheckBoxListCellRenderer.UIResource
A subclass of DefaultListCellRenderer that implements UIResource.
|
| Modifier and Type | Field and Description |
|---|---|
protected CheckBoxListCellRenderer.CheckBoxListCellRendererCheckBox |
checkbox |
protected CheckBoxListCellRenderer.CheckBoxListCellRendererLabel |
label |
protected static Border |
noFocusBorder |
| Constructor and Description |
|---|
CheckBoxListCellRenderer()
Constructs a default renderer object for an item
in a list.
|
| Modifier and Type | Method and Description |
|---|---|
Component |
getListCellRendererComponent(JList<?> list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus) |
protected abstract boolean |
isCheckBoxSelected(Object value) |
protected static Border noFocusBorder
protected CheckBoxListCellRenderer.CheckBoxListCellRendererLabel label
protected CheckBoxListCellRenderer.CheckBoxListCellRendererCheckBox checkbox
public CheckBoxListCellRenderer()
protected abstract boolean isCheckBoxSelected(Object value)
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)
getListCellRendererComponent in interface ListCellRenderer<Object>Copyright © 2014–2016 CodeLutin. All rights reserved.