Package com.biglybt.pif.ui
Interface UIManager
-
- All Known Implementing Classes:
UIManagerImpl
public interface UIManager
Management tools for the user interface.To get an UIManager, see
PluginInterface.getUIManager()
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MB_PARAM_AUTO_CLOSE_MS
static java.lang.String
MB_PARAM_REMEMBER_BY_DEF
static java.lang.String
MB_PARAM_REMEMBER_ID
static java.lang.String
MB_PARAM_REMEMBER_IF_ONLY_BUTTON
static java.lang.String
MB_PARAM_REMEMBER_RES
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDataSourceListener(UIDataSourceListener l, boolean triggerNow)
void
addUIEventListener(UIManagerEventListener listener)
Add a listener that's triggered on when core/plugins need to do an UI-only task, such as display a message to a user, or open an URL in a browser.void
addUIListener(UIManagerListener listener)
Listen forUIManagerListener.UIAttached(UIInstance)
andUIManagerListener.UIDetached(UIInstance)
events.void
attachUI(UIInstanceFactory factory)
attach a new UIvoid
copyToClipBoard(java.lang.String data)
BasicPluginConfigModel
createBasicPluginConfigModel(java.lang.String section_name)
Creates a basic plugin view model and places it inside the plugins section of the configuration page.BasicPluginConfigModel
createBasicPluginConfigModel(java.lang.String parent_section, java.lang.String section_name)
Creates a basic plugin view model and adds it to the plugin in one step.BasicPluginViewModel
createBasicPluginViewModel(java.lang.String name)
Creates a basic plugin view model and adds it to the plugin in one step.BasicPluginViewModel
createLoggingViewModel(LoggerChannel channel, boolean use_plugin_name)
Creates aBasicPluginViewModel
object primarily to be used for storing logging output.UIMessage
createMessage()
Retrieves aUIMessage
from any interface available, or returns null if one is not available.void
detachUI(UIInstanceFactory factory)
detach a UI - can fail if the UI doesn't support detachingjava.lang.Object
getDataSource()
UIInputReceiver
getInputReceiver()
Retrieves aUIInputReceiver
from any interface available, or returns null if one is not available.MenuManager
getMenuManager()
Retrieve the menu manager.PluginConfigModel[]
getPluginConfigModels()
TableManager
getTableManager()
Retrieve the Table ManagerUIInstance[]
getUIInstances()
Returns an array of all currently attached user interfaces.boolean
hasUIInstances()
Returns true if there any user interfaces currently attached to Azureus.void
openFile(java.io.File file)
Opens up the file using the associated application.void
openTorrent(Torrent torrent)
void
openURL(java.net.URL url)
void
removeDataSourceListener(UIDataSourceListener l)
void
removeUIEventListener(UIManagerEventListener listener)
Remove previously added UIManagerEventListenervoid
removeUIListener(UIManagerListener listener)
Remove an existingUIManagerListener
void
setEverythingHidden(boolean hidden)
boolean
showConfigSection(java.lang.String sectionID)
Open Config View to the section specifiedvoid
showFile(java.io.File file)
Shows the file in a file explorer application in its parent folder.long
showMessageBox(java.lang.String title_resource, java.lang.String message_resource, long message_map)
long
showMessageBox(java.lang.String title_resource, java.lang.String message_resource, long message_map, java.lang.Object[] params)
long
showMessageBox(java.lang.String title_resource, java.lang.String message_resource, long message_map, java.util.Map<java.lang.String,java.lang.Object> params)
void
showTextMessage(java.lang.String title_resource, java.lang.String message_resource, java.lang.String contents)
void
toggleEverythingHidden()
-
-
-
Field Detail
-
MB_PARAM_REMEMBER_ID
static final java.lang.String MB_PARAM_REMEMBER_ID
- See Also:
- Constant Field Values
-
MB_PARAM_REMEMBER_BY_DEF
static final java.lang.String MB_PARAM_REMEMBER_BY_DEF
- See Also:
- Constant Field Values
-
MB_PARAM_REMEMBER_RES
static final java.lang.String MB_PARAM_REMEMBER_RES
- See Also:
- Constant Field Values
-
MB_PARAM_REMEMBER_IF_ONLY_BUTTON
static final java.lang.String MB_PARAM_REMEMBER_IF_ONLY_BUTTON
- See Also:
- Constant Field Values
-
MB_PARAM_AUTO_CLOSE_MS
static final java.lang.String MB_PARAM_AUTO_CLOSE_MS
- See Also:
- Constant Field Values
-
-
Method Detail
-
createBasicPluginConfigModel
BasicPluginConfigModel createBasicPluginConfigModel(java.lang.String section_name)
Creates a basic plugin view model and places it inside the plugins section of the configuration page.- Parameters:
section_name
- Message Bundle resource id for the config model. This will be used as the name of the config page, as well as an unique id- Returns:
- BasicPluginConfigModel
- Since:
- 2.1.0.0
-
createBasicPluginConfigModel
BasicPluginConfigModel createBasicPluginConfigModel(java.lang.String parent_section, java.lang.String section_name)
Creates a basic plugin view model and adds it to the plugin in one step. view is placed inside the plugins section of the configuration page.- Parameters:
parent_section
- seeConfigSection
.SECTION_*section_name
- Message Bundle resource id for the config model. This will be used as the name of the config page, as well as an unique id- Returns:
- BasicPluginConfigModel
- Since:
- 2.1.0.0
-
getPluginConfigModels
PluginConfigModel[] getPluginConfigModels()
- Returns:
- Since:
- 2.5.0.1
-
createBasicPluginViewModel
BasicPluginViewModel createBasicPluginViewModel(java.lang.String name)
Creates a basic plugin view model and adds it to the plugin in one step.- Parameters:
name
- The name for the view (this should be localised text, rather than a message string).- Returns:
- BasicPluginViewModel
- Since:
- 2.1.0.2
-
createLoggingViewModel
BasicPluginViewModel createLoggingViewModel(LoggerChannel channel, boolean use_plugin_name)
Creates aBasicPluginViewModel
object primarily to be used for storing logging output. This is just a shortcut way of creating a log view for the logger channel.- Parameters:
channel
- TheLoggerChannel
to associate with.use_plugin_name
- If set to true, the log view will be taken from the plugin name, if false, it will be taken from the channel name.- Since:
- 3.1.1.1
-
copyToClipBoard
void copyToClipBoard(java.lang.String data) throws UIException
- Parameters:
data
-- Throws:
UIException
- Since:
- 2.1.0.0
-
getTableManager
TableManager getTableManager()
Retrieve the Table Manager- Returns:
- Table management functions
- Since:
- 2.1.0.0
-
showTextMessage
void showTextMessage(java.lang.String title_resource, java.lang.String message_resource, java.lang.String contents)
- Parameters:
title_resource
-message_resource
-contents
-- Since:
- 2.3.0.5
-
showMessageBox
long showMessageBox(java.lang.String title_resource, java.lang.String message_resource, long message_map)
- Parameters:
title_resource
-message_resource
-message_map
- - see UIManagerEvent.MT_x- Returns:
- selected value
- Since:
- 3.0.5.3
-
showMessageBox
long showMessageBox(java.lang.String title_resource, java.lang.String message_resource, long message_map, java.lang.Object[] params)
- Parameters:
title_resource
-message_resource
-message_map
- - see UIManagerEvent.MT_xparams
- - [ remember-id (String), remember-by-default (Boolean), remember-resource (String) ]- Returns:
- selected value
- Since:
- 4.8.1.3
-
showMessageBox
long showMessageBox(java.lang.String title_resource, java.lang.String message_resource, long message_map, java.util.Map<java.lang.String,java.lang.Object> params)
- Parameters:
title_resource
-message_resource
-message_map
-params
-- Returns:
- Since:
- 5621
-
openURL
void openURL(java.net.URL url) throws UIException
- Parameters:
url
-- Throws:
UIException
- Since:
- 2.3.0.6
-
openTorrent
void openTorrent(Torrent torrent)
- Parameters:
torrent
-- Since:
- 3.0.5.3
-
showConfigSection
boolean showConfigSection(java.lang.String sectionID)
Open Config View to the section specified- Parameters:
sectionID
- ID of section to open to.ConfigSection
.SECTION_* constants- Returns:
- true-Section opened; false-Section invalid or UI does not support config views
- Since:
- 2.3.0.7
-
getMenuManager
MenuManager getMenuManager()
Retrieve the menu manager.- Returns:
- Menu management functions
- Since:
- 3.0.0.7
-
attachUI
void attachUI(UIInstanceFactory factory) throws UIException
attach a new UI- Parameters:
factory
-- Throws:
UIException
- Since:
- 2.3.0.5
-
detachUI
void detachUI(UIInstanceFactory factory) throws UIException
detach a UI - can fail if the UI doesn't support detaching- Parameters:
factory
-- Throws:
UIException
- Since:
- 2.3.0.5
-
addUIListener
void addUIListener(UIManagerListener listener)
Listen forUIManagerListener.UIAttached(UIInstance)
andUIManagerListener.UIDetached(UIInstance)
events. Typically, you hook this listener so you can accessUISWTInstance
when it gets created. Will fire UIAttached for managers already attached- Since:
- 2.3.0.5
-
removeUIListener
void removeUIListener(UIManagerListener listener)
Remove an existingUIManagerListener
- Parameters:
listener
- Listener to remove- Since:
- 2.3.0.5
-
addUIEventListener
void addUIEventListener(UIManagerEventListener listener)
Add a listener that's triggered on when core/plugins need to do an UI-only task, such as display a message to a user, or open an URL in a browser. SeeUIManagerEvent
for types of events- Since:
- 2.3.0.5
-
removeUIEventListener
void removeUIEventListener(UIManagerEventListener listener)
Remove previously added UIManagerEventListener- Since:
- 2.3.0.5
-
hasUIInstances
boolean hasUIInstances()
Returns true if there any user interfaces currently attached to Azureus. Note that this value may change over time, and that at the point when a plugin is being initialised, there is no guarantee over whether if the user interfaces will have been created yet or not. If you want to monitor what user interfaces are being attached / detached from Azureus, you should add a UIListener to this object.- Since:
- 3.0.0.7
-
getUIInstances
UIInstance[] getUIInstances()
Returns an array of all currently attached user interfaces. Note that this value may change over time, and that at the point when a plugin is being initialised, there is no guarantee over whether if the user interfaces will have been created yet or not. If you want to monitor what user interfaces are being attached / detached from Azureus, you should add a UIListener to this object.- Since:
- 3.0.0.7
-
getInputReceiver
UIInputReceiver getInputReceiver()
Retrieves aUIInputReceiver
from any interface available, or returns null if one is not available. This is a convenience method to allow you to grab an instance without having to iterate over any attached interfaces.- Since:
- 3.0.5.3
- See Also:
UIInstance.getInputReceiver()
-
createMessage
UIMessage createMessage()
Retrieves aUIMessage
from any interface available, or returns null if one is not available. This is a convenience method to allow you to grab an instance without having to iterate over any attached interfaces.- Since:
- 3.0.5.3
- See Also:
UIInstance.createMessage()
-
openFile
void openFile(java.io.File file)
Opens up the file using the associated application.- Parameters:
file
- The file to open.- Since:
- 3.0.5.3
-
showFile
void showFile(java.io.File file)
Shows the file in a file explorer application in its parent folder.- Parameters:
file
- The file to show.- Since:
- 3.0.5.3
-
addDataSourceListener
void addDataSourceListener(UIDataSourceListener l, boolean triggerNow)
-
removeDataSourceListener
void removeDataSourceListener(UIDataSourceListener l)
-
getDataSource
java.lang.Object getDataSource()
-
setEverythingHidden
void setEverythingHidden(boolean hidden)
-
toggleEverythingHidden
void toggleEverythingHidden()
- Since:
- BiglyBT 1.2.0.1
-
-