//Ignore extra messages.
if (aEvent.getValueIsAdjusting()) {
return;
}
final ListSelectionModel lsm = (ListSelectionModel) aEvent.getSource();
if (lsm.isSelectionEmpty()) {
mDetails.setText("Nothing selected");
} else {
final int selectedRow = lsm.getMinSelectionIndex();
final EventDetails e = mModel.getEventDetails(selectedRow);
final Object[] args =
{
new Date(e.getTimeStamp()),
e.getPriority(),
escape(e.getThreadName()),
escape(e.getNDC()),
escape(e.getCategoryName()),
escape(e.getLocationDetails()),
escape(e.getMessage()),
escape(getThrowableStrRep(e))
};
mDetails.setText(FORMATTER.format(args));
mDetails.setCaretPosition(0);
}