public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value,
index, isSelected, cellHasFocus);
Session session = (Session) value;
StringBuilder text = new StringBuilder();
text.append("<html>");
text.append(String.format("<strong>%s</strong> ", session.getName()));
text.append(String.format(tr("%d file(s)"), session.getFileNames()
.size()));
text.append("<br />");
for (String fileName : session.getFileNames()) {
text.append(String.format("- %s<br />", fileName));
}
text.append("</html>");
label.setText(text.toString());