Changeset 135
- Timestamp:
- 03/05/07 22:19:37 (2 years ago)
- Files:
-
- dmp/trunk/XmLRpcBridgeServer/BridgeXmlRpcServer.cs (modified) (1 diff)
- dmp/trunk/gwt-windows-1.3.3/DMPWebsite.launch (modified) (1 diff)
- dmp/trunk/gwt-windows-1.3.3/src/DMP/client/DMPWebsite.java (modified) (3 diffs)
- dmp/trunk/gwt-windows-1.3.3/src/DMP/client/SongTable.java (modified) (2 diffs)
- dmp/trunk/gwt-windows-1.3.3/src/DMP/server/MusicServImpl.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dmp/trunk/XmLRpcBridgeServer/BridgeXmlRpcServer.cs
r108 r135 147 147 148 148 ArrayList collection = new ArrayList(); 149 DataTable bridgeCollection = bridge.get SongsInCollection();149 DataTable bridgeCollection = bridge.getAvailableSongsInCollection(); 150 150 DataTableReader reader = bridgeCollection.CreateDataReader(); 151 151 dmp/trunk/gwt-windows-1.3.3/DMPWebsite.launch
r54 r135 14 14 <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www DMP.DMPWebsite/DMPWebsite.html"/> 15 15 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DMPWeb"/> 16 <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx256M"/> 16 17 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> 17 18 <listEntry value="/DMPWeb"/> dmp/trunk/gwt-windows-1.3.3/src/DMP/client/DMPWebsite.java
r120 r135 19 19 SongTable playing = new PlayingTable(this); 20 20 DockPanel mainPanel = new DockPanel(); 21 SimplePanel flashPanel = new SimplePanel();21 FocusPanel flashPanel = new FocusPanel(); 22 22 int currentMusicDuration = 0; 23 23 Date currentSongStart = null; … … 30 30 if(clickText.startsWith("Sort by ")) 31 31 { 32 collection.sortBy(clickText.substring(8) ); //"Sort by " is 8 characters32 collection.sortBy(clickText.substring(8).toLowerCase()); //"Sort by " is 8 characters 33 33 return; 34 34 } … … 158 158 return; 159 159 } 160 HTML flash = new HTML("<object width=\" 200\" height=\"25\">" +160 HTML flash = new HTML("<object width=\"100\" height=\"100\">" + 161 161 "<param name=\"movie\" value=\"" + path + "\"><PARAM NAME=loop VALUE=\"false\">" + 162 162 "<PARAM NAME=menu VALUE=\"true\">" + 163 163 "<embed src=\"" + path + 164 "\" width=\" 200\" height=\"25\" loop=\"false\" menu=\"true\">" +164 "\" width=\"100\" height=\"100\" loop=\"false\" menu=\"true\">" + 165 165 "</embed></object>"); 166 166 flashPanel.setWidget(flash); dmp/trunk/gwt-windows-1.3.3/src/DMP/client/SongTable.java
r115 r135 9 9 import java.util.Iterator; 10 10 import java.util.HashMap; 11 import java.util.Collections; 11 12 12 13 /** … … 127 128 public void sortBy(String tag) 128 129 { 129 int index = tagList.indexOf(tag); 130 if(index == -1) 131 { 132 throw new IndexOutOfBoundsException(tag); 130 if(!tagList.contains(tag)) 131 { 132 return; 133 133 } 134 134 Vector sortedSongList = new Vector(); 135 int songListIndex = 0; 136 Vector song = (Vector) songList.get(songListIndex); 137 songListIndex++; 138 sortedSongList.add(song); // seed the sorted songlist 139 while(songListIndex < songList.size()) 140 { 141 int i = 0; 142 song = (Vector) songList.get(songListIndex); 143 while(i < sortedSongList.size()) 144 { 145 Vector sortedSong = (Vector) sortedSongList.get(i); 146 int compareInt = (sortedSong.get(index)).toString().toLowerCase().compareTo( 147 (song.get(index).toString()).toLowerCase()); 148 if(compareInt > 0) 149 { 150 sortedSongList.add(i,song); 151 break; 152 } 153 i++; 154 } 155 songListIndex++; 156 } 135 Vector sortedValues = new Vector(); 136 for(Iterator it = songList.iterator(); it.hasNext();) 137 { 138 HashMap song = (HashMap) it.next(); 139 sortedValues.add(song.get(tag)); 140 } 141 Collections.sort(sortedValues); 142 143 for(Iterator sortIt = sortedValues.iterator();sortIt.hasNext();) 144 { 145 Object value = sortIt.next(); 146 for(Iterator it = songList.iterator();it.hasNext();) 147 { 148 HashMap song = (HashMap) it.next(); 149 if(song.containsValue(value)) 150 { 151 sortedSongList.add(song); 152 } 153 } 154 } 155 // Vector song = (Vector) songList.get(songListIndex); 156 // songListIndex++; 157 // sortedSongList.add(song); // seed the sorted songlist 158 // while(songListIndex < songList.size()) 159 // { 160 // int i = 0; 161 // song = (Vector) songList.get(songListIndex); 162 // while(i < sortedSongList.size()) 163 // { 164 // Vector sortedSong = (Vector) sortedSongList.get(i); 165 // int compareInt = (sortedSong.get(index)).toString().toLowerCase().compareTo( 166 // (song.get(index).toString()).toLowerCase()); 167 // if(compareInt > 0) 168 // { 169 // sortedSongList.add(i,song); 170 // break; 171 // } 172 // i++; 173 // } 174 // songListIndex++; 175 // } 157 176 songList = sortedSongList; 158 177 refillTable(); dmp/trunk/gwt-windows-1.3.3/src/DMP/server/MusicServImpl.java
r120 r135 209 209 { 210 210 int framesPerSecond = 12; 211 FSMovie musicMov = new FSMovie(new FSBounds(0,0,100,50),new Float(framesPerSecond).floatValue()); 212 musicMov.add(new FSSetBackgroundColor(new FSColor(125,130,150))); // random color for testing 213 211 FSMovie musicMov = new FSMovie(new FSBounds(0,0,930,930),new Float(framesPerSecond).floatValue()); 212 musicMov.add(new FSSetBackgroundColor(new FSColor(255,200,255))); // random color for testing 213 214 // make the sound 214 215 FSSoundConstructor soundGenerator; 215 216 try … … 229 230 return false; 230 231 } 232 233 // make the next button 234 String imageBasePath = "C:\\Documents and Settings\\Beverly Fitzpatrick\\My" + 235 " Documents\\Visual Studio 2005\\Projects\\DMPGraphics\\"; 236 FSImageConstructor imageMaker = new FSImageConstructor(); 237 FSDefineObject nextHover; 238 FSDefineObject nextNoHover; 239 FSDefineObject nextPressed; 240 try { 241 imageMaker.setImageFromFile(imageBasePath + "Next_hover.png"); 242 nextHover = imageMaker.defineImage(musicMov.newIdentifier()); 243 imageMaker.setImageFromFile(imageBasePath + "Next_nohover.png"); 244 nextNoHover = imageMaker.defineImage(musicMov.newIdentifier()); 245 imageMaker.setImageFromFile(imageBasePath + "Next_pressed.png"); 246 nextPressed = imageMaker.defineImage(musicMov.newIdentifier()); 247 } catch (IOException e2) { 248 e2.printStackTrace(); 249 return false; 250 } catch (DataFormatException e2) { 251 e2.printStackTrace(); 252 return false; 253 } 254 FSDefineShape3 nextNoHoverShape = imageMaker.defineEnclosingShape(musicMov.newIdentifier(), 255 nextNoHover.getIdentifier(), 0, 0, new FSSolidLine(1,new FSColor(5,5,5))); 256 FSDefineShape3 nextHoverShape = imageMaker.defineEnclosingShape(musicMov.newIdentifier(), 257 nextHover.getIdentifier(), 0, 0, null); 258 FSDefineShape3 nextPressedShape = imageMaker.defineEnclosingShape(musicMov.newIdentifier(), 259 nextPressed.getIdentifier(), 0, 0, null); 260 261 // make the buttons 262 ArrayList<FSButton> nextButtonImages = new ArrayList<FSButton>(); 263 nextButtonImages.add(new FSButton(FSButton.Up, nextNoHoverShape.getIdentifier(), 2)); 264 nextButtonImages.add(new FSButton(FSButton.Over, nextHoverShape.getIdentifier(), 1)); 265 nextButtonImages.add(new FSButton(FSButton.Down, nextPressedShape.getIdentifier(), 3)); 266 267 // button actions 268 ArrayList nextButtonActions = new ArrayList(); 269 270 // define the button and add it to the movie 271 FSDefineButton nextButton = new FSDefineButton(musicMov.newIdentifier(), 272 nextButtonImages, nextButtonActions); 273 musicMov.add(nextHover); 274 musicMov.add(nextNoHover); 275 musicMov.add(nextPressed); 276 musicMov.add(nextNoHoverShape); 277 musicMov.add(nextHoverShape); 278 musicMov.add(nextPressedShape); 279 musicMov.add(nextButton); 280 musicMov.add(new FSPlaceObject(nextButton.getIdentifier(), 1, 0, 0)); 231 281 232 282 int samplesPerBlock; … … 256 306 } 257 307 308 // make the movie file 258 309 try 259 310 { … … 265 316 return false; 266 317 } 318 catch(Throwable thrown) { 319 thrown.printStackTrace(); 320 return false; 321 } 267 322 } 268 323 }
