ListCellRendererUtils.applyDefaultDisplaySettings(list, index, isSelected, cellHasFocus, this);
if (!(value instanceof TicketChange)) {
throw new IllegalArgumentException("value must be TicketChange instance");
}
TicketChange change = (TicketChange) value;
ResourceBundle bundle = BundleLocator.getBundle();
DateFormat format = new SimpleDateFormat(bundle.getString("tool_window.tickets.ticket_editor.change_history.date_format"));
StringBuilder text = new StringBuilder(MessageFormat.format(bundle.getString("tool_window.tickets.ticket_editor.change_history.change_header"), format.format(change.getTime()), change.getAuthor()));
if (TicketChange.COMMENT.equals(change.getField())) {
text.append(bundle.getString("tool_window.tickets.ticket_editor.change_history.added_comment"));
} else {
text.append(MessageFormat.format(bundle.getString("tool_window.tickets.ticket_editor.change_history.change_info"), change.getField(), change.getOldValue(), change.getNewValue()));
}
setText(text.toString());
return this;