Icon (final Object value, final int index) { if (value instanceof CustomPresentation) { return ((CustomPresentation)value).getIcon(index, 0); } if (value instanceof Iconable) { return ((Iconable)value).getIcon(0); } return null; }