|
|||||||||
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 java.lang.String |
VIEW_CONFIG
|
static java.lang.String |
VIEW_MAIN
ID of main view |
static java.lang.String |
VIEW_MYTORRENTS
ID of "My Torrents" view |
static java.lang.String |
VIEW_SIDEBAR_AREA
|
static java.lang.String |
VIEW_STATISTICS
|
static java.lang.String |
VIEW_TOPBAR
ID of the top bar of az3ui |
static 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" |
static java.lang.String |
VIEW_TORRENT_FILES
ID of "Files" view |
static java.lang.String |
VIEW_TORRENT_PEERS
ID of "Peers" view |
static java.lang.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(java.lang.String sParentID,
java.lang.String sViewID,
java.lang.Class<? extends UISWTViewEventListener> cla,
java.lang.Object initalDatasource)
Add a view to an Azureus parent view. |
void |
addView(java.lang.String sParentID,
java.lang.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(java.lang.String sParentID)
Get a list of views currently open on the specified VIEW_* view |
UISWTInstance.UISWTViewEventListenerWrapper[] |
getViewListeners(java.lang.String sParentID)
|
org.eclipse.swt.graphics.Image |
loadImage(java.lang.String resource)
|
void |
openConfig(BasicPluginConfigModel model)
Opens the window linked to a given BasicPluginViewModel object. |
void |
openMainView(java.lang.String sViewID,
UISWTViewEventListener l,
java.lang.Object dataSource)
Create and open a view in the main window immediately. |
void |
openMainView(java.lang.String sViewID,
UISWTViewEventListener l,
java.lang.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(java.lang.String sParentID,
java.lang.String sViewID,
java.lang.Object dataSource)
Open a previously added view |
boolean |
openView(java.lang.String sParentID,
java.lang.String sViewID,
java.lang.Object dataSource,
boolean setfocus)
Open a previously added view |
void |
removeViews(java.lang.String sParentID,
java.lang.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 java.lang.String VIEW_MAIN
static final java.lang.String VIEW_MYTORRENTS
static final java.lang.String VIEW_TORRENT_DETAILS
static final java.lang.String VIEW_TORRENT_PEERS
static final java.lang.String VIEW_TORRENT_PIECES
static final java.lang.String VIEW_TORRENT_FILES
static final java.lang.String VIEW_TOPBAR
static final java.lang.String VIEW_STATISTICS
static final java.lang.String VIEW_CONFIG
static final java.lang.String VIEW_SIDEBAR_AREA
Method Detail |
---|
org.eclipse.swt.widgets.Display getDisplay()
org.eclipse.swt.graphics.Image loadImage(java.lang.String resource)
UISWTGraphic createGraphic(org.eclipse.swt.graphics.Image img)
img
- Image to assign to the object
void addView(java.lang.String sParentID, java.lang.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(java.lang.String sParentID, java.lang.String sViewID, java.lang.Class<? extends UISWTViewEventListener> cla, java.lang.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(java.lang.String sParentID, java.lang.String sViewID, java.lang.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(java.lang.String sParentID, java.lang.String sViewID, java.lang.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(java.lang.String sViewID, UISWTViewEventListener l, java.lang.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(java.lang.String sViewID, UISWTViewEventListener l, java.lang.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(java.lang.String sParentID, java.lang.String sViewID)
UIPluginView.closeView()
sParentID
- One of VIEW_* constantssViewID
- View ID to removeUISWTView[] getOpenViews(java.lang.String sParentID)
sParentID
- VIEW_* constant
UISWTInstance.UISWTViewEventListenerWrapper[] getViewListeners(java.lang.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 |