public class KListModelListCellRenderer extends AbstractCellRenderer
ListCellRenderer
for use with
JList
s that are connected to a ITreeModel
via
a TreeModelListAdapter
. This cell renderer consults the tree
model for a cell's rendering information, such as its label and icon.JList
,
KListModel
,
KListModelAdapter
Modifier and Type | Field and Description |
---|---|
private EmptyBorder |
emptyBorder |
private JLabel |
label |
private KListModel |
model |
Constructor and Description |
---|
KListModelListCellRenderer()
Construct a new
ModelListCellRenderer . |
KListModelListCellRenderer(KListModel model)
Construct a new
ModelListCellRenderer . |
Modifier and Type | Method and Description |
---|---|
JComponent |
getCellRenderer(JComponent component,
Object value,
int row,
int column)
Get the actual renderer component.
|
void |
setModel(KListModel model)
Set the data model for this renderer.
|
getListCellRendererComponent, getTableCellRendererComponent
private EmptyBorder emptyBorder
private KListModel model
public KListModelListCellRenderer()
ModelListCellRenderer
.public KListModelListCellRenderer(KListModel model)
ModelListCellRenderer
.model
- The list model that will be used with this renderer.public void setModel(KListModel model)
model
- The model.public JComponent getCellRenderer(JComponent component, Object value, int row, int column)
AbstractCellRenderer
getCellRenderer
in class AbstractCellRenderer
component
- The JList
or JTable
for which
the renderer is being requested.value
- The value to render.row
- The row in the table or index in the list of the cell being
rendered.column
- The column in the table of the cell being rendered, (or 0
if a list).WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses