org.gudy.azureus2.ui.swt
Class TorrentUtil
java.lang.Object
  
org.gudy.azureus2.ui.swt.TorrentUtil
public class TorrentUtil
- extends Object
 
- Author:
 
  - Allan Crooks
 
 
| 
Method Summary | 
protected static void | 
addCategorySubMenu(DownloadManager[] dms,
                   org.eclipse.swt.widgets.Menu menuCategory,
                   org.eclipse.swt.widgets.Composite composite)
 
            | 
protected static void | 
addNetworksSubMenu(DownloadManager[] dms,
                   org.eclipse.swt.widgets.Menu menuNetworks)
 
            | 
protected static void | 
addPeerSourceSubMenu(DownloadManager[] dms,
                     org.eclipse.swt.widgets.Menu menuPeerSource)
 
            | 
protected static void | 
addSpeedLimitsMenu(DownloadManager[] dms,
                   org.eclipse.swt.widgets.Menu menu)
 
            | 
protected static void | 
addTrackerTorrentMenu(org.eclipse.swt.widgets.Menu menuTracker,
                      DownloadManager[] dms,
                      boolean changeUrl,
                      boolean manualUpdate,
                      boolean allStopped,
                      boolean use_open_containing_folder)
 
            | 
static void | 
assignToCategory(Object[] download_managers,
                 Category category)
 
            | 
static Map<String,Long> | 
calculateToolbarStates(ISelectedContent[] currentContent,
                       String viewID_unused)
 
            | 
protected static void | 
changeDirSelectedTorrents(DownloadManager[] dms,
                          org.eclipse.swt.widgets.Shell shell)
 
            | 
protected static void | 
exportHTTPSeeds(DownloadManager[] dms)
 
            | 
protected static void | 
exportTorrent(DownloadManager[] dms,
              org.eclipse.swt.widgets.Shell parentShell)
 
            | 
static void | 
fillTorrentMenu(org.eclipse.swt.widgets.Menu menu,
                DownloadManager[] dms,
                AzureusCore azureus_core,
                org.eclipse.swt.widgets.Composite composite,
                boolean include_show_details,
                int selected_dl_types,
                TableView tv)
 
            | 
static void | 
hostTorrents(Object[] download_managers)
 
            | 
static boolean | 
isFileTorrent(String originatingLocation,
              File torrentFile,
              String torrentName,
              boolean warnOnError)
 
          quick check to see if a file might be a torrent | 
protected static void | 
moveDataFiles(org.eclipse.swt.widgets.Shell shell,
              DownloadManager[] dms)
 
            | 
protected static void | 
moveTorrentFile(org.eclipse.swt.widgets.Shell shell,
                DownloadManager[] dms)
 
            | 
static void | 
pauseDataSources(Object[] datasources)
 
            | 
protected static void | 
pauseDownloadsFor(DownloadManager[] dms)
 
            | 
static void | 
promptUserForComment(DownloadManager[] dms)
 
            | 
static void | 
promptUserForDescription(DownloadManager[] dms)
 
            | 
static void | 
publishTorrents(Object[] download_managers)
 
            | 
static void | 
queueDataSources(Object[] datasources,
                 boolean startStoppedParents)
 
            | 
static void | 
removeDataSources(Object[] datasources)
 
            | 
static void | 
removeDownloads(DownloadManager[] dms,
                AERunnable deleteFailed)
 
            | 
static void | 
removeDownloads(DownloadManager[] dms,
                AERunnable deleteFailed,
                boolean forcePrompt)
 
            | 
static void | 
removeDownloadStubs(DownloadStub.DownloadStubEx[] dms,
                    AERunnable deleteFailed,
                    boolean forcePrompt)
 
            | 
static void | 
repositionManual(TableView tv,
                 DownloadManager[] dms,
                 org.eclipse.swt.widgets.Shell shell,
                 boolean isSeedingView)
 
            | 
static void | 
resumeTorrents(Object[] download_managers)
 
            | 
static void | 
runDataSources(Object[] datasources)
 
          Runs a DownloadManager or DiskManagerFileInfo | 
static boolean | 
shouldStopGroup(Object[] datasources)
 
            | 
static void | 
stopDataSources(Object[] datasources)
 
            | 
static void | 
stopOrStartDataSources(Object[] datasources)
 
            | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
