Class MessageCellRenderer
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----javax.swing.JComponent
|
+----javax.swing.JLabel
|
+----MessageCellRenderer
- public class MessageCellRenderer
- extends JLabel
- implements ListCellRenderer
MessageCellRenderer - Class built to handle the implementation of the
renderer for UserName data objects. This allows the data objects to
be rendered into a list format convenient for making selectios from.
- Author:
- Jayme Manning, Paul Kronenwetter
-
MessageCellRenderer(JList)
- MessageCellRenderer - Constructor used to setup the data objects
for our class.
-
MessageCellRenderer(JList, Color, Color, Color, Color)
- MessageCellRenderer - Constructor used to setup the data objects
for our class.
-
getListCellRendererComponent(JList, Object, int, boolean, boolean)
- getListCellRendererComponent - Method used to return the
ListCellRenderer for this list.
MessageCellRenderer
public MessageCellRenderer(JList newBox)
- MessageCellRenderer - Constructor used to setup the data objects
for our class.
- Parameters:
- newBox - JList to render the cells to.
MessageCellRenderer
public MessageCellRenderer(JList newBox,
Color sb1,
Color sf1,
Color db1,
Color df1)
- MessageCellRenderer - Constructor used to setup the data objects
for our class.
- Parameters:
- newBox - JList to render the cells to.
- sb1 - Color to render the selected background as.
- sf1 - Color to render the selected foreground as.
- db1 - Color to render the default background as.
- df1 - Color to render the default foreground as.
getListCellRendererComponent
public Component getListCellRendererComponent(JList listbox,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
- getListCellRendererComponent - Method used to return the
ListCellRenderer for this list.
- Parameters:
- listbox - The JList to be rendered to.
- value - The object that will be rendered.
- index - Where we are in the list.
- isSelected - Is this object currently selected.
- cellHasFocus - Does this object currently have the focus.
- Returns:
- Component - The renderable component.