northPn.add(mAvailableSeparator, BorderLayout.NORTH);
northPn.add(mSubscribedSeparator, BorderLayout.NORTH);
// left list box
JPanel listBoxPnLeft = new JPanel(new BorderLayout());
mAllChannels = new ChannelJList(new DefaultListModel());
mAllChannels.setCellRenderer(new ChannelListCellRenderer(true, true, true, true));
listBoxPnLeft.add(new JScrollPane(mAllChannels), BorderLayout.CENTER);
/*
mAllChannels.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if ((mAllChannels.getModel().getSize() == 1)
&& (mAllChannels.getSelectedIndex() >= 0)
&& (mAllChannels.getSelectedValue() instanceof String)) {
mAllChannels.setSelectedIndices(new int[] {});
}
}
});
*/
centerPn.add(listBoxPnLeft);
mRightButton = new JButton(TVBrowserIcons.right(TVBrowserIcons.SIZE_LARGE));
mRightButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
moveChannelsToRight();
}
});
mLeftButton = new JButton(TVBrowserIcons.left(TVBrowserIcons.SIZE_LARGE));
mLeftButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
moveChannelsToLeft();
}
});
JPanel btnPanel = createButtonPn(mRightButton, mLeftButton);
btnPanel.setBorder(BorderFactory.createEmptyBorder(0, Sizes
.dialogUnitXAsPixel(3, btnPanel), 0, Sizes.dialogUnitXAsPixel(3,
btnPanel)));
listBoxPnLeft.add(btnPanel, BorderLayout.EAST);
// right list box
JPanel listBoxPnRight = new JPanel(new BorderLayout());
SortableItemList channelList = new SortableItemList(new ChannelJList());
mSubscribedChannels = channelList.getList();
mFilter = new ChannelFilter();
mSubscribedChannels.setCellRenderer(new FilteredChannelListCellRenderer(mFilter));