Package com.biglybt.pif.ui
Interface UIInstance
- All Known Subinterfaces:
UIInstanceBase
,UISWTInstance
- All Known Implementing Classes:
UI
,UISWTInstanceImpl
,UISWTInstanceImpl.instanceWrapper
public interface UIInstance
This interface represents a UI running on the core (e.g. the SWT UI).
The actual implementation of this will support UI-specific operations -
you need to cast this to the appropriate type to access them.
This is to allow "native" UI plugin access - for example a plugin that
directly accesses SWT functionality would do it via this object (it'll be
an instance of com.biglybt.ui.swt.pif.UISWTInstance )
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionCreates aUIMessage
instance to allow a plugin to inform or ask the user something.Creates aUIInputReceiver
instance to allow a plugin to request text input from the user.boolean
openView
(BasicPluginViewModel model) int
promptUser
(String title, String text, String[] options, int defaultOption) Prompts the user with a title, text, and a series of options.void
promptUser
(String title, String text, String[] options, int defaultOption, UIMessageListener listener) Prompts the user with a title, text, and a series of options.
-
Field Details
-
UIT_SWT
- See Also:
-
UIT_CONSOLE
- See Also:
-
-
Method Details
-
getUIType
String getUIType()- Returns:
- Since:
- 4.8.1.3
-
openView
-
promptUser
Prompts the user with a title, text, and a series of options. The options are typically displayed as buttons. This method returns blocks the UI until the user makes a choice. It's recommended to usepromptUser(String, String, String[], int, UIMessageListener)
instead- Parameters:
title
-text
-options
-- Returns:
- Index of option chosen, -1 if cancelled or error
-
promptUser
void promptUser(String title, String text, String[] options, int defaultOption, UIMessageListener listener) Prompts the user with a title, text, and a series of options. The options are typically displayed as buttons. This method returns immediately.- Parameters:
options
- List of options to present to the user. Typically shown as buttonslistener
- triggered after user chooses an option- Since:
- 1.7.0.1
-
getInputReceiver
UIInputReceiver getInputReceiver()Creates aUIInputReceiver
instance to allow a plugin to request text input from the user. Some interfaces may not allow or support the ability for a plugin to request text input from a user, in which case they will returnnull
for this method. -
createMessage
UIMessage createMessage()Creates aUIMessage
instance to allow a plugin to inform or ask the user something. Some interfaces may not allow or support the ability for a plugin to ask a user in this manner, in which case they will returnnull
for this method.- Since:
- 3.0.5.3
-
getToolBarManager
UIToolBarManager getToolBarManager()
-