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 Details

  • Method Details

    • getUIType

      String 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.

      This method returns blocks the UI until the user makes a choice. It's recommended to use promptUser(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 buttons
      listener - triggered after user chooses an option
      Since:
      1.7.0.1
    • 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()