Package org.jampa.gui.runnables

Examples of org.jampa.gui.runnables.LibraryAdder


  }
 
  public void addItemToPlaylist(String playlistName, ILibraryItem libraryItem, boolean playFirst, int insertionIndex) {
    if (_items.containsKey(playlistName)) {
      if (libraryItem != null) {
        LibraryAdder adder = new LibraryAdder(playlistName, libraryItem, insertionIndex);
        ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getDefault().getActiveShell());
       
        try {
          dialog.run(true, true, adder);
        } catch (InvocationTargetException e) {
          Log.getInstance(PlaylistController.class).error(e.getMessage());         
        } catch (InterruptedException e) {
          Log.getInstance(PlaylistController.class).error(e.getMessage());         
        }
       
        if (playFirst) {
          if (adder.getFirstItem() != null) {
            Playlist playlist = getPlaylistByName(playlistName);
            if (playlist != null) {
              AudioItem audioItem = playlist.getAudioItemByPath(((TitleItem) adder.getFirstItem()).getFilePath());
              if (audioItem != null) {
                playFile(playlistName, audioItem);
              }
            }
          }
View Full Code Here

TOP

Related Classes of org.jampa.gui.runnables.LibraryAdder

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.