Class UIFunctionsImpl
java.lang.Object
com.biglybt.ui.swt.shells.main.UIFunctionsImpl
- All Implemented Interfaces:
CoreComponent, UIFunctionsSWT, UIFunctions
-
Nested Class Summary
Nested classes/interfaces inherited from interface UIFunctions
UIFunctions.actionListener, UIFunctions.TagReturner -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprivate static final LogIDsprivate final MainWindowprivate static final Stringprivate static final Stringprivate final ParameterListenerprivate static final booleanprivate SWTSkinStores the currentSWTSkinso it can be used bycreateMainMenu(Shell)Fields inherited from interface UIFunctions
ACTION_FULL_UPDATE, ACTION_UPDATE_RESTART_REQUEST, MAIN_WINDOW_NAME, OTO_DEFAULT_SAVE_PATH, OTO_DEFAULT_SAVE_PATH_DEFAULT, OTO_DEFAULT_TO_STOPPED, OTO_DEFAULT_TO_STOPPED_DEFAULT, OTO_FORCE_OPEN, OTO_FORCE_OPEN_DEFAULT, OTO_HIDE_ERRORS, OTO_HIDE_ERRORS_DEFAULT, OTO_SILENT, OTO_SILENT_DEFAULT, STATUSICON_ERROR, STATUSICON_NONE, STATUSICON_WARNING, VS_ACTIVE, VS_MINIMIZED, VS_MINIMIZED_TO_TRAY, VS_TRAY_ONLY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddTorrentWithOptions(boolean force, TorrentOpenOptions torrentOptions) Opens the Torrent Add Options Window, if configured tobooleanaddTorrentWithOptions(TorrentOpenOptions torrentOptions, Map<String, Object> addOptions) private booleanaddTorrentWithOptionsSupport(TorrentOpenOptions torrentOptions, Map<String, Object> addOptions, boolean is_silent) voidBring main window to the frontvoidbringToFront(boolean tryTricks) Bring main window to the frontprivate static booleanvoidvoidvoidvoidcopyToClipboard(String text) createMainMenu(org.eclipse.swt.widgets.Shell shell) Creates the main application menu and attach it to the givenShell; this is only used for OSX so that we can attach the global menu to popup dialogs which is the expected behavior on OSX.voiddispose()booleandispose(boolean for_restart) voidvoidvoidforceNotify(int iconID, String title, String text, String details, Object[] relatedObjects, int timeoutSecs) Might launch the old-school Mr Slideybooleanorg.eclipse.swt.widgets.ShellgetMDI()Retrieve the MDI (Sidebar, TabbedMDI)getSkin()Retrieves the class that handles periodically updating the UIgetUserPrompter(String title, String text, String[] buttons, int defaultOption) intbooleanvoidinstallPlugin(String plugin_id, String resource_prefix, UIFunctions.actionListener listener) booleanbooleanisProgramInstalled(String extension, String name) booleanvoidopenPluginView(UISWTViewBuilderCore builder, boolean bSetFocus) voidvoidopenTorrentOpenOptions(org.eclipse.swt.widgets.Shell shell, String sPathOfFilesToOpen, String[] sFilesToOpen, boolean defaultToStopped, boolean forceOpen) voidopenTorrentOpenOptions(org.eclipse.swt.widgets.Shell shell, String sPathOfFilesToOpen, String[] sFilesToOpen, Map<String, Object> options) voidvoidperformAction(int action_id, Object args, UIFunctions.actionListener listener) voidplayOrStreamDataSource(Object ds, String referal, boolean launch_already_checked, boolean complete_only) voidpopStatusText(Object o, int reason, String message) voidvoidpromptUser(String title, String text, String[] buttons, int defaultOption, String rememberID, String rememberText, boolean rememberByDefault, int autoCloseInMS, UserPrompterResultListener l) pushStatusText(String key) voidvoidChange/Refresh the language of the UIvoidvoidrunOnUIThread(String ui_type, Runnable runnable) voidsetHideAll(boolean hidden) voidvoidsetStatusText(int statustype, String key, UIStatusTextClickListener l) voidsetStatusText(String key) org.eclipse.swt.widgets.ShellvoidshowCreateTagDialog(UIFunctions.TagReturner tagReturner) voidshowErrorMessage(String keyPrefix, String details, String[] textParams) voidvoidvoidprivate voidvoidtableColumnAddedListeners(TableColumnImpl tableColumn, Object listeners) booleanbooleanvoidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface UIFunctions
dispose
-
Field Details
-
PROXY_VIEW_URL
private static final boolean PROXY_VIEW_URL- See Also:
-
MSG_ALREADY_EXISTS
- See Also:
-
MSG_ALREADY_EXISTS_NAME
- See Also:
-
LOGID
-
mainWindow
-
skin
Stores the currentSWTSkinso it can be used bycreateMainMenu(Shell) -
isTorrentMenuVisible
protected boolean isTorrentMenuVisible -
paramShowTorrentsMenuListener
-
-
Constructor Details
-
UIFunctionsImpl
- Parameters:
window-
-
-
Method Details
-
getUIType
- Specified by:
getUITypein interfaceUIFunctions
-
bringToFront
public void bringToFront()Description copied from interface:UIFunctionsBring main window to the front- Specified by:
bringToFrontin interfaceUIFunctions
-
bringToFront
public void bringToFront(boolean tryTricks) Description copied from interface:UIFunctionsBring main window to the front- Specified by:
bringToFrontin interfaceUIFunctions- Parameters:
tryTricks- : try tricks to force it to the top
-
getVisibilityState
public int getVisibilityState()- Specified by:
getVisibilityStatein interfaceUIFunctions
-
closeDownloadBars
public void closeDownloadBars()- Specified by:
closeDownloadBarsin interfaceUIFunctionsSWT
-
dispose
public boolean dispose(boolean for_restart) - Specified by:
disposein interfaceUIFunctions
-
getMainShell
public org.eclipse.swt.widgets.Shell getMainShell()- Specified by:
getMainShellin interfaceUIFunctionsSWT
-
getPluginViews
- Specified by:
getPluginViewsin interfaceUIFunctionsSWT- Returns:
-
openPluginView
- Specified by:
openPluginViewin interfaceUIFunctionsSWT
-
refreshIconBar
public void refreshIconBar()- Specified by:
refreshIconBarin interfaceUIFunctions
-
refreshLanguage
public void refreshLanguage()Description copied from interface:UIFunctionsChange/Refresh the language of the UI- Specified by:
refreshLanguagein interfaceUIFunctions
-
setStatusText
- Specified by:
setStatusTextin interfaceUIFunctions- Parameters:
key-
-
setStatusText
- Specified by:
setStatusTextin interfaceUIFunctions
-
pushStatusText
- Specified by:
pushStatusTextin interfaceUIFunctions
-
popStatusText
- Specified by:
popStatusTextin interfaceUIFunctions
-
getMainStatusBar
- Specified by:
getMainStatusBarin interfaceUIFunctionsSWT
-
getUISWTInstance
- Specified by:
getUISWTInstancein interfaceUIFunctionsSWT
-
viewURL
- Specified by:
viewURLin interfaceUIFunctions
-
viewURL
public boolean viewURL(String url, String target, int w, int h, boolean allowResize, boolean isModal) - Specified by:
viewURLin interfaceUIFunctions
-
viewURL
public boolean viewURL(String url, String target, double w, double h, boolean allowResize, boolean isModal) - Specified by:
viewURLin interfaceUIFunctions
-
showURL
-
promptUser
public void promptUser(String title, String text, String[] buttons, int defaultOption, String rememberID, String rememberText, boolean rememberByDefault, int autoCloseInMS, UserPrompterResultListener l) - Specified by:
promptUserin interfaceUIFunctions
-
getUserPrompter
public UIFunctionsUserPrompter getUserPrompter(String title, String text, String[] buttons, int defaultOption) - Specified by:
getUserPrompterin interfaceUIFunctions
-
isGlobalTransferBarShown
public boolean isGlobalTransferBarShown()- Specified by:
isGlobalTransferBarShownin interfaceUIFunctionsSWT
-
showGlobalTransferBar
public void showGlobalTransferBar()- Specified by:
showGlobalTransferBarin interfaceUIFunctionsSWT
-
closeGlobalTransferBar
public void closeGlobalTransferBar()- Specified by:
closeGlobalTransferBarin interfaceUIFunctionsSWT
-
refreshTorrentMenu
public void refreshTorrentMenu()- Specified by:
refreshTorrentMenuin interfaceUIFunctionsSWT
-
createMainMenu
Description copied from interface:UIFunctionsSWTCreates the main application menu and attach it to the givenShell; this is only used for OSX so that we can attach the global menu to popup dialogs which is the expected behavior on OSX. Windows and Linux do not require this since they do not have a global menu and because their main menu is already attached to the main application window.- Specified by:
createMainMenuin interfaceUIFunctionsSWT- Parameters:
shell-- Returns:
-
getSkin
-
setSkin
-
getMainWindow
- Specified by:
getMainWindowin interfaceUIFunctionsSWT
-
getUIUpdater
Description copied from interface:UIFunctionsRetrieves the class that handles periodically updating the UI- Specified by:
getUIUpdaterin interfaceUIFunctions- Returns:
-
closeAllDetails
public void closeAllDetails()- Specified by:
closeAllDetailsin interfaceUIFunctionsSWT
-
hasDetailViews
public boolean hasDetailViews()- Specified by:
hasDetailViewsin interfaceUIFunctionsSWT- Returns:
-
performAction
- Specified by:
performActionin interfaceUIFunctions- Parameters:
action_id-args-listener-
-
showCoreWaitDlg
public org.eclipse.swt.widgets.Shell showCoreWaitDlg()- Specified by:
showCoreWaitDlgin interfaceUIFunctionsSWT
-
doSearch
- Specified by:
doSearchin interfaceUIFunctions- Parameters:
sSearchText-
-
doSearch
- Specified by:
doSearchin interfaceUIFunctions
-
checkForSpecialSearchTerm
-
promptForSearch
public void promptForSearch()- Specified by:
promptForSearchin interfaceUIFunctionsSWT
-
getMDI
Description copied from interface:UIFunctionsRetrieve the MDI (Sidebar, TabbedMDI)- Specified by:
getMDIin interfaceUIFunctions- Returns:
-
getMDISWT
- Specified by:
getMDISWTin interfaceUIFunctionsSWT
-
showErrorMessage
- Specified by:
showErrorMessagein interfaceUIFunctions- Parameters:
keyPrefix-details- may not get displayedtextParams-
-
forceNotify
public void forceNotify(int iconID, String title, String text, String details, Object[] relatedObjects, int timeoutSecs) Description copied from interface:UIFunctionsMight launch the old-school Mr Slidey- Specified by:
forceNotifyin interfaceUIFunctions
-
installPlugin
public void installPlugin(String plugin_id, String resource_prefix, UIFunctions.actionListener listener) - Specified by:
installPluginin interfaceUIFunctions
-
getToolBarManager
- Specified by:
getToolBarManagerin interfaceUIFunctionsSWT
-
runOnUIThread
- Specified by:
runOnUIThreadin interfaceUIFunctions
-
isUIThread
public boolean isUIThread()- Specified by:
isUIThreadin interfaceUIFunctions
-
isProgramInstalled
- Specified by:
isProgramInstalledin interfaceUIFunctions
-
openRemotePairingWindow
public void openRemotePairingWindow()- Specified by:
openRemotePairingWindowin interfaceUIFunctions
-
playOrStreamDataSource
public void playOrStreamDataSource(Object ds, String referal, boolean launch_already_checked, boolean complete_only) - Specified by:
playOrStreamDataSourcein interfaceUIFunctions
-
setHideAll
public void setHideAll(boolean hidden) - Specified by:
setHideAllin interfaceUIFunctionsSWT
-
getHideAll
public boolean getHideAll()- Specified by:
getHideAllin interfaceUIFunctionsSWT
-
addTorrentWithOptions
Description copied from interface:UIFunctionsOpens the Torrent Add Options Window, if configured to- Specified by:
addTorrentWithOptionsin interfaceUIFunctions- Parameters:
force- Override configuration, show it!- Returns:
- true if torrent was added
-
addTorrentWithOptions
public boolean addTorrentWithOptions(TorrentOpenOptions torrentOptions, Map<String, Object> addOptions) - Specified by:
addTorrentWithOptionsin interfaceUIFunctions
-
addTorrentWithOptionsSupport
private boolean addTorrentWithOptionsSupport(TorrentOpenOptions torrentOptions, Map<String, Object> addOptions, boolean is_silent) -
openTorrentOpenOptions
public void openTorrentOpenOptions(org.eclipse.swt.widgets.Shell shell, String sPathOfFilesToOpen, String[] sFilesToOpen, boolean defaultToStopped, boolean forceOpen) - Specified by:
openTorrentOpenOptionsin interfaceUIFunctionsSWT
-
openTorrentOpenOptions
public void openTorrentOpenOptions(org.eclipse.swt.widgets.Shell shell, String sPathOfFilesToOpen, String[] sFilesToOpen, Map<String, Object> options) - Specified by:
openTorrentOpenOptionsin interfaceUIFunctionsSWT- Parameters:
shell-sPathOfFilesToOpen-sFilesToOpen-options- See UIFunctions constants
-
getTorrentOptions
- Specified by:
getTorrentOptionsin interfaceUIFunctions
-
openTorrentWindow
public void openTorrentWindow()- Specified by:
openTorrentWindowin interfaceUIFunctionsSWT
-
showCreateTagDialog
- Specified by:
showCreateTagDialogin interfaceUIFunctions
-
tableColumnAddedListeners
- Specified by:
tableColumnAddedListenersin interfaceUIFunctions
-
copyToClipboard
- Specified by:
copyToClipboardin interfaceUIFunctions
-
showInExplorer
- Specified by:
showInExplorerin interfaceUIFunctions
-
showText
- Specified by:
showTextin interfaceUIFunctions
-
dispose
public void dispose()
-