Changeset 135

Show
Ignore:
Timestamp:
03/05/07 22:19:37 (2 years ago)
Author:
bfitzpa2
Message:

Added a button to the flash on the webpage.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmp/trunk/XmLRpcBridgeServer/BridgeXmlRpcServer.cs

    r108 r135  
    147147 
    148148                        ArrayList collection = new ArrayList(); 
    149                         DataTable bridgeCollection = bridge.getSongsInCollection(); 
     149                        DataTable bridgeCollection = bridge.getAvailableSongsInCollection(); 
    150150                        DataTableReader reader = bridgeCollection.CreateDataReader(); 
    151151 
  • dmp/trunk/gwt-windows-1.3.3/DMPWebsite.launch

    r54 r135  
    1414<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www DMP.DMPWebsite/DMPWebsite.html"/> 
    1515<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DMPWeb"/> 
     16<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx256M"/> 
    1617<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> 
    1718<listEntry value="/DMPWeb"/> 
  • dmp/trunk/gwt-windows-1.3.3/src/DMP/client/DMPWebsite.java

    r120 r135  
    1919        SongTable playing = new PlayingTable(this); 
    2020        DockPanel mainPanel = new DockPanel(); 
    21         SimplePanel flashPanel = new SimplePanel(); 
     21        FocusPanel flashPanel = new FocusPanel(); 
    2222        int currentMusicDuration = 0; 
    2323        Date currentSongStart = null; 
     
    3030                if(clickText.startsWith("Sort by ")) 
    3131                { 
    32                         collection.sortBy(clickText.substring(8)); //"Sort by " is 8 characters 
     32                        collection.sortBy(clickText.substring(8).toLowerCase()); //"Sort by " is 8 characters 
    3333                        return; 
    3434                } 
     
    158158                                        return; 
    159159                                } 
    160                                 HTML flash = new HTML("<object width=\"200\" height=\"25\">" + 
     160                                HTML flash = new HTML("<object width=\"100\" height=\"100\">" + 
    161161                                                "<param name=\"movie\" value=\"" + path + "\"><PARAM NAME=loop VALUE=\"false\">" +  
    162162                                                "<PARAM NAME=menu VALUE=\"true\">" + 
    163163                                                "<embed src=\"" + path +  
    164                                                 "\" width=\"200\" height=\"25\" loop=\"false\" menu=\"true\">" + 
     164                                                "\" width=\"100\" height=\"100\" loop=\"false\" menu=\"true\">" + 
    165165                                                "</embed></object>"); 
    166166                                flashPanel.setWidget(flash); 
  • dmp/trunk/gwt-windows-1.3.3/src/DMP/client/SongTable.java

    r115 r135  
    99import java.util.Iterator; 
    1010import java.util.HashMap; 
     11import java.util.Collections; 
    1112 
    1213/** 
     
    127128        public void sortBy(String tag) 
    128129        { 
    129                 int index = tagList.indexOf(tag); 
    130                 if(index == -1) 
    131                 { 
    132                         throw new IndexOutOfBoundsException(tag); 
     130                if(!tagList.contains(tag)) 
     131                { 
     132                        return; 
    133133                } 
    134134                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//              } 
    157176                songList = sortedSongList; 
    158177                refillTable(); 
  • dmp/trunk/gwt-windows-1.3.3/src/DMP/server/MusicServImpl.java

    r120 r135  
    209209        { 
    210210                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 
    214215                FSSoundConstructor soundGenerator; 
    215216                try  
     
    229230                        return false; 
    230231                } 
     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)); 
    231281                 
    232282                int samplesPerBlock; 
     
    256306                } 
    257307                 
     308                // make the movie file 
    258309                try 
    259310                { 
     
    265316                        return false; 
    266317                } 
     318                catch(Throwable thrown) { 
     319                        thrown.printStackTrace(); 
     320                        return false; 
     321                } 
    267322        } 
    268323}