}
}
mList = new SelectableItemList(selectedItems.toArray(), allItems);
mList.addCenterRendererComponent(String.class,
new SelectableItemRendererCenterComponentIf() {
private DefaultListCellRenderer mRenderer = new DefaultListCellRenderer();
@Override
public void calculateSize(JList list, int index, JPanel contentPane) {
}
@Override
public JPanel createCenterPanel(JList list, Object value, int index,
boolean isSelected, boolean isEnabled,
JScrollPane parentScrollPane, int leftColumnWidth) {
DefaultListCellRenderer label = (DefaultListCellRenderer) mRenderer
.getListCellRendererComponent(list, value, index, isSelected,
false);
label.setIcon(ProgramInfoHelper.getInfoIcons()[index]);
label.setHorizontalAlignment(SwingConstants.LEADING);
label.setVerticalAlignment(SwingConstants.CENTER);
label.setOpaque(false);
JPanel panel = new JPanel(new BorderLayout());
if (isSelected && isEnabled) {
panel.setOpaque(true);
panel.setForeground(list.getSelectionForeground());