public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean hasFocus) { Component comp = super.getListCellRendererComponent(list, value, index, isSelected, hasFocus()); if (!(value instanceof GKInstance)) return comp; String text = null; GKInstance instance = (GKInstance) value; text = instance.getDisplayName(); if (text == null || (text != null && text.length() == 0)) { text = instance.getExtendedDisplayName(); } String type = (String) typeMap.get(instance); if (type == DELETE_IN_DB_KEY) setIcon(deleteInDBIcon); else if (type == DELETE_KEY) setIcon(deleteIcon); else if (type == NEW_KEY) setIcon(newInstanceIcon); else if (type == NEW_CHANGE_IN_DB_KEY) setIcon(dbChangeIcon); else if (type == NEW_CHANGE_IN_LOCAL_KEY) setIcon(newChangeIcon); else if (type == CONFLICT_CHANGE_KEY || type == LOCAL_HAS_MORE_IE_KEY) setIcon(conflictIcon); else setIcon(icon); if (text == null) { text = ""; setIcon(null); } setText(text); if (text.length() > 0) setToolTipText(text); else setToolTipText(null); return comp; }