Package view.views

Examples of view.views.PlaylistView


      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();
View Full Code Here


        rs.close();
      } catch (SQLException e) {
        e.printStackTrace();
      }
      DropTreeNode node = new DropTreeNode(new PlaylistView(gui.getCore(),newListID, input), true);
      ((DefaultTreeModel)getModel()).insertNodeInto(node, playlistsNode, playlistsNode.getChildCount());
      setSelectionPath(new TreePath(node.getPath()));
      setSelectionRow(0);
    }
  }
View Full Code Here

    return true;
  }

  public void deletePlaylist() {
    DefaultMutableTreeNode node = ((DefaultMutableTreeNode)getLastSelectedPathComponent());
    PlaylistView pl = ((PlaylistView)node.getUserObject());
    int id = pl.getPlaylistID();
    if (JOptionPane.YES_OPTION==JOptionPane.showConfirmDialog(null, "Soll die Playlist \""+pl.getPlaylistName()+"\" wirklich gelöscht werden?", "Sicher?", JOptionPane.YES_NO_OPTION)) {
      PhoenixCore.DBCON.deleteOnLib("delete from playlist_track where listid="+id);
      PhoenixCore.DBCON.deleteOnLib("delete from playlists where id="+id);
      ((DefaultTreeModel)getModel()).removeNodeFromParent(node);
      setSelectionRow(0);
    }
View Full Code Here

      return;
    }else if (!isValidPlaylistName(input)) {//sonderzeichen?
      JOptionPane.showMessageDialog(null, "Sonderzeichen sind nicht erlaubt.", "Operation Abgebrochen", JOptionPane.INFORMATION_MESSAGE);
    }else{//gültig, also:
      DropTreeNode node = ((DropTreeNode)getLastSelectedPathComponent());
      PlaylistView pl = ((PlaylistView)node.getUserObject());
      int id = pl.getPlaylistID();
      PhoenixCore.DBCON.deleteOnLib("update playlists set name='"+input+"' where id="+id);
      pl.setPlaylistName(input);
      node.setUserObject(pl);
      ((DefaultTreeModel)getModel()).nodeChanged(node);
    }
  }
View Full Code Here

TOP

Related Classes of view.views.PlaylistView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.