|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gudy.azureus2.ui.swt.pluginsimpl.UISWTViewImpl
public class UISWTViewImpl
This class creates an view that triggers UISWTViewEventListener
appropriately
| Field Summary | |
|---|---|
static String |
CFG_PREFIX
|
protected org.eclipse.swt.widgets.Composite |
composite
|
protected Object |
datasource
|
protected String |
id
|
protected PluginUISWTSkinObject |
skinObject
|
| Fields inherited from interface org.gudy.azureus2.ui.swt.pluginsimpl.UISWTViewCore |
|---|
CONTROLTYPE_SKINOBJECT |
| Fields inherited from interface org.gudy.azureus2.ui.swt.plugins.UISWTView |
|---|
CONTROLTYPE_AWT, CONTROLTYPE_SWT |
| Fields inherited from interface org.gudy.azureus2.plugins.ui.toolbar.UIToolBarActivationListener |
|---|
ACTIVATIONTYPE_HELD, ACTIVATIONTYPE_NORMAL, ACTIVATIONTYPE_RIGHTCLICK |
| Constructor Summary | |
|---|---|
UISWTViewImpl(String id,
String parentViewID,
boolean destroyOnDeactivate)
|
|
| Method Summary | |
|---|---|
void |
addToolbarEnabler(UIToolBarEnablerBase enabler)
|
void |
closeView()
Closes the view |
org.eclipse.swt.widgets.Composite |
getComposite()
This method is called after initialize so that the Tab is set its control Caller is the GUI Thread. |
int |
getControlType()
|
Object |
getDataSource()
Retrieve the data sources related to this view. |
UISWTViewEventListener |
getEventListener()
|
String |
getFullTitle()
Called in order to set / update the title of this View. |
Object |
getInitialDataSource()
Get the original datasource that was set to the view |
UISWTView |
getParentView()
Get parent view, if one exists |
PluginInterface |
getPluginInterface()
Gets the plugin interface associated with this view, null if none defined |
PluginUISWTSkinObject |
getPluginSkinObject()
|
String |
getTitleID()
Messagebundle ID for title |
UIToolBarEnablerBase[] |
getToolbarEnablers()
|
UIPluginViewToolBarListener |
getToolBarListener()
|
Object |
getUserData(Object key)
|
String |
getViewID()
ID of the view |
boolean |
hasToolbarEnableers()
|
void |
initialize(org.eclipse.swt.widgets.Composite parent)
This method is called when the view is instanciated, it should initialize all GUI components. |
boolean |
isDelayInitializeToFirstActivate()
|
boolean |
isDestroyOnDeactivate()
Retrieve whether this view can be destroyed on UISWTViewEvent.TYPE_FOCUSLOST |
protected void |
refreshTitle()
|
void |
refreshToolBarItems(Map<String,Long> list)
Fill in list with the toolbar ids and states you wish to set |
void |
removeToolbarEnabler(UIToolBarEnablerBase enabler)
|
void |
setControlType(int iControlType)
Sets the type of control this view uses. |
void |
setDatasource(Object datasource)
|
void |
setDelayInitializeToFirstActivate(boolean delayInitializeToFirstActivate)
|
void |
setDestroyOnDeactivate(boolean b)
To save memory/CPU, views are sometimes destroyed on UISWTViewEvent.TYPE_FOCUSLOST |
void |
setEventListener(UISWTViewEventListener _eventListener,
boolean doCreate)
|
void |
setParentView(UISWTView parentView)
|
void |
setPluginSkinObject(PluginUISWTSkinObject so)
|
void |
setTitle(String title)
Override the default title with a new one. |
void |
setTitleID(String titleID)
|
void |
setToolBarListener(UIPluginViewToolBarListener l)
|
protected void |
setToolbarVisibility(boolean visible)
|
void |
setUseCoreDataSource(boolean useCoreDataSource)
|
void |
setUserData(Object key,
Object data)
|
boolean |
toolBarItemActivated(ToolBarItem item,
long activationType,
Object datasource)
XXX Should have been UIToolBarItem |
void |
triggerEvent(int eventType,
Object data)
Trigger an event for this view |
protected boolean |
triggerEventRaw(int eventType,
Object data)
|
boolean |
useCoreDataSource()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CFG_PREFIX
protected PluginUISWTSkinObject skinObject
protected Object datasource
protected org.eclipse.swt.widgets.Composite composite
protected final String id
| Constructor Detail |
|---|
public UISWTViewImpl(String id,
String parentViewID,
boolean destroyOnDeactivate)
| Method Detail |
|---|
public void setEventListener(UISWTViewEventListener _eventListener,
boolean doCreate)
throws UISWTViewEventCancelledException
UISWTViewEventCancelledExceptionpublic UISWTViewEventListener getEventListener()
getEventListener in interface UISWTViewCorepublic Object getInitialDataSource()
UISWTView
getInitialDataSource in interface UISWTViewpublic void setDatasource(Object datasource)
public Object getDataSource()
UISWTView
getDataSource in interface UIPluginViewgetDataSource in interface UISWTViewUISWTInstance.VIEW_MAIN- nullUISWTInstance.VIEW_MYTORRENTS- DownloadUISWTInstance.VIEW_TORRENT_PEERS- PeerUISWTInstance.openMainView(String, UISWTViewEventListener, Object),
value will be the value set.
May return null if no data source is selected, or while processing the
UISWTViewEvent.TYPE_CREATE event.
public void setParentView(UISWTView parentView)
setParentView in interface UISWTViewCorepublic UISWTView getParentView()
UISWTView
getParentView in interface UISWTViewpublic String getViewID()
UIPluginView
getViewID in interface UIPluginViewpublic void closeView()
UIPluginView
closeView in interface UIPluginViewpublic void setControlType(int iControlType)
UISWTView
The default value is UISWTView.CONTROLTYPE_SWT
setControlType in interface UISWTViewpublic int getControlType()
getControlType in interface UISWTView
public void triggerEvent(int eventType,
Object data)
UISWTView
triggerEvent in interface UISWTVieweventType - Event to trigger UISWTViewEvent}data - data to send with trigger
protected boolean triggerEventRaw(int eventType,
Object data)
public void setTitle(String title)
UISWTViewUISWTViewEvent.TYPE_LANGUAGEUPDATE to update your title to the
new language.
setTitle in interface UISWTViewtitle - new Titlepublic void setTitleID(String titleID)
protected void refreshTitle()
public PluginInterface getPluginInterface()
UISWTView
getPluginInterface in interface UIPluginViewgetPluginInterface in interface UISWTViewpublic org.eclipse.swt.widgets.Composite getComposite()
UISWTViewCore
getComposite in interface UISWTViewCorepublic String getTitleID()
UISWTViewCore
getTitleID in interface UISWTViewCorepublic String getFullTitle()
UISWTViewCore
getFullTitle in interface UISWTViewCorepublic void initialize(org.eclipse.swt.widgets.Composite parent)
UISWTViewCore
initialize in interface UISWTViewCoreparent - the parent composite. Each view should create a child
composite, and then use this child composite to add all elements
to.public boolean useCoreDataSource()
useCoreDataSource in interface UISWTViewCorepublic void setUseCoreDataSource(boolean useCoreDataSource)
setUseCoreDataSource in interface UISWTViewCorepublic PluginUISWTSkinObject getPluginSkinObject()
getPluginSkinObject in interface UISWTViewCorepublic void setPluginSkinObject(PluginUISWTSkinObject so)
setPluginSkinObject in interface UISWTViewCore
public boolean toolBarItemActivated(ToolBarItem item,
long activationType,
Object datasource)
UIToolBarActivationListener
toolBarItemActivated in interface UIToolBarActivationListenerpublic void refreshToolBarItems(Map<String,Long> list)
UIPluginViewToolBarListener
refreshToolBarItems in interface UIPluginViewToolBarListenerpublic void setToolBarListener(UIPluginViewToolBarListener l)
setToolBarListener in interface UIPluginViewpublic UIPluginViewToolBarListener getToolBarListener()
getToolBarListener in interface UIPluginViewpublic UIToolBarEnablerBase[] getToolbarEnablers()
public boolean hasToolbarEnableers()
public void addToolbarEnabler(UIToolBarEnablerBase enabler)
public void removeToolbarEnabler(UIToolBarEnablerBase enabler)
protected void setToolbarVisibility(boolean visible)
public void setUserData(Object key,
Object data)
setUserData in interface UISWTViewCorepublic Object getUserData(Object key)
getUserData in interface UISWTViewCorepublic void setDestroyOnDeactivate(boolean b)
UISWTViewUISWTViewEvent.TYPE_FOCUSLOST
This allows overriding of the default behaviour
setDestroyOnDeactivate in interface UISWTViewpublic boolean isDestroyOnDeactivate()
UISWTViewUISWTViewEvent.TYPE_FOCUSLOST
isDestroyOnDeactivate in interface UISWTViewpublic boolean isDelayInitializeToFirstActivate()
public void setDelayInitializeToFirstActivate(boolean delayInitializeToFirstActivate)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||