Package org.jampa.model.library

Examples of org.jampa.model.library.TitleItem


 
  private void buildInitialSongsList(IProgressMonitor monitor) {
    List<ILibraryItem> tmpSongsList = Controller.getInstance().getLibrary().getTitleList();
       
    _songsList = new ArrayList<ILibraryItem>();
    TitleItem item;
    Iterator<ILibraryItem> iter = tmpSongsList.iterator();
    while (iter.hasNext()) {       
      if (monitor.isCanceled())
        return;

      item = (TitleItem) iter.next();
      if (_advancedMode) {
        if ((_genreList.contains(item.getGenre())) &&
            (_artistList.contains(item.getArtist()))) {
          _songsList.add(item);
        }
      } else {
        _songsList.add(item);
      }
View Full Code Here


    }   
  }
 
  private void buildSongsList(IProgressMonitor monitor) {
    Random generator = new Random();
    TitleItem item;
    _finalSongsList = new LibraryList();
    int currentIndex;
       
    while ((_finalSongsList.getChildCount() < _songsNumber) &&
        (_songsList.size() > 0)) {
      if (monitor.isCanceled())
        return;
           
      currentIndex = generator.nextInt(_songsList.size());     
      item = (TitleItem) _songsList.get(currentIndex);
     
      _finalSongsList.addChild(item.getFilePath(), item);
     
      _songsList.remove(currentIndex);
           
      monitor.worked(1);
    }
View Full Code Here

TOP

Related Classes of org.jampa.model.library.TitleItem

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.