This renderer displays the appropriate icon for the file next to the file name.
Public Member Functions | |
Component | getListCellRendererComponent (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) |
Returns the component that should be used to render the contents of the list cell. | |
Static Private Attributes | |
static final long | serialVersionUID = 1L |
Prevent serialization collisions. |
Component edu.cmu.hcii.calo.view.resources.ResourceListCellRenderer.getListCellRendererComponent | ( | JList | list, | |
Object | value, | |||
int | index, | |||
boolean | isSelected, | |||
boolean | cellHasFocus | |||
) |
Returns the component that should be used to render the contents of the list cell.
In this case, we take the normal cell (which is a JLabel) and add the icon for each resource to the left of the name of the resource.
list | the list being painted | |
value | the Resource represented by this particular cell | |
index | the index of this item in the list | |
isSelected | whether the current cell is selected | |
cellHasFocus | whether the current cell has focus |
final long edu.cmu.hcii.calo.view.resources.ResourceListCellRenderer.serialVersionUID = 1L [static, private] |
Prevent serialization collisions.