Class OpenTorrentWindow
- java.lang.Object
-
- com.biglybt.ui.swt.shells.opentorrent.OpenTorrentWindow
-
- All Implemented Interfaces:
TorrentDownloaderCallBackInterface
,UIUpdatable
public class OpenTorrentWindow extends java.lang.Object implements TorrentDownloaderCallBackInterface, UIUpdatable
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.Button
btnBrowseFolder
private org.eclipse.swt.widgets.Button
btnBrowseTorrent
private org.eclipse.swt.widgets.Button
btnPasteOrClear
private boolean
btnPasteOrClearIsPaste
private StandardButtonsArea
buttonsArea
protected static java.lang.String
CONFIG_REFERRER_DEFAULT
private SkinnedDialog
dlg
private java.lang.String
last_referrer
private java.lang.String
lastCopiedFromClip
private org.eclipse.swt.widgets.Shell
parent
private org.eclipse.swt.widgets.Combo
referrer_combo
private java.util.List<java.lang.String>
referrers
private org.eclipse.swt.widgets.Shell
shellForChildren
private SWTSkinObject
soReferArea
private SWTSkinObjectCheckbox
soShowAdvanced
private SWTSkinObjectTextbox
soTextArea
-
Constructor Summary
Constructors Constructor Description OpenTorrentWindow(org.eclipse.swt.widgets.Shell parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
addTorrentsFromTextList(java.lang.String sClipText, boolean bVerifyOnly)
Add Torrent(s) to Window using a text list of files/urls/torrentsprivate int
addTorrentsToWindow(java.lang.String sTorrentFilePath, java.lang.String[] sTorrentFilenames)
protected void
dispose()
private java.lang.String
ensureTrailingSeparator(java.lang.String sPath)
java.lang.String
getUpdateUIName()
A name for this UIUpdatable so we can track who's being badprivate boolean
isDisposed()
static void
main(java.lang.String[] args)
protected void
openTorrent(java.lang.String text, java.lang.String newReferrer)
private void
swt_addButtons(org.eclipse.swt.widgets.Composite parent)
private void
swt_createWindow()
void
TorrentDownloaderEvent(int state, TorrentDownloader inf)
void
updateUI()
Update your UI!
-
-
-
Field Detail
-
CONFIG_REFERRER_DEFAULT
protected static java.lang.String CONFIG_REFERRER_DEFAULT
-
shellForChildren
private org.eclipse.swt.widgets.Shell shellForChildren
-
parent
private org.eclipse.swt.widgets.Shell parent
-
dlg
private SkinnedDialog dlg
-
buttonsArea
private StandardButtonsArea buttonsArea
-
btnBrowseTorrent
private org.eclipse.swt.widgets.Button btnBrowseTorrent
-
btnBrowseFolder
private org.eclipse.swt.widgets.Button btnBrowseFolder
-
btnPasteOrClear
private org.eclipse.swt.widgets.Button btnPasteOrClear
-
btnPasteOrClearIsPaste
private boolean btnPasteOrClearIsPaste
-
soTextArea
private SWTSkinObjectTextbox soTextArea
-
soReferArea
private SWTSkinObject soReferArea
-
referrer_combo
private org.eclipse.swt.widgets.Combo referrer_combo
-
last_referrer
private java.lang.String last_referrer
-
referrers
private java.util.List<java.lang.String> referrers
-
soShowAdvanced
private SWTSkinObjectCheckbox soShowAdvanced
-
lastCopiedFromClip
private java.lang.String lastCopiedFromClip
-
-
Method Detail
-
swt_createWindow
private void swt_createWindow()
-
openTorrent
protected void openTorrent(java.lang.String text, java.lang.String newReferrer)
-
dispose
protected void dispose()
-
swt_addButtons
private void swt_addButtons(org.eclipse.swt.widgets.Composite parent)
-
ensureTrailingSeparator
private java.lang.String ensureTrailingSeparator(java.lang.String sPath)
-
addTorrentsToWindow
private int addTorrentsToWindow(java.lang.String sTorrentFilePath, java.lang.String[] sTorrentFilenames)
-
addTorrentsFromTextList
private int addTorrentsFromTextList(java.lang.String sClipText, boolean bVerifyOnly)
Add Torrent(s) to Window using a text list of files/urls/torrents- Parameters:
sClipText
- Text to parsebVerifyOnly
- Only check if there's potential torrents in the text, do not try to add the torrents.- Returns:
- Number of torrents added or found. When bVerifyOnly, this number may not be exact.
-
main
public static void main(java.lang.String[] args)
-
isDisposed
private boolean isDisposed()
-
TorrentDownloaderEvent
public void TorrentDownloaderEvent(int state, TorrentDownloader inf)
- Specified by:
TorrentDownloaderEvent
in interfaceTorrentDownloaderCallBackInterface
-
updateUI
public void updateUI()
Description copied from interface:UIUpdatable
Update your UI!- Specified by:
updateUI
in interfaceUIUpdatable
-
getUpdateUIName
public java.lang.String getUpdateUIName()
Description copied from interface:UIUpdatable
A name for this UIUpdatable so we can track who's being bad- Specified by:
getUpdateUIName
in interfaceUIUpdatable
- Returns:
- some name
-
-