be.ugent.caagt.swirl.logging
Class JListLogCellRenderer
DefaultListCellRenderer
be.ugent.caagt.swirl.logging.JListLogCellRenderer
public class JListLogCellRenderer
extends DefaultListCellRenderer
JListLogCellRenderer(Formatter formatter) - Create a cell renderer of this type which uses the given formatter.
|
Component | getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
|
protected Color | toForeground(LogRecord record) - Determines the foreground color for the text to be displayed.
|
protected Icon | toIcon(LogRecord record) - Determines the icon to be displayed next to the message.
|
protected String | toText(LogRecord record) - Determines the text to be displayed.
|
JListLogCellRenderer
public JListLogCellRenderer(Formatter formatter)
Create a cell renderer of this type which uses the given formatter.
getListCellRendererComponent
public Component getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
toForeground
protected Color toForeground(LogRecord record)
Determines the foreground color for the text to be displayed.
This implementation uses the standard foreground color for messages
that are less than warnings, orange when less than severe and red otherwise
toIcon
protected Icon toIcon(LogRecord record)
Determines the icon to be displayed next to the message.
This implementation always returns null.
toText
protected String toText(LogRecord record)
Determines the text to be displayed.
This implementation uses the formatter to format the message
stored in the record.