@Override
public Component getListCellRendererComponent(
JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
DcObjectListElement c = (DcObjectListElement) value;
IViewComponent vc = (IViewComponent) list;
if (render && !vc.isIgnoringPaintRequests()) {
c.setFont(ComponentFactory.getStandardFont());
c.load();
if (c.getDcObject() != null) {
if (c.getDcObject().getModule().canBeLend()) {
Long daysTillOverdue = (Long) c.getDcObject().getValue(DcObject._SYS_LOANDAYSTILLOVERDUE);
if (daysTillOverdue != null && daysTillOverdue.longValue() < 0)
c.setForeground(Color.RED);
}
setElementColor(isSelected, c, index);
}
}