Interface UISWTInstance

    • Field Detail

      • VIEW_TORRENT_DETAILS

        static final java.lang.String VIEW_TORRENT_DETAILS
        ID of the torrent details view (The one you see when you right click on a torrent in Library and select "Details"

        If you are making a view that applies to any view showing Downloads, use registerView(Class, UISWTViewBuilder) with Download.class instead

        Since:
        Vuze 4.9.0.1
        See Also:
        Constant Field Values
      • VIEW_TOPBAR

        static final java.lang.String VIEW_TOPBAR
        ID of the top bar, usually located just above the Open/Find Torrents bar
        Since:
        Vuze 3.0.1.3
        See Also:
        Constant Field Values
      • VIEW_STATISTICS

        static final java.lang.String VIEW_STATISTICS
        Statistics View, usually invoked from Tools->Statistics
        See Also:
        Constant Field Values
      • VIEW_SIDEBAR_AREA

        static final java.lang.String VIEW_SIDEBAR_AREA
        ID for adding views to bottom of the sidebar
        See Also:
        Constant Field Values
    • Method Detail

      • getDisplay

        org.eclipse.swt.widgets.Display getDisplay()
        Retrieve the SWT Display object that Azureus uses (when in SWT mode). If you have a thread that does some periodic/asynchronous stuff, Azureus will crashes with and 'InvalidThreadAccess' exception unless you embed your calls in a Runnable, and use getDisplay().aSyncExec(Runnable r);
        Returns:
        SWT Display object that Azureus uses
        Since:
        2.3.0.5
      • loadImage

        org.eclipse.swt.graphics.Image loadImage​(java.lang.String resource)
      • createGraphic

        UISWTGraphic createGraphic​(org.eclipse.swt.graphics.Image img)
        Creates an UISWTGraphic object with the supplied SWT Image
        Parameters:
        img - Image to assign to the object
        Returns:
        a new UISWTGraphic object
        Since:
        2.3.0.5
      • registerView

        void registerView​(java.lang.Class forDataSourceType,
                          UISWTViewBuilder viewBuilder)
        Register a view that will be created when a certain datasource type is displayed

        For example, you can register an image rendering view for DiskManagerFileInfo

        When plugin is unloaded, any registrations will be automatically unregistered, and any views created from the builder will be automatically disposed

        Parameters:
        forDataSourceType - Class of datasource you want to add a view to, such as Download, DownloadTypeComplete, DownloadTypeIncomplete
        viewBuilder - use createViewBuilder(String, Class)
        Since:
        BiglyBT 2.1.0.1
      • registerView

        void registerView​(java.lang.String forViewID,
                          UISWTViewBuilder viewBuilder)
        Register a view that will be created when the specified view is displayed

        When plugin is unloaded, any registrations will be automatically unregistered, and any views created from the builder will be automatically disposed

        Parameters:
        forViewID - VIEW_ Constant
        viewBuilder - use createViewBuilder(String, Class)
        Since:
        BiglyBT 2.1.0.1
      • createViewBuilder

        UISWTViewBuilder createViewBuilder​(java.lang.String viewID,
                                           java.lang.Class<? extends UISWTViewEventListener> cla)
        Creates an object representing how your view is to be created
        Parameters:
        viewID - Unique ID of your view
        cla - A UISWTViewEventListener class that will be created when the UI shows the view.
        Since this class will be instantiated with cla.newInstance(), the class must be a top-level class, and not a local or non-static nested class.
        Returns:
        UISWTViewBuilder which has additional values you can set, such as initial datasource
        Since:
        BiglyBT 2.1.0.1
Parameters:
viewID - Unique ID of your view
Returns:
UISWTViewBuilder which has additional values you can set, such as initial datasource
Since:
BiglyBT 2.1.0.1