T
- the type of the objects to be rendered in the list.public abstract class SuperListCellRenderer<T>
extends java.lang.Object
implements javax.swing.ListCellRenderer
AttributedString
,
TextAttribute
,
AttributedStringBuilder
Modifier and Type | Field and Description |
---|---|
protected static javax.swing.border.Border |
noFocusBorder |
Constructor and Description |
---|
SuperListCellRenderer() |
Modifier and Type | Method and Description |
---|---|
protected void |
cellSetup(javax.swing.JList list,
T value,
int index,
boolean isSelected,
boolean cellHasFocus) |
Tuple<javax.swing.Icon,java.text.AttributedString> |
getCellContent(javax.swing.JList list,
T value,
int index,
boolean isSelected,
boolean cellHasFocus)
Deprecated.
use getCellIcon, getCellText to supply cell contents.
|
javax.swing.Icon |
getCellIcon(javax.swing.JList list,
T value,
int index,
boolean isSelected,
boolean cellHasFocus) |
java.text.AttributedString |
getCellText(javax.swing.JList list,
T value,
int index,
boolean isSelected,
boolean cellHasFocus)
Get the text content of the cell as an AttributedString.
|
javax.swing.JComponent |
getListCellRendererComponent(javax.swing.JList list,
java.lang.Object value,
int index,
boolean isSelected,
boolean cellHasFocus) |
static void |
main(java.lang.String[] args)
Starts a small app that simply demonstrates this class
|
public javax.swing.JComponent getListCellRendererComponent(javax.swing.JList list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)
getListCellRendererComponent
in interface javax.swing.ListCellRenderer
public Tuple<javax.swing.Icon,java.text.AttributedString> getCellContent(javax.swing.JList list, T value, int index, boolean isSelected, boolean cellHasFocus)
Clients should not us this method, but instead use getCellIcon/getCellText.
public javax.swing.Icon getCellIcon(javax.swing.JList list, T value, int index, boolean isSelected, boolean cellHasFocus)
public java.text.AttributedString getCellText(javax.swing.JList list, T value, int index, boolean isSelected, boolean cellHasFocus)
protected void cellSetup(javax.swing.JList list, T value, int index, boolean isSelected, boolean cellHasFocus)
public static void main(java.lang.String[] args)
args
-