Changeset 113
- Timestamp:
- 03/03/07 13:12:52 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dmp/trunk/gwt-windows-1.3.3/.classpath
r99 r113 9 9 <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"/> 10 10 <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"> 12 12 <attributes> 13 13 <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 28 28 if(clickText.startsWith("Sort by ")) 29 29 { 30 collection.sortBy(clickText.substring(8)); 30 collection.sortBy(clickText.substring(8)); //"Sort by " is 8 characters 31 31 return; 32 32 } … … 80 80 collectionTags.add("Size"); 81 81 collectionTags.add("Duration"); 82 collectionTags.add("Format"); 82 83 collection.setTagList(collectionTags); 83 84 collection.setTitle("Song Collection"); … … 150 151 currentMusicDuration = 0; 151 152 Label noSongsLeft = new Label("Click a song to play it."); 153 flashPanel.clear(); 152 154 flashPanel.add(noSongsLeft); 153 155 return; 154 156 } 155 HTML flash = new HTML("<object width=\"200\" height=\" 100\">" +157 HTML flash = new HTML("<object width=\"200\" height=\"50\">" + 156 158 "<param name=\"movie\" value=\"" + path + "\">" + 157 "<embed src=\"" + path + "\" width=\"200\" height=\" 100\">" +159 "<embed src=\"" + path + "\" width=\"200\" height=\"50\">" + 158 160 "</embed></object>"); 161 flashPanel.clear(); 159 162 flashPanel.add(flash); 160 163 currentMusicDuration = Double.valueOf((String)song.get("duration")).intValue(); … … 164 167 nextSong.schedule(currentMusicDuration); 165 168 } 166 song.remove("path"); // restores song to how it is stored 167 playing.removeSong(song); 169 playing.removeSong(song.get("id")); 168 170 } 169 171 public void onFailure(Throwable caught) … … 171 173 caught.printStackTrace(); 172 174 Label error = new Label(caught.getMessage()); 175 flashPanel.clear(); 173 176 flashPanel.add(error); 174 177 } … … 199 202 public void run() 200 203 { 204 System.out.println("Playing next song."); 201 205 playNextSong(); 202 206 this.schedule(currentMusicDuration); dmp/trunk/gwt-windows-1.3.3/src/DMP/client/SongTable.java
r108 r113 82 82 /** 83 83 * 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 } 93 101 } 94 102 dmp/trunk/gwt-windows-1.3.3/src/DMP/server/MusicServImpl.java
r111 r113 64 64 { 65 65 playing.add(song); 66 makeFlash(song); 66 if(!flashFileHandles.containsKey(song)) 67 { 68 makeFlash(song); 69 } 67 70 } 68 71 … … 72 75 { 73 76 playing.remove(song); 77 if(playing.contains(song)) //if there's another copy, keep the file handle 78 { 79 return; 80 } 74 81 flashFileHandles.remove(song); 75 82 } … … 129 136 try 130 137 { 131 tempMusicFile = File.createTempFile(songID.toString() + "tmp", ". mp3");138 tempMusicFile = File.createTempFile(songID.toString() + "tmp", "." + song.get("format")); 132 139 tempFlashFile = new File(System.getProperty("user.dir"), "" + songID.toString() + "tmp" + ".swf"); 133 140 } … … 201 208 { 202 209 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()); 204 211 musicMov.add(new FSSetBackgroundColor(new FSColor(125,130,150))); // random color for testing 205 212
