|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.ui.swt.pluginsimpl.UISWTInstanceImpl.instanceWrapper
protected static class UISWTInstanceImpl.instanceWrapper
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.gudy.azureus2.ui.swt.plugins.UISWTInstance |
---|
UISWTInstance.UISWTViewEventListenerWrapper |
Field Summary |
---|
Fields inherited from interface org.gudy.azureus2.ui.swt.plugins.UISWTInstance |
---|
VIEW_CONFIG, VIEW_MAIN, VIEW_MYTORRENTS, VIEW_SIDEBAR_AREA, VIEW_STATISTICS, VIEW_TOPBAR, VIEW_TORRENT_DETAILS, VIEW_TORRENT_FILES, VIEW_TORRENT_PEERS, VIEW_TORRENT_PIECES |
Fields inherited from interface org.gudy.azureus2.plugins.ui.UIInstance |
---|
UIT_CONSOLE, UIT_SWT |
Fields inherited from interface org.gudy.azureus2.plugins.ui.toolbar.UIToolBarManager |
---|
GROUP_BIG, GROUP_MAIN |
Constructor Summary | |
---|---|
protected |
UISWTInstanceImpl.instanceWrapper(PluginInterface _pi,
UIFunctionsSWT _ui_functions,
UISWTInstanceImpl _delegate)
|
Method Summary | |
---|---|
void |
addToolBarItem(UIToolBarItem item)
Adds a UIToolBarItem to the UI. |
void |
addView(java.lang.String sParentID,
java.lang.String sViewID,
java.lang.Class<? extends UISWTViewEventListener> cla,
java.lang.Object datasource)
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 |
UIMessage |
createMessage()
Creates a UIMessage instance to allow a plugin to inform or ask the
user something. |
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. |
UIToolBarItem |
createToolBarItem(java.lang.String id)
Create a new UIToolBarItem . |
void |
detach()
|
UIToolBarItem[] |
getAllToolBarItems()
|
org.eclipse.swt.widgets.Display |
getDisplay()
Retrieve the SWT Display object that Azureus uses (when in SWT mode). |
UIInputReceiver |
getInputReceiver()
Creates a UIInputReceiver instance to allow a plugin to request
text input from the user. |
UISWTView[] |
getOpenViews(java.lang.String sParentID)
Get a list of views currently open on the specified VIEW_* view |
UIToolBarItem |
getToolBarItem(java.lang.String id)
|
UIToolBarManager |
getToolBarManager()
|
int |
getUIType()
|
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 |
int |
promptUser(java.lang.String title,
java.lang.String text,
java.lang.String[] options,
int defaultOption)
Prompts the user with a title, text, and a series of options. |
void |
removeToolBarItem(java.lang.String id)
|
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. |
void |
unload(PluginInterface pi)
PluginInterface is unloading.. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected UISWTInstanceImpl.instanceWrapper(PluginInterface _pi, UIFunctionsSWT _ui_functions, UISWTInstanceImpl _delegate)
Method Detail |
---|
public UIToolBarItem getToolBarItem(java.lang.String id)
getToolBarItem
in interface UIToolBarManager
public UIToolBarItem[] getAllToolBarItems()
getAllToolBarItems
in interface UIToolBarManager
public UIToolBarItem createToolBarItem(java.lang.String id)
UIToolBarManager
UIToolBarItem
. You will still need to add it
via UIToolBarManager.addToolBarItem(UIToolBarItem)
, after setting the item's
properties
createToolBarItem
in interface UIToolBarManager
id
- unique id
public void addToolBarItem(UIToolBarItem item)
UIToolBarManager
UIToolBarItem
to the UI. Make sure you at least set the
icon before adding
addToolBarItem
in interface UIToolBarManager
public void removeToolBarItem(java.lang.String id)
removeToolBarItem
in interface UIToolBarManager
public void detach() throws UIException
UIException
public int getUIType()
getUIType
in interface UIInstance
public org.eclipse.swt.widgets.Display getDisplay()
UISWTInstance
getDisplay
in interface UISWTInstance
public org.eclipse.swt.graphics.Image loadImage(java.lang.String resource)
loadImage
in interface UISWTInstance
public UISWTGraphic createGraphic(org.eclipse.swt.graphics.Image img)
UISWTInstance
createGraphic
in interface UISWTInstance
img
- Image to assign to the object
public void addView(java.lang.String sParentID, java.lang.String sViewID, UISWTViewEventListener l)
UISWTInstance
addView
in interface UISWTInstance
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 happenedpublic void addView(java.lang.String sParentID, java.lang.String sViewID, java.lang.Class<? extends UISWTViewEventListener> cla, java.lang.Object datasource)
UISWTInstance
UISWTInstance.VIEW_MAIN
window, this adds a menu option.
In comparison to UISWTInstance.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.
addView
in interface UISWTInstance
sParentID
- VIEW_* constantsViewID
- of your view. Used as part of the resource id.cla
- Class of the Listener to be created and triggeredpublic void openMainView(java.lang.String sViewID, UISWTViewEventListener l, java.lang.Object dataSource)
UISWTInstance
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
openMainView
in interface UISWTInstance
sViewID
- ID to give your viewl
- Listener to be triggered when View Events occurdataSource
- objects to set UISWTView.getDataSource()
withpublic void openMainView(java.lang.String sViewID, UISWTViewEventListener l, java.lang.Object dataSource, boolean setfocus)
UISWTInstance
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
openMainView
in interface UISWTInstance
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.public void removeViews(java.lang.String sParentID, java.lang.String sViewID)
UISWTInstance
UIPluginView.closeView()
removeViews
in interface UISWTInstance
sParentID
- One of VIEW_* constantssViewID
- View ID to removepublic UISWTView[] getOpenViews(java.lang.String sParentID)
UISWTInstance
getOpenViews
in interface UISWTInstance
sParentID
- VIEW_* constant
public int promptUser(java.lang.String title, java.lang.String text, java.lang.String[] options, int defaultOption)
UIInstance
promptUser
in interface UIInstance
public boolean openView(java.lang.String sParentID, java.lang.String sViewID, java.lang.Object dataSource)
UISWTInstance
openView
in interface UISWTInstance
sParentID
- ParentID of the view to be shownsViewID
- id of the view to be showndataSource
- any data you need to pass the view
public boolean openView(java.lang.String sParentID, java.lang.String sViewID, java.lang.Object dataSource, boolean setfocus)
UISWTInstance
openView
in interface UISWTInstance
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.
public UISWTInstance.UISWTViewEventListenerWrapper[] getViewListeners(java.lang.String sParentId)
getViewListeners
in interface UISWTInstance
public UIInputReceiver getInputReceiver()
UIInstance
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.
getInputReceiver
in interface UIInstance
public UIMessage createMessage()
UIInstance
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.
createMessage
in interface UIInstance
public void showDownloadBar(Download download, boolean display)
UISWTInstance
showDownloadBar
in interface UISWTInstance
download
- Download to use.display
- true to show a download bar, false to hide it.public void showTransfersBar(boolean display)
UISWTInstance
showTransfersBar
in interface UISWTInstance
display
- true to show the bar, false to hide it.public UISWTStatusEntry createStatusEntry()
UISWTInstance
createStatusEntry
in interface UISWTInstance
UISWTStatusEntry
public boolean openView(BasicPluginViewModel model)
UISWTInstance
openView
in interface UIInstance
openView
in interface UISWTInstance
public void openConfig(BasicPluginConfigModel model)
UISWTInstance
openConfig
in interface UISWTInstance
public org.eclipse.swt.widgets.Shell createShell(int style)
UISWTInstance
createShell
in interface UISWTInstance
public UIToolBarManager getToolBarManager()
getToolBarManager
in interface UIInstance
public void unload(PluginInterface pi)
UIInstanceBase
unload
in interface UIInstanceBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |