Package com.groovesquid.model

Examples of com.groovesquid.model.Song


        HashMap<String, Object>[] result = gson.fromJson(Grooveshark.sendRequest("albumGetAllSongs", new HashMap(){{
            put("albumID", album.getId());
        }}), AlbumResponse.class).getResult();

        for (HashMap<String, Object> hm : result) {
            songs.add(new Song(
                hm.get("SongID"),
                hm.get("Name"),
                hm.get("ArtistID"),
                hm.get("ArtistName"),
                hm.get("AlbumID"),
View Full Code Here


        if(result.length < 1) {
            JOptionPane.showMessageDialog(Main.getGui(), "No search results for \"" + searchQuery + "\".");
        }

        for (HashMap<String, Object> hm : result) {
            songs.add(new Song(
                hm.get("SongID"),
                hm.get("SongName"),
                hm.get("ArtistID"),
                hm.get("ArtistName"),
                hm.get("AlbumID"),
View Full Code Here

        if(result.length < 1) {
            JOptionPane.showMessageDialog(Main.getGui(), "No search results.");
        }

        for (HashMap<String, Object> hm : result) {
            songs.add(new Song(
                hm.get("SongID"),
                hm.get("Name"),
                hm.get("ArtistID"),
                hm.get("ArtistName"),
                hm.get("AlbumID"),
View Full Code Here

        HashMap<String, Object>[] result = gson.fromJson(Grooveshark.sendRequest("albumGetAllSongs", new HashMap<String, Object>(){{
            put("albumID", album.getId());
        }}), AlbumResponse.class).getResult();

        for (HashMap<String, Object> hm : result) {
            songs.add(new Song(
                hm.get("SongID"),
                hm.get("Name"),
                hm.get("ArtistID"),
                hm.get("ArtistName"),
                hm.get("AlbumID"),
View Full Code Here

        }}), PopularResponse.class).getResult().getSongs();
       
        int orderNum=1;
       
        for (HashMap<String, Object> hm : result) {
            songs.add(new Song(
                hm.get("SongID"),
                hm.get("Name"),
                hm.get("ArtistID"),
                hm.get("ArtistName"),
                hm.get("AlbumID"),
View Full Code Here

        HashMap<String, Object>[] result = gson.fromJson(Grooveshark.sendRequest("artistGetArtistSongs", new HashMap<String, Object>(){{
            put("artistID", artist.getId());
        }}), AlbumResponse.class).getResult();

        for (HashMap<String, Object> hm : result) {
            songs.add(new Song(
                hm.get("SongID"),
                hm.get("Name"),
                hm.get("ArtistID"),
                hm.get("ArtistName"),
                hm.get("AlbumID"),
View Full Code Here

        if(result.isEmpty() || result.get("SongID").toString().startsWith("0")) {
            return null;
        }

        Song song = new Song(
            result.get("SongID"),
            result.get("Name"),
            result.get("ArtistID"),
            result.get("ArtistName"),
            result.get("AlbumID"),
View Full Code Here

    public String getColumnName(int col) {
        return columnNames[col];
    }

    public Object getValueAt(int row, int col) {
        Song song = songs.get(row);

        switch (col) {
            case 0: return song.isDownloaded();
            case 1: return song.getName();
            case 2: return song.getArtist().getName();
            case 3: return song.getAlbum().getName();
            case 4: return song.getReadableDuration();
            case 5: return song.getYear();
        }
        return null;
    }
View Full Code Here

                Action download = new AbstractAction() {
                    public void actionPerformed(ActionEvent e) {
                        int modelRow = Integer.valueOf( e.getActionCommand() );
                        DownloadTableModel downloadTableModel = (DownloadTableModel) Main.getGui().getDownloadTable().getModel();
                        SongSearchTableModel songSearchTableModel = (SongSearchTableModel) Main.getGui().getSearchTable().getModel();
                        Song song = songSearchTableModel.getSongs().get(modelRow);
                        downloadTableModel.addRow(0, Services.getDownloadService().download(song, Main.getGui().getDownloadListener(downloadTableModel)));
                    }
                };
                SquidButtonEditor buttonColumn = new SquidButtonEditor(table, download);
               
View Full Code Here

        for (int selectedRow : selectedRows) {
            selectedRow = searchTable.convertRowIndexToModel(selectedRow);
           
            if (searchTable.getModel() instanceof SongSearchTableModel) {
                SongSearchTableModel songSearchTableModel = (SongSearchTableModel) searchTable.getModel();
                Song song = songSearchTableModel.getSongs().get(selectedRow);
                downloadTableModel.addRow(0, Services.getDownloadService().download(song, getDownloadListener(downloadTableModel)));
            } else if (searchTable.getModel() instanceof AlbumSearchTableModel) {
                AlbumSearchTableModel albumSearchTableModel = (AlbumSearchTableModel) searchTable.getModel();
                final Album album = albumSearchTableModel.getAlbums().get(selectedRow);
                SwingWorker<List<Song>, Void> worker = new SwingWorker<List<Song>, Void>(){
View Full Code Here

TOP

Related Classes of com.groovesquid.model.Song

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.