TorrentUtil
public TorrentUtil()
fillTorrentMenu
public static void fillTorrentMenu(org.eclipse.swt.widgets.Menu menu,
                                   DownloadManager[] dms,
                                   AzureusCore azureus_core,
                                   org.eclipse.swt.widgets.Composite composite,
                                   boolean include_show_details,
                                   int selected_dl_types,
                                   TableView tv)
 
addNetworksSubMenu
protected static void addNetworksSubMenu(DownloadManager[] dms,
                                         org.eclipse.swt.widgets.Menu menuNetworks)
 
addPeerSourceSubMenu
protected static void addPeerSourceSubMenu(DownloadManager[] dms,
                                           org.eclipse.swt.widgets.Menu menuPeerSource)
 
exportHTTPSeeds
protected static void exportHTTPSeeds(DownloadManager[] dms)
 
exportTorrent
protected static void exportTorrent(DownloadManager[] dms,
                                    org.eclipse.swt.widgets.Shell parentShell)
 
pauseDownloadsFor
protected static void pauseDownloadsFor(DownloadManager[] dms)
 
addSpeedLimitsMenu
protected static void addSpeedLimitsMenu(DownloadManager[] dms,
                                         org.eclipse.swt.widgets.Menu menu)
 
addTrackerTorrentMenu
protected static void addTrackerTorrentMenu(org.eclipse.swt.widgets.Menu menuTracker,
                                            DownloadManager[] dms,
                                            boolean changeUrl,
                                            boolean manualUpdate,
                                            boolean allStopped,
                                            boolean use_open_containing_folder)
 
moveTorrentFile
protected static void moveTorrentFile(org.eclipse.swt.widgets.Shell shell,
                                      DownloadManager[] dms)
 
moveDataFiles
protected static void moveDataFiles(org.eclipse.swt.widgets.Shell shell,
                                    DownloadManager[] dms)
 
repositionManual
public static void repositionManual(TableView tv,
                                    DownloadManager[] dms,
                                    org.eclipse.swt.widgets.Shell shell,
                                    boolean isSeedingView)
 
addCategorySubMenu
protected static void addCategorySubMenu(DownloadManager[] dms,
                                         org.eclipse.swt.widgets.Menu menuCategory,
                                         org.eclipse.swt.widgets.Composite composite)
 
changeDirSelectedTorrents
protected static void changeDirSelectedTorrents(DownloadManager[] dms,
                                                org.eclipse.swt.widgets.Shell shell)
 
runDataSources
public static void runDataSources(Object[] datasources)
- Runs a DownloadManager or DiskManagerFileInfo
 
 
hostTorrents
public static void hostTorrents(Object[] download_managers)
 
publishTorrents
public static void publishTorrents(Object[] download_managers)
 
removeDataSources
public static void removeDataSources(Object[] datasources)
- Parameters:
 datasources - DownloadManager, DiskManagerFileInfo, SelectedContent
 
shouldStopGroup
public static boolean shouldStopGroup(Object[] datasources)
 
stopOrStartDataSources
public static void stopOrStartDataSources(Object[] datasources)
 
stopDataSources
public static void stopDataSources(Object[] datasources)
 
pauseDataSources
public static void pauseDataSources(Object[] datasources)
 
queueDataSources
public static void queueDataSources(Object[] datasources,
                                    boolean startStoppedParents)
 
resumeTorrents
public static void resumeTorrents(Object[] download_managers)
 
assignToCategory
public static void assignToCategory(Object[] download_managers,
                                    Category category)
 
promptUserForComment
public static void promptUserForComment(DownloadManager[] dms)
 
promptUserForDescription
public static void promptUserForDescription(DownloadManager[] dms)
 
isFileTorrent
public static boolean isFileTorrent(String originatingLocation,
                                    File torrentFile,
                                    String torrentName,
                                    boolean warnOnError)
- quick check to see if a file might be a torrent
- Parameters:
 torrentFile - deleteFileOnCancel - parentShell - non-null: display a window if it's not a torrent
- Returns:
 - Since:
 
  - 3.0.2.3
 
 
 
calculateToolbarStates
public static Map<String,Long> calculateToolbarStates(ISelectedContent[] currentContent,
                                                      String viewID_unused)
 
removeDownloads
public static void removeDownloads(DownloadManager[] dms,
                                   AERunnable deleteFailed)
 
removeDownloads
public static void removeDownloads(DownloadManager[] dms,
                                   AERunnable deleteFailed,
                                   boolean forcePrompt)
 
removeDownloadStubs
public static void removeDownloadStubs(DownloadStub.DownloadStubEx[] dms,
                                       AERunnable deleteFailed,
                                       boolean forcePrompt)