org.gudy.azureus2.plugins.ui
Interface UIInstance


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 org.gudy.azureus2.ui.swt.plugins.UISWTInstance )


Field Summary
static int UIT_CONSOLE
           
static int UIT_SWT
           
 
Method Summary
 UIMessage createMessage()
          Creates a UIMessage instance to allow a plugin to inform or ask the user something.
 UIInputReceiver getInputReceiver()
          Creates a UIInputReceiver instance to allow a plugin to request text input from the user.
 UIToolBarManager getToolBarManager()
           
 int getUIType()
           
 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.
 

Field Detail

UIT_SWT

static final int UIT_SWT
See Also:
Constant Field Values

UIT_CONSOLE

static final int UIT_CONSOLE
See Also:
Constant Field Values
Method Detail

getUIType

int getUIType()
Returns:
Since:
4.8.1.3

openView

boolean openView(BasicPluginViewModel model)

promptUser

int promptUser(String title,
               String text,
               String[] options,
               int defaultOption)
Prompts the user with a title, text, and a series of options. The options are typically displayed as buttons.

Parameters:
title -
text -
options -
Returns:
Index of option chosen, -1 if cancelled or error

getInputReceiver

UIInputReceiver getInputReceiver()
Creates a UIInputReceiver 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 return null for this method.


createMessage

UIMessage createMessage()
Creates a UIMessage 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 return null for this method.

Since:
3.0.5.3

getToolBarManager

UIToolBarManager getToolBarManager()