private Configuration config = app.getConfiguration();
private PlaylistTabs tabs;
private List<TableColumnModel> columnModels = new LinkedList<TableColumnModel>();
public PlaylistPanel() {
PlaylistManager playlistManager = app.getPlaylistManager();
ArrayList<Playlist> playlists = playlistManager.getPlaylists();
setLayout(new BorderLayout());
tabs = new PlaylistTabs();
add(tabs, BorderLayout.CENTER);
List<String> bounds = PlaylistConfiguration.getTabBounds();
for (int i = 0; i < playlists.size(); i++) {
Playlist pl = playlists.get(i);
PlaylistTable newTable = new PlaylistTable(pl, pl.getColumns());
newTable.setUpDndCCP();
columnModels.add(newTable.getColumnModel());
//try to set last position
try {
String s = bounds.get(i);
Integer y = Integer.valueOf(s);
newTable.scrollRectToVisible(new Rectangle(0, y, 0, 0));
} catch (Exception ignored) {
}
tabs.addTab(pl.getName(), newTable.getScrollPane());
}
final Playlist playlist = playlistManager.getActivePlaylist();
tabs.setSelectedIndex(-1);
tabs.setSelectedIndex(playlists.indexOf(playlist));
PlaybackOrder order = app.getPlayer().getPlaybackOrder();