Package org.jampa.gui.runnables

Examples of org.jampa.gui.runnables.DiskItemAdder


    addDiskItemsToPlaylist(playlistName, items, playFirst, -1);
  }
 
  public void addDiskItemsToPlaylist(String playlistName, List<IDiskItem> items, boolean playFirst, int insertionIndex) {
    if (_items.containsKey(playlistName)) {
      DiskItemAdder adder = new DiskItemAdder(playlistName, items, 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) {
        Playlist playlist = getPlaylistByName(playlistName);
        if (playlist != null) {
          AudioItem item = playlist.getAudioItemByPath(adder.getFirstFileItem().getFileName());
          if (item != null) {
            playFile(playlistName, item);
          }
        }
      }     
View Full Code Here

TOP

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

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.