|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gudy.azureus2.ui.swt.pluginsimpl.UISWTInstanceImpl
public class UISWTInstanceImpl
| Nested Class Summary | |
|---|---|
protected static class |
UISWTInstanceImpl.instanceWrapper
|
static interface |
UISWTInstanceImpl.SWTViewListener
|
| 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 |
| Constructor Summary | |
|---|---|
UISWTInstanceImpl()
|
|
| Method Summary | |
|---|---|
void |
addSWTViewListener(UISWTInstanceImpl.SWTViewListener l)
|
void |
addView(PluginInterface pi,
java.lang.String sParentID,
java.lang.String sViewID,
java.lang.Class<? extends UISWTViewEventListener> cla,
java.lang.Object datasource)
|
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. |
void |
addView(java.lang.String sParentID,
java.lang.String sViewID,
UISWTViewEventListenerHolder holder)
|
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. |
void |
detach()
This method will be called by the UI manager when detaching the UI to permit the action to be vetoed/any detach logic to occur. |
boolean |
eventOccurred(UIManagerEvent event)
Return true if the event has been handled |
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. |
UIInstance |
getInstance(PluginInterface plugin_interface)
Some UI instances need to understand which plugin they are associated with. |
UISWTView[] |
getOpenViews(java.lang.String sParentID)
Get a list of views currently open on the specified VIEW_* view |
UIToolBarManager |
getToolBarManager()
|
int |
getUIType()
|
UISWTViewEventListenerHolder[] |
getViewListeners(java.lang.String sParentID)
|
void |
init(IUIIntializer init)
|
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(PluginInterface pi,
java.lang.String sViewID,
UISWTViewEventListener l,
java.lang.Object dataSource)
|
void |
openMainView(PluginInterface pi,
java.lang.String sViewID,
UISWTViewEventListener _l,
java.lang.Object dataSource,
boolean setfocus)
|
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 |
removeSWTViewListener(UISWTInstanceImpl.SWTViewListener l)
|
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 |
|---|
public UISWTInstanceImpl()
| Method Detail |
|---|
public int getUIType()
getUIType in interface UIInstancepublic void init(IUIIntializer init)
public UIInstance getInstance(PluginInterface plugin_interface)
UIInstanceFactory
getInstance in interface UIInstanceFactorypublic boolean eventOccurred(UIManagerEvent event)
UIManagerEventListener
eventOccurred in interface UIManagerEventListenerpublic org.eclipse.swt.widgets.Display getDisplay()
UISWTInstance
getDisplay in interface UISWTInstancepublic org.eclipse.swt.graphics.Image loadImage(java.lang.String resource)
loadImage in interface UISWTInstancepublic UISWTGraphic createGraphic(org.eclipse.swt.graphics.Image img)
UISWTInstance
createGraphic in interface UISWTInstanceimg - Image to assign to the object
public org.eclipse.swt.widgets.Shell createShell(int style)
UISWTInstance
createShell in interface UISWTInstance
public void detach()
throws UIException
UIInstanceFactory
detach in interface UIInstanceFactoryUIException
public void addView(java.lang.String sParentID,
java.lang.String sViewID,
java.lang.Class<? extends UISWTViewEventListener> cla,
java.lang.Object datasource)
UISWTInstanceUISWTInstance.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 UISWTInstancesParentID - VIEW_* constantsViewID - of your view. Used as part of the resource id.cla - Class of the Listener to be created and triggered
public void addView(PluginInterface pi,
java.lang.String sParentID,
java.lang.String sViewID,
java.lang.Class<? extends UISWTViewEventListener> cla,
java.lang.Object datasource)
public void addView(java.lang.String sParentID,
java.lang.String sViewID,
UISWTViewEventListener l)
UISWTInstance
addView in interface UISWTInstancesParentID - 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 happened
public void addView(java.lang.String sParentID,
java.lang.String sViewID,
UISWTViewEventListenerHolder holder)
public void addSWTViewListener(UISWTInstanceImpl.SWTViewListener l)
public void removeSWTViewListener(UISWTInstanceImpl.SWTViewListener l)
public void removeViews(java.lang.String sParentID,
java.lang.String sViewID)
UISWTInstanceUIPluginView.closeView()
removeViews in interface UISWTInstancesParentID - One of VIEW_* constantssViewID - View ID to remove
public boolean openView(java.lang.String sParentID,
java.lang.String sViewID,
java.lang.Object dataSource)
UISWTInstance
openView in interface UISWTInstancesParentID - 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 UISWTInstancesParentID - 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 void openMainView(java.lang.String sViewID,
UISWTViewEventListener l,
java.lang.Object dataSource)
UISWTInstanceUIManagerListener.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 UISWTInstancesViewID - ID to give your viewl - Listener to be triggered when View Events occurdataSource - objects to set UISWTView.getDataSource() with
public void openMainView(PluginInterface pi,
java.lang.String sViewID,
UISWTViewEventListener l,
java.lang.Object dataSource)
public void openMainView(java.lang.String sViewID,
UISWTViewEventListener l,
java.lang.Object dataSource,
boolean setfocus)
UISWTInstanceUIManagerListener.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 UISWTInstancesViewID - 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 openMainView(PluginInterface pi,
java.lang.String sViewID,
UISWTViewEventListener _l,
java.lang.Object dataSource,
boolean setfocus)
public UISWTView[] getOpenViews(java.lang.String sParentID)
UISWTInstance
getOpenViews in interface UISWTInstancesParentID - 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 void showDownloadBar(Download download,
boolean display)
UISWTInstance
showDownloadBar in interface UISWTInstancedownload - Download to use.display - true to show a download bar, false to hide it.public void showTransfersBar(boolean display)
UISWTInstance
showTransfersBar in interface UISWTInstancedisplay - true to show the bar, false to hide it.public UISWTViewEventListenerHolder[] getViewListeners(java.lang.String sParentID)
getViewListeners in interface UISWTInstancepublic UIInputReceiver getInputReceiver()
UIInstanceUIInputReceiver 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 UIInstancepublic UIMessage createMessage()
UIInstanceUIMessage 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 UIInstancepublic UISWTStatusEntry createStatusEntry()
UISWTInstance
createStatusEntry in interface UISWTInstanceUISWTStatusEntrypublic boolean openView(BasicPluginViewModel model)
UISWTInstance
openView in interface UIInstanceopenView in interface UISWTInstancepublic void openConfig(BasicPluginConfigModel model)
UISWTInstance
openConfig in interface UISWTInstancepublic UIToolBarManager getToolBarManager()
getToolBarManager in interface UIInstancepublic 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 | ||||||||