|
|||||||||
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
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,
String sParentID,
String sViewID,
Class<? extends UISWTViewEventListener> cla,
Object datasource)
|
void |
addView(String sParentID,
String sViewID,
Class<? extends UISWTViewEventListener> cla,
Object datasource)
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. |
void |
addView(String sParentID,
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(String sParentID)
Get a list of views currently open on the specified VIEW_* view |
UIToolBarManager |
getToolBarManager()
|
int |
getUIType()
|
UISWTViewEventListenerHolder[] |
getViewListeners(String sParentID)
|
void |
init(IUIIntializer init)
|
org.eclipse.swt.graphics.Image |
loadImage(String resource)
|
void |
openConfig(BasicPluginConfigModel model)
Opens the window linked to a given BasicPluginViewModel object. |
void |
openMainView(PluginInterface pi,
String sViewID,
UISWTViewEventListener l,
Object dataSource)
|
void |
openMainView(PluginInterface pi,
String sViewID,
UISWTViewEventListener _l,
Object dataSource,
boolean setfocus)
|
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 |
int |
promptUser(String title,
String text,
String[] options,
int defaultOption)
Prompts the user with a title, text, and a series of options. |
void |
removeSWTViewListener(UISWTInstanceImpl.SWTViewListener l)
|
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. |
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 UIInstance
public void init(IUIIntializer init)
public UIInstance getInstance(PluginInterface plugin_interface)
UIInstanceFactory
getInstance
in interface UIInstanceFactory
public boolean eventOccurred(UIManagerEvent event)
UIManagerEventListener
eventOccurred
in interface UIManagerEventListener
public org.eclipse.swt.widgets.Display getDisplay()
UISWTInstance
getDisplay
in interface UISWTInstance
public org.eclipse.swt.graphics.Image loadImage(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 org.eclipse.swt.widgets.Shell createShell(int style)
UISWTInstance
createShell
in interface UISWTInstance
public void detach() throws UIException
UIInstanceFactory
detach
in interface UIInstanceFactory
UIException
public void addView(String sParentID, String sViewID, Class<? extends UISWTViewEventListener> cla, 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 addView(PluginInterface pi, String sParentID, String sViewID, Class<? extends UISWTViewEventListener> cla, Object datasource)
public void addView(String sParentID, 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(String sParentID, String sViewID, UISWTViewEventListenerHolder holder)
public void addSWTViewListener(UISWTInstanceImpl.SWTViewListener l)
public void removeSWTViewListener(UISWTInstanceImpl.SWTViewListener l)
public void removeViews(String sParentID, String sViewID)
UISWTInstance
UIPluginView.closeView()
removeViews
in interface UISWTInstance
sParentID
- One of VIEW_* constantssViewID
- View ID to removepublic boolean openView(String sParentID, String sViewID, 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(String sParentID, String sViewID, 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 void openMainView(String sViewID, UISWTViewEventListener l, 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(PluginInterface pi, String sViewID, UISWTViewEventListener l, Object dataSource)
public void openMainView(String sViewID, UISWTViewEventListener l, 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 openMainView(PluginInterface pi, String sViewID, UISWTViewEventListener _l, Object dataSource, boolean setfocus)
public UISWTView[] getOpenViews(String sParentID)
UISWTInstance
getOpenViews
in interface UISWTInstance
sParentID
- VIEW_* constant
public int promptUser(String title, String text, String[] options, int defaultOption)
UIInstance
promptUser
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 UISWTViewEventListenerHolder[] getViewListeners(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 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 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 |