Class TorrentUtil
java.lang.Object
com.biglybt.ui.swt.TorrentUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringstatic final Stringstatic final Stringprivate static booleanprivate static final AsyncDispatcherprivate static final String[]private static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddCategorySubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuCategory) static voidaddEditWebseeds(org.eclipse.swt.widgets.Menu menu, DownloadManager[] dms) protected static voidaddNetworksSubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuNetworks) protected static voidaddPeerSourceSubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuPeerSource) protected static voidaddSpeedLimitsMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menu) protected static voidaddTrackerTorrentMenu(org.eclipse.swt.widgets.Menu menuTracker, DownloadManager[] dms, boolean changeUrl, boolean manualUpdate, boolean allStopped, boolean use_open_containing_folder, boolean canMove) static voidassignToCategory(Object[] download_managers, Category category) calculateToolbarStates(ISelectedContent[] currentContent, String viewID_unused) protected static voidchangeDirSelectedTorrents(DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell) protected static voidclearMOC(DownloadManager[] dms) protected static voidexportDownloads(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms) protected static voidexportHTTPSeeds(DownloadManager[] dms) protected static voidexportTorrent(DownloadManager[] dms, org.eclipse.swt.widgets.Shell parentShell) static voidexportTorrent(String torrent_name, TOTorrent torrent, org.eclipse.swt.widgets.Shell parentShell) static voidexportTorrents(String[] torrent_names, TOTorrent[] torrents, org.eclipse.swt.widgets.Shell parentShell) static voidfillTorrentMenu(org.eclipse.swt.widgets.Menu menu, DownloadManager[] dms, Core core, boolean include_show_details, int selected_dl_types, TableView tv) protected static StringgetMOC(DownloadManager[] dms) static voidhostTorrents(Object[] download_managers) static voidinit()static booleanisFileTorrent(String originatingLocation, File torrentFile, String torrentName, boolean warnOnError) quick check to see if a file might be a torrentstatic booleanstatic voidmoveDataFiles(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, boolean batch) private static voidmoveSelectedTorrentsTo(GlobalManager gm, List<DownloadManager> all_dms, List<DownloadManager> selected_dms, int iNewPos) private static voidmoveSelectedTorrentsTo(TableView<DownloadManager> tv, DownloadManager[] selected_dms, int iNewPos) protected static voidmoveTorrentFile(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms) static voidpauseDataSources(Object[] datasources) protected static voidpauseDownloadsFor(DownloadManager[] dms) static voidstatic voidpromptUserForComment(String text, Consumer<String> consumer) static voidstatic voidpublishTorrents(Object[] download_managers) static voidqueueDataSources(Object[] datasources, boolean extendedAction) static voidremoveDataSources(Object[] datasources) static voidremoveDownloads(DownloadManager[] dms, AERunnable deleteFailed) static voidremoveDownloads(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt) private static voidremoveDownloadsPrompterClosed(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) private static voidremoveDownloadsPrompterClosedSupport(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) private static voidremoveDownloadsSupport(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt) static voidremoveDownloadStubs(DownloadStub.DownloadStubEx[] dms, AERunnable deleteFailed, boolean forcePrompt) private static voidremoveDownloadStubsPrompterClosed(DownloadStub.DownloadStubEx[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) static voidrepositionManual(TableView<DownloadManager> tv, DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell, boolean isSeedingView) static voidresumeTorrents(Object[] download_managers) static voidrunDataSources(Object[] datasources) Runs a DownloadManager or DiskManagerFileInfoprotected static voidselectMOC(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, Consumer<String> moc_setter) protected static voidsetMOC(DownloadManager[] dms, String path) static BooleanshouldStopGroupTest(Object[] datasources) static voidstopDataSources(Object[] datasources) static voidstopDataSources(Object[] datasources, boolean pause) static voidstopOrStartDataSources(Object[] datasources, boolean extendedAction) private static DiskManagerFileInfo[]private static DownloadManager[]private static DownloadStub.DownloadStubEx[]toDownloadStubs(Object[] objects)
-
Field Details
-
TU_GROUP
- See Also:
-
BF_GROUP
- See Also:
-
TU_ITEM_PAUSE
- See Also:
-
TU_ITEM_RECHECK
- See Also:
-
TU_ITEM_CHECK_FILES
- See Also:
-
TU_ITEM_ALLOCATE
- See Also:
-
TU_ITEM_ARCHIVE
- See Also:
-
TU_ITEM_SHOW_SIDEBAR
- See Also:
-
BF_ITEM_BACK
- See Also:
-
BF_ITEM_FORWARD
- See Also:
-
TB_ITEMS
-
initialised
private static boolean initialised -
move_disp
-
-
Constructor Details
-
TorrentUtil
public TorrentUtil()
-
-
Method Details
-
init
public static void init() -
fillTorrentMenu
public static void fillTorrentMenu(org.eclipse.swt.widgets.Menu menu, DownloadManager[] dms, Core core, 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
-
exportTorrent
protected static void exportTorrent(DownloadManager[] dms, org.eclipse.swt.widgets.Shell parentShell) -
exportTorrent
-
exportTorrents
-
pauseDownloadsFor
-
addSpeedLimitsMenu
-
addEditWebseeds
-
addTrackerTorrentMenu
protected static void addTrackerTorrentMenu(org.eclipse.swt.widgets.Menu menuTracker, DownloadManager[] dms, boolean changeUrl, boolean manualUpdate, boolean allStopped, boolean use_open_containing_folder, boolean canMove) -
moveTorrentFile
-
moveDataFiles
public static void moveDataFiles(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, boolean batch) -
clearMOC
-
getMOC
-
setMOC
-
selectMOC
protected static void selectMOC(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, Consumer<String> moc_setter) -
exportDownloads
-
repositionManual
public static void repositionManual(TableView<DownloadManager> tv, DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell, boolean isSeedingView) -
addCategorySubMenu
protected static void addCategorySubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuCategory) -
moveSelectedTorrentsTo
private static void moveSelectedTorrentsTo(TableView<DownloadManager> tv, DownloadManager[] selected_dms, int iNewPos) -
moveSelectedTorrentsTo
private static void moveSelectedTorrentsTo(GlobalManager gm, List<DownloadManager> all_dms, List<DownloadManager> selected_dms, int iNewPos) -
changeDirSelectedTorrents
protected static void changeDirSelectedTorrents(DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell) -
runDataSources
Runs a DownloadManager or DiskManagerFileInfo -
hostTorrents
-
publishTorrents
-
removeDataSources
- Parameters:
datasources- DownloadManager, DiskManagerFileInfo, SelectedContent
-
shouldStopGroupTest
-
stopOrStartDataSources
-
stopDataSources
-
stopDataSources
-
pauseDataSources
-
queueDataSources
-
resumeTorrents
-
assignToCategory
-
promptUserForComment
-
promptUserForComment
-
promptUserForDescription
-
toDMS
-
toDownloadStubs
-
toDMFI
-
isFileTorrent
-
calculateToolbarStates
public static Map<String,Long> calculateToolbarStates(ISelectedContent[] currentContent, String viewID_unused) -
removeDownloads
-
removeDownloads
public static void removeDownloads(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt) -
removeDownloadsSupport
private static void removeDownloadsSupport(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt) -
removeDownloadsPrompterClosed
private static void removeDownloadsPrompterClosed(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) -
removeDownloadsPrompterClosedSupport
private static void removeDownloadsPrompterClosedSupport(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) -
removeDownloadStubs
public static void removeDownloadStubs(DownloadStub.DownloadStubEx[] dms, AERunnable deleteFailed, boolean forcePrompt) -
removeDownloadStubsPrompterClosed
private static void removeDownloadStubsPrompterClosed(DownloadStub.DownloadStubEx[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) -
isForceStartVisible
-