Changeset 113

Show
Ignore:
Timestamp:
03/03/07 13:12:52 (2 years ago)
Author:
bfitzpa2
Message:

Website bug fixes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmp/trunk/gwt-windows-1.3.3/.classpath

    r99 r113  
    99        <classpathentry kind="lib" path="C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/xmlrpc-3.0/lib/xmlrpc-client-3.0.jar" sourcepath="C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/xmlrpc-3.0/lib/xmlrpc-client-3.0-sources.jar"/> 
    1010        <classpathentry kind="lib" path="C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/xmlrpc-3.0/lib/xmlrpc-common-3.0.jar" sourcepath="C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/xmlrpc-3.0/lib/xmlrpc-common-3.0-sources.jar"/> 
    11         <classpathentry kind="lib" path="transform-2.1.5/transform.jar" sourcepath="transform-2.1.5/src"> 
     11        <classpathentry kind="lib" path="transform-2.1.5/transform.jar" sourcepath="transform-2.1.5/src/transform"> 
    1212                <attributes> 
    1313                        <attribute name="javadoc_location" value="file:/C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/transform-2.1.5/doc/datasheets/"/> 
  • dmp/trunk/gwt-windows-1.3.3/src/DMP/client/DMPWebsite.java

    r111 r113  
    2828                if(clickText.startsWith("Sort by ")) 
    2929                { 
    30                         collection.sortBy(clickText.substring(8)); 
     30                        collection.sortBy(clickText.substring(8)); //"Sort by " is 8 characters 
    3131                        return; 
    3232                } 
     
    8080                collectionTags.add("Size"); 
    8181                collectionTags.add("Duration"); 
     82                collectionTags.add("Format"); 
    8283                collection.setTagList(collectionTags); 
    8384                collection.setTitle("Song Collection"); 
     
    150151                                        currentMusicDuration = 0; 
    151152                                        Label noSongsLeft = new Label("Click a song to play it."); 
     153                                        flashPanel.clear(); 
    152154                                        flashPanel.add(noSongsLeft); 
    153155                                        return; 
    154156                                } 
    155                                 HTML flash = new HTML("<object width=\"200\" height=\"100\">" + 
     157                                HTML flash = new HTML("<object width=\"200\" height=\"50\">" + 
    156158                                                "<param name=\"movie\" value=\"" + path + "\">" +  
    157                                                 "<embed src=\"" + path + "\" width=\"200\" height=\"100\">" + 
     159                                                "<embed src=\"" + path + "\" width=\"200\" height=\"50\">" + 
    158160                                                "</embed></object>"); 
     161                                flashPanel.clear(); 
    159162                                flashPanel.add(flash); 
    160163                                currentMusicDuration = Double.valueOf((String)song.get("duration")).intValue(); 
     
    164167                                        nextSong.schedule(currentMusicDuration); 
    165168                                } 
    166                                 song.remove("path");  // restores song to how it is stored 
    167                                 playing.removeSong(song); 
     169                                playing.removeSong(song.get("id")); 
    168170                        } 
    169171                        public void onFailure(Throwable caught) 
     
    171173                                caught.printStackTrace(); 
    172174                                Label error = new Label(caught.getMessage()); 
     175                                flashPanel.clear(); 
    173176                                flashPanel.add(error); 
    174177                        } 
     
    199202                public void run() 
    200203                { 
     204                        System.out.println("Playing next song."); 
    201205                        playNextSong(); 
    202206                        this.schedule(currentMusicDuration); 
  • dmp/trunk/gwt-windows-1.3.3/src/DMP/client/SongTable.java

    r108 r113  
    8282        /** 
    8383         * Removes a song from this SongTable 
    84          * @param song song to remove 
    85          */ 
    86         public void removeSong(HashMap song) 
    87         { 
    88                 if(songList.contains(song)) 
    89                 { 
    90                         songList.remove(song); 
    91                 } 
    92                 refillTable(); 
     84         * @param songID the id of the song to remove, get from a song HashMap with song.get("id") 
     85         */ 
     86        public void removeSong(Object songID) 
     87        { 
     88                Iterator it = songList.iterator(); 
     89                while(it.hasNext()) 
     90                { 
     91                        Object songObj = it.next(); 
     92                        HashMap song = (HashMap) songObj; 
     93                        if(songID.equals(song.get("id"))) 
     94                        { 
     95                                songList.remove(songObj); 
     96                                refillTable(); 
     97                                System.out.println("Song " + songID + " removed."); 
     98                                return; 
     99                        } 
     100                } 
    93101        } 
    94102         
  • dmp/trunk/gwt-windows-1.3.3/src/DMP/server/MusicServImpl.java

    r111 r113  
    6464        { 
    6565                playing.add(song); 
    66                 makeFlash(song); 
     66                if(!flashFileHandles.containsKey(song)) 
     67                { 
     68                        makeFlash(song); 
     69                } 
    6770        } 
    6871         
     
    7275                { 
    7376                        playing.remove(song); 
     77                        if(playing.contains(song)) //if there's another copy, keep the file handle 
     78                        { 
     79                                return; 
     80                        } 
    7481                        flashFileHandles.remove(song); 
    7582                } 
     
    129136                try  
    130137                { 
    131                         tempMusicFile = File.createTempFile(songID.toString() + "tmp", ".mp3"); 
     138                        tempMusicFile = File.createTempFile(songID.toString() + "tmp", "." + song.get("format")); 
    132139                        tempFlashFile = new File(System.getProperty("user.dir"), "" + songID.toString() + "tmp" + ".swf"); 
    133140                }  
     
    201208        { 
    202209                int framesPerSecond = 12; 
    203                 FSMovie musicMov = new FSMovie(new FSBounds(0,0,200,200),new Float(framesPerSecond).floatValue()); 
     210                FSMovie musicMov = new FSMovie(new FSBounds(0,0,100,50),new Float(framesPerSecond).floatValue()); 
    204211                musicMov.add(new FSSetBackgroundColor(new FSColor(125,130,150))); // random color for testing 
    205212