DefaultMutableTreeNode node = null;
DefaultMutableTreeNode leaf = null;
DefaultMutableTreeNode top = (DefaultMutableTreeNode) getModel()
.getRoot();
libView = new LibView("Bibliothek", gui.getCore());
node = new DropTreeNode(libView);
top.add(node);
gui.setView(libView);
node = new DropTreeNode(new QueueView("Warteschlange", gui.getCore()),
true);
top.add(node);
queueTable = ((QueueView) node.getUserObject()).getTrackTable();
node = new DropTreeNode("Fehlerhafte Dateien");
top.add(node);
node = new DropTreeNode(new TaggerView("Tagger", gui.getCore()), true);
top.add(node);
node = new DropTreeNode("Wiedergabelisten");
playlistsNode = node;
top.add(node);
popupMenu = new TreePopupMenu(this);
ResultSet rs = null;
try {
getAllPlaylistsStmt = PhoenixCore.DBCON.prepareOnLib("select id, name from playlists order by lower(name) asc");
rs = getAllPlaylistsStmt.executeQuery();
} catch (SQLException e1) {
e1.printStackTrace();
}
try {
while (rs.next()) {
leaf = new DropTreeNode(new PlaylistView(gui.getCore(),rs.getInt("id"), rs.getString("name")), true);
node.add(leaf);
}
rs.close();
} catch (SQLException e) {
e.printStackTrace();