Package com.biglybt.ui.swt.shells.main
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 com.biglybt.ui.UIFunctions
UIFunctions.actionListener, UIFunctions.TagReturner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
private static final LogIDs
private final MainWindow
private static final String
private static final String
private final ParameterListener
private static final boolean
private SWTSkin
Stores the currentSWTSkin
so it can be used bycreateMainMenu(Shell)
Fields inherited from interface com.biglybt.ui.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 TypeMethodDescriptionboolean
addTorrentWithOptions
(boolean force, TorrentOpenOptions torrentOptions) Opens the Torrent Add Options Window, if configured toboolean
addTorrentWithOptions
(TorrentOpenOptions torrentOptions, Map<String, Object> addOptions) private boolean
addTorrentWithOptionsSupport
(TorrentOpenOptions torrentOptions, Map<String, Object> addOptions, boolean is_silent) void
Bring main window to the frontvoid
bringToFront
(boolean tryTricks) Bring main window to the frontprivate static boolean
void
void
void
void
copyToClipboard
(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.void
dispose()
boolean
dispose
(boolean for_restart) void
void
void
forceNotify
(int iconID, String title, String text, String details, Object[] relatedObjects, int timeoutSecs) Might launch the old-school Mr Slideyboolean
org.eclipse.swt.widgets.Shell
getMDI()
Retrieve the MDI (Sidebar, TabbedMDI)getSkin()
Retrieves the class that handles periodically updating the UIgetUserPrompter
(String title, String text, String[] buttons, int defaultOption) int
boolean
void
installPlugin
(String plugin_id, String resource_prefix, UIFunctions.actionListener listener) boolean
boolean
isProgramInstalled
(String extension, String name) boolean
void
openPluginView
(UISWTViewBuilderCore builder, boolean bSetFocus) void
void
openTorrentOpenOptions
(org.eclipse.swt.widgets.Shell shell, String sPathOfFilesToOpen, String[] sFilesToOpen, boolean defaultToStopped, boolean forceOpen) void
openTorrentOpenOptions
(org.eclipse.swt.widgets.Shell shell, String sPathOfFilesToOpen, String[] sFilesToOpen, Map<String, Object> options) void
void
performAction
(int action_id, Object args, UIFunctions.actionListener listener) void
playOrStreamDataSource
(Object ds, String referal, boolean launch_already_checked, boolean complete_only) void
popStatusText
(Object o, int reason, String message) void
void
promptUser
(String title, String text, String[] buttons, int defaultOption, String rememberID, String rememberText, boolean rememberByDefault, int autoCloseInMS, UserPrompterResultListener l) pushStatusText
(String key) void
void
Change/Refresh the language of the UIvoid
void
runOnUIThread
(String ui_type, Runnable runnable) void
setHideAll
(boolean hidden) void
void
setStatusText
(int statustype, String key, UIStatusTextClickListener l) void
setStatusText
(String key) org.eclipse.swt.widgets.Shell
void
showCreateTagDialog
(UIFunctions.TagReturner tagReturner) void
showErrorMessage
(String keyPrefix, String details, String[] textParams) void
void
void
private void
void
tableColumnAddedListeners
(TableColumnImpl tableColumn, Object listeners) boolean
boolean
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.ui.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 currentSWTSkin
so it can be used bycreateMainMenu(Shell)
-
isTorrentMenuVisible
protected boolean isTorrentMenuVisible -
paramShowTorrentsMenuListener
-
-
Constructor Details
-
UIFunctionsImpl
- Parameters:
window
-
-
-
Method Details
-
getUIType
- Specified by:
getUIType
in interfaceUIFunctions
-
bringToFront
public void bringToFront()Description copied from interface:UIFunctions
Bring main window to the front- Specified by:
bringToFront
in interfaceUIFunctions
-
bringToFront
public void bringToFront(boolean tryTricks) Description copied from interface:UIFunctions
Bring main window to the front- Specified by:
bringToFront
in interfaceUIFunctions
- Parameters:
tryTricks
- : try tricks to force it to the top
-
getVisibilityState
public int getVisibilityState()- Specified by:
getVisibilityState
in interfaceUIFunctions
-
closeDownloadBars
public void closeDownloadBars()- Specified by:
closeDownloadBars
in interfaceUIFunctionsSWT
-
dispose
public boolean dispose(boolean for_restart) - Specified by:
dispose
in interfaceUIFunctions
-
getMainShell
public org.eclipse.swt.widgets.Shell getMainShell()- Specified by:
getMainShell
in interfaceUIFunctionsSWT
-
getPluginViews
- Specified by:
getPluginViews
in interfaceUIFunctionsSWT
- Returns:
-
openPluginView
- Specified by:
openPluginView
in interfaceUIFunctionsSWT
-
refreshIconBar
public void refreshIconBar()- Specified by:
refreshIconBar
in interfaceUIFunctions
-
refreshLanguage
public void refreshLanguage()Description copied from interface:UIFunctions
Change/Refresh the language of the UI- Specified by:
refreshLanguage
in interfaceUIFunctions
-
setStatusText
- Specified by:
setStatusText
in interfaceUIFunctions
- Parameters:
key
-
-
setStatusText
- Specified by:
setStatusText
in interfaceUIFunctions
-
pushStatusText
- Specified by:
pushStatusText
in interfaceUIFunctions
-
popStatusText
- Specified by:
popStatusText
in interfaceUIFunctions
-
getMainStatusBar
- Specified by:
getMainStatusBar
in interfaceUIFunctionsSWT
-
getUISWTInstance
- Specified by:
getUISWTInstance
in interfaceUIFunctionsSWT
-
viewURL
- Specified by:
viewURL
in interfaceUIFunctions
-
viewURL
public boolean viewURL(String url, String target, int w, int h, boolean allowResize, boolean isModal) - Specified by:
viewURL
in interfaceUIFunctions
-
viewURL
public boolean viewURL(String url, String target, double w, double h, boolean allowResize, boolean isModal) - Specified by:
viewURL
in interfaceUIFunctions
-
showURL
- Parameters:
url
-target
-
-
promptUser
public void promptUser(String title, String text, String[] buttons, int defaultOption, String rememberID, String rememberText, boolean rememberByDefault, int autoCloseInMS, UserPrompterResultListener l) - Specified by:
promptUser
in interfaceUIFunctions
-
getUserPrompter
public UIFunctionsUserPrompter getUserPrompter(String title, String text, String[] buttons, int defaultOption) - Specified by:
getUserPrompter
in interfaceUIFunctions
-
isGlobalTransferBarShown
public boolean isGlobalTransferBarShown()- Specified by:
isGlobalTransferBarShown
in interfaceUIFunctionsSWT
-
showGlobalTransferBar
public void showGlobalTransferBar()- Specified by:
showGlobalTransferBar
in interfaceUIFunctionsSWT
-
closeGlobalTransferBar
public void closeGlobalTransferBar()- Specified by:
closeGlobalTransferBar
in interfaceUIFunctionsSWT
-
refreshTorrentMenu
public void refreshTorrentMenu()- Specified by:
refreshTorrentMenu
in interfaceUIFunctionsSWT
-
createMainMenu
Description copied from interface:UIFunctionsSWT
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. 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:
createMainMenu
in interfaceUIFunctionsSWT
- Parameters:
shell
-- Returns:
-
getSkin
-
setSkin
-
getMainWindow
- Specified by:
getMainWindow
in interfaceUIFunctionsSWT
-
getUIUpdater
Description copied from interface:UIFunctions
Retrieves the class that handles periodically updating the UI- Specified by:
getUIUpdater
in interfaceUIFunctions
- Returns:
-
closeAllDetails
public void closeAllDetails()- Specified by:
closeAllDetails
in interfaceUIFunctionsSWT
-
hasDetailViews
public boolean hasDetailViews()- Specified by:
hasDetailViews
in interfaceUIFunctionsSWT
- Returns:
-
performAction
- Specified by:
performAction
in interfaceUIFunctions
- Parameters:
action_id
-args
-listener
-
-
showCoreWaitDlg
public org.eclipse.swt.widgets.Shell showCoreWaitDlg()- Specified by:
showCoreWaitDlg
in interfaceUIFunctionsSWT
-
doSearch
- Specified by:
doSearch
in interfaceUIFunctions
- Parameters:
sSearchText
-
-
doSearch
- Specified by:
doSearch
in interfaceUIFunctions
-
checkForSpecialSearchTerm
-
promptForSearch
public void promptForSearch()- Specified by:
promptForSearch
in interfaceUIFunctionsSWT
-
getMDI
Description copied from interface:UIFunctions
Retrieve the MDI (Sidebar, TabbedMDI)- Specified by:
getMDI
in interfaceUIFunctions
- Returns:
-
getMDISWT
- Specified by:
getMDISWT
in interfaceUIFunctionsSWT
-
showErrorMessage
- Specified by:
showErrorMessage
in 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:UIFunctions
Might launch the old-school Mr Slidey- Specified by:
forceNotify
in interfaceUIFunctions
-
installPlugin
public void installPlugin(String plugin_id, String resource_prefix, UIFunctions.actionListener listener) - Specified by:
installPlugin
in interfaceUIFunctions
-
getToolBarManager
- Specified by:
getToolBarManager
in interfaceUIFunctionsSWT
-
runOnUIThread
- Specified by:
runOnUIThread
in interfaceUIFunctions
-
isUIThread
public boolean isUIThread()- Specified by:
isUIThread
in interfaceUIFunctions
-
isProgramInstalled
- Specified by:
isProgramInstalled
in interfaceUIFunctions
-
openRemotePairingWindow
public void openRemotePairingWindow()- Specified by:
openRemotePairingWindow
in interfaceUIFunctions
-
playOrStreamDataSource
public void playOrStreamDataSource(Object ds, String referal, boolean launch_already_checked, boolean complete_only) - Specified by:
playOrStreamDataSource
in interfaceUIFunctions
-
setHideAll
public void setHideAll(boolean hidden) - Specified by:
setHideAll
in interfaceUIFunctionsSWT
-
getHideAll
public boolean getHideAll()- Specified by:
getHideAll
in interfaceUIFunctionsSWT
-
addTorrentWithOptions
Description copied from interface:UIFunctions
Opens the Torrent Add Options Window, if configured to- Specified by:
addTorrentWithOptions
in 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:
addTorrentWithOptions
in 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:
openTorrentOpenOptions
in interfaceUIFunctionsSWT
-
openTorrentOpenOptions
public void openTorrentOpenOptions(org.eclipse.swt.widgets.Shell shell, String sPathOfFilesToOpen, String[] sFilesToOpen, Map<String, Object> options) - Specified by:
openTorrentOpenOptions
in interfaceUIFunctionsSWT
- Parameters:
shell
-sPathOfFilesToOpen
-sFilesToOpen
-options
- See UIFunctions constants
-
openTorrentWindow
public void openTorrentWindow()- Specified by:
openTorrentWindow
in interfaceUIFunctionsSWT
-
showCreateTagDialog
- Specified by:
showCreateTagDialog
in interfaceUIFunctions
-
tableColumnAddedListeners
- Specified by:
tableColumnAddedListeners
in interfaceUIFunctions
-
copyToClipboard
- Specified by:
copyToClipboard
in interfaceUIFunctions
-
showInExplorer
- Specified by:
showInExplorer
in interfaceUIFunctions
-
showText
- Specified by:
showText
in interfaceUIFunctions
-
dispose
public void dispose()
-