|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UISWTInstance
Tools to manage a SWT Instance
UIManagerListener
,
UIManager.addUIListener(UIManagerListener)
Nested Class Summary | |
---|---|
static interface |
UISWTInstance.UISWTViewEventListenerWrapper
|
Field Summary | |
---|---|
static String |
VIEW_CONFIG
|
static String |
VIEW_MAIN
ID of main view |
static String |
VIEW_MYTORRENTS
ID of "My Torrents" view |
static String |
VIEW_SIDEBAR_AREA
|
static String |
VIEW_STATISTICS
|
static String |
VIEW_TOPBAR
ID of the top bar of az3ui |
static 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" |
static String |
VIEW_TORRENT_FILES
ID of "Files" view |
static String |
VIEW_TORRENT_PEERS
ID of "Peers" view |
static String |
VIEW_TORRENT_PIECES
ID of "Pieces" view |
Fields inherited from interface org.gudy.azureus2.plugins.ui.UIInstance |
---|
UIT_CONSOLE, UIT_SWT |
Method Summary | |
---|---|
void |
addView(String sParentID,
String sViewID,
Class<? extends UISWTViewEventListener> cla,
Object initalDatasource)
Add a view to an Azureus parent view. |
void |
addView(String sParentID,
String sViewID,
UISWTViewEventListener l)
Add a detail view to an Azureus parent view. |
UISWTGraphic |
createGraphic(org.eclipse.swt.graphics.Image img)
Creates an UISWTGraphic object with the supplied SWT Image |
org.eclipse.swt.widgets.Shell |
createShell(int style)
Creates a SWT Shell, ensuring Vuze knows about it (ie. |
UISWTStatusEntry |
createStatusEntry()
Creates an entry in the status bar to display custom status information. |
org.eclipse.swt.widgets.Display |
getDisplay()
Retrieve the SWT Display object that Azureus uses (when in SWT mode). |
UISWTView[] |
getOpenViews(String sParentID)
Get a list of views currently open on the specified VIEW_* view |
UISWTInstance.UISWTViewEventListenerWrapper[] |
getViewListeners(String sParentID)
|
org.eclipse.swt.graphics.Image |
loadImage(String resource)
|
void |
openConfig(BasicPluginConfigModel model)
Opens the window linked to a given BasicPluginViewModel object. |
void |
openMainView(String sViewID,
UISWTViewEventListener l,
Object dataSource)
Create and open a view in the main window immediately. |
void |
openMainView(String sViewID,
UISWTViewEventListener l,
Object dataSource,
boolean setfocus)
Create and open a view in the main window immediately. |
boolean |
openView(BasicPluginViewModel model)
Opens the window linked to a given BasicPluginViewModel object. |
boolean |
openView(String sParentID,
String sViewID,
Object dataSource)
Open a previously added view |
boolean |
openView(String sParentID,
String sViewID,
Object dataSource,
boolean setfocus)
Open a previously added view |
void |
removeViews(String sParentID,
String sViewID)
Remove all views that belong to a specific parent and of a specific View ID. |
void |
showDownloadBar(Download download,
boolean display)
Shows or hides a download bar for a given download. |
void |
showTransfersBar(boolean display)
Shows or hides the transfers bar. |
Methods inherited from interface org.gudy.azureus2.ui.common.UIInstanceBase |
---|
unload |
Methods inherited from interface org.gudy.azureus2.plugins.ui.UIInstance |
---|
createMessage, getInputReceiver, getToolBarManager, getUIType, promptUser |
Field Detail |
---|
static final String VIEW_MAIN
static final String VIEW_MYTORRENTS
static final String VIEW_TORRENT_DETAILS
static final String VIEW_TORRENT_PEERS
static final String VIEW_TORRENT_PIECES
static final String VIEW_TORRENT_FILES
static final String VIEW_TOPBAR
static final String VIEW_STATISTICS
static final String VIEW_CONFIG
static final String VIEW_SIDEBAR_AREA
Method Detail |
---|
org.eclipse.swt.widgets.Display getDisplay()
org.eclipse.swt.graphics.Image loadImage(String resource)
UISWTGraphic createGraphic(org.eclipse.swt.graphics.Image img)
img
- Image to assign to the object
void addView(String sParentID, String sViewID, UISWTViewEventListener l)
sParentID
- VIEW_* constantsViewID
- of your view. Used as part of the resource id.l
- Listener to be triggered when parent view wants to tell you
an event has happenedvoid addView(String sParentID, String sViewID, Class<? extends UISWTViewEventListener> cla, Object initalDatasource)
VIEW_MAIN
window, this adds a menu option.
In comparison to addView(String, String, UISWTViewEventListener)
,
this method saves memory by not creating the UISWTViewEventListener
until it is needed. It also ensures that only one
UISWTViewEvent.TYPE_CREATE
event is triggered per instance.
sParentID
- VIEW_* constantsViewID
- of your view. Used as part of the resource id.cla
- Class of the Listener to be created and triggeredboolean openView(String sParentID, String sViewID, Object dataSource)
sParentID
- ParentID of the view to be shownsViewID
- id of the view to be showndataSource
- any data you need to pass the view
boolean openView(String sParentID, String sViewID, Object dataSource, boolean setfocus)
sParentID
- ParentID of the view to be shownsViewID
- id of the view to be showndataSource
- any data you need to pass the viewsetfocus
- true if you want to display the view immediately,
false if you want to display it in the background.
void openMainView(String sViewID, UISWTViewEventListener l, Object dataSource)
UIManagerListener.UIAttached(UIInstance)
,
the view will not gain focus.
Tip: You can add a menu item to a table view, and when triggered, have it open a new window, passing the datasources that were selected
sViewID
- ID to give your viewl
- Listener to be triggered when View Events occurdataSource
- objects to set UISWTView.getDataSource()
withvoid openMainView(String sViewID, UISWTViewEventListener l, Object dataSource, boolean setfocus)
UIManagerListener.UIAttached(UIInstance)
,
the view will not gain focus.
Tip: You can add a menu item to a table view, and when triggered, have it open a new window, passing the datasources that were selected
sViewID
- ID to give your viewl
- Listener to be triggered when View Events occurdataSource
- objects to set UISWTView.getDataSource()
withsetfocus
- true if you want to display the view immediately,
false if you want to display it in the background.void removeViews(String sParentID, String sViewID)
UIPluginView.closeView()
sParentID
- One of VIEW_* constantssViewID
- View ID to removeUISWTView[] getOpenViews(String sParentID)
sParentID
- VIEW_* constant
UISWTInstance.UISWTViewEventListenerWrapper[] getViewListeners(String sParentID)
void showDownloadBar(Download download, boolean display)
download
- Download to use.display
- true to show a download bar, false to hide it.void showTransfersBar(boolean display)
display
- true to show the bar, false to hide it.UISWTStatusEntry createStatusEntry()
UISWTStatusEntry
boolean openView(BasicPluginViewModel model)
openView
in interface UIInstance
void openConfig(BasicPluginConfigModel model)
org.eclipse.swt.widgets.Shell createShell(int style)
style
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |