|
|||||||||
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.UISWTViewImpl
public class UISWTViewImpl
This class creates an view that triggers UISWTViewEventListener
appropriately
Field Summary | |
---|---|
static java.lang.String |
CFG_PREFIX
|
protected org.eclipse.swt.widgets.Composite |
composite
|
protected java.lang.Object |
datasource
|
protected java.lang.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(java.lang.String id,
java.lang.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()
|
java.lang.Object |
getDataSource()
Retrieve the data sources related to this view. |
UISWTViewEventListener |
getEventListener()
|
java.lang.String |
getFullTitle()
Called in order to set / update the title of this View. |
java.lang.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()
|
java.lang.String |
getTitleID()
Messagebundle ID for title |
UIToolBarEnablerBase[] |
getToolbarEnablers()
|
UIPluginViewToolBarListener |
getToolBarListener()
|
java.lang.Object |
getUserData(java.lang.Object key)
|
java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.lang.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(java.lang.String title)
Override the default title with a new one. |
void |
setTitleID(java.lang.String titleID)
|
void |
setToolBarListener(UIPluginViewToolBarListener l)
|
protected void |
setToolbarVisibility(boolean visible)
|
void |
setUseCoreDataSource(boolean useCoreDataSource)
|
void |
setUserData(java.lang.Object key,
java.lang.Object data)
|
boolean |
toolBarItemActivated(ToolBarItem item,
long activationType,
java.lang.Object datasource)
XXX Should have been UIToolBarItem |
void |
triggerEvent(int eventType,
java.lang.Object data)
Trigger an event for this view |
protected boolean |
triggerEventRaw(int eventType,
java.lang.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 java.lang.String CFG_PREFIX
protected PluginUISWTSkinObject skinObject
protected java.lang.Object datasource
protected org.eclipse.swt.widgets.Composite composite
protected final java.lang.String id
Constructor Detail |
---|
public UISWTViewImpl(java.lang.String id, java.lang.String parentViewID, boolean destroyOnDeactivate)
Method Detail |
---|
public void setEventListener(UISWTViewEventListener _eventListener, boolean doCreate) throws UISWTViewEventCancelledException
UISWTViewEventCancelledException
public UISWTViewEventListener getEventListener()
getEventListener
in interface UISWTViewCore
public java.lang.Object getInitialDataSource()
UISWTView
getInitialDataSource
in interface UISWTView
public void setDatasource(java.lang.Object datasource)
public java.lang.Object getDataSource()
UISWTView
getDataSource
in interface UIPluginView
getDataSource
in interface UISWTView
UISWTInstance.VIEW_MAIN
- nullUISWTInstance.VIEW_MYTORRENTS
- Download
UISWTInstance.VIEW_TORRENT_PEERS
- Peer
UISWTInstance.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 UISWTViewCore
public UISWTView getParentView()
UISWTView
getParentView
in interface UISWTView
public java.lang.String getViewID()
UIPluginView
getViewID
in interface UIPluginView
public void closeView()
UIPluginView
closeView
in interface UIPluginView
public void setControlType(int iControlType)
UISWTView
The default value is UISWTView.CONTROLTYPE_SWT
setControlType
in interface UISWTView
public int getControlType()
getControlType
in interface UISWTView
public void triggerEvent(int eventType, java.lang.Object data)
UISWTView
triggerEvent
in interface UISWTView
eventType
- Event to trigger UISWTViewEvent
}data
- data to send with triggerprotected boolean triggerEventRaw(int eventType, java.lang.Object data)
public void setTitle(java.lang.String title)
UISWTView
UISWTViewEvent.TYPE_LANGUAGEUPDATE
to update your title to the
new language.
setTitle
in interface UISWTView
title
- new Titlepublic void setTitleID(java.lang.String titleID)
protected void refreshTitle()
public PluginInterface getPluginInterface()
UISWTView
getPluginInterface
in interface UIPluginView
getPluginInterface
in interface UISWTView
public org.eclipse.swt.widgets.Composite getComposite()
UISWTViewCore
getComposite
in interface UISWTViewCore
public java.lang.String getTitleID()
UISWTViewCore
getTitleID
in interface UISWTViewCore
public java.lang.String getFullTitle()
UISWTViewCore
getFullTitle
in interface UISWTViewCore
public void initialize(org.eclipse.swt.widgets.Composite parent)
UISWTViewCore
initialize
in interface UISWTViewCore
parent
- 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 UISWTViewCore
public void setUseCoreDataSource(boolean useCoreDataSource)
setUseCoreDataSource
in interface UISWTViewCore
public PluginUISWTSkinObject getPluginSkinObject()
getPluginSkinObject
in interface UISWTViewCore
public void setPluginSkinObject(PluginUISWTSkinObject so)
setPluginSkinObject
in interface UISWTViewCore
public boolean toolBarItemActivated(ToolBarItem item, long activationType, java.lang.Object datasource)
UIToolBarActivationListener
toolBarItemActivated
in interface UIToolBarActivationListener
public void refreshToolBarItems(java.util.Map<java.lang.String,java.lang.Long> list)
UIPluginViewToolBarListener
refreshToolBarItems
in interface UIPluginViewToolBarListener
public void setToolBarListener(UIPluginViewToolBarListener l)
setToolBarListener
in interface UIPluginView
public UIPluginViewToolBarListener getToolBarListener()
getToolBarListener
in interface UIPluginView
public UIToolBarEnablerBase[] getToolbarEnablers()
public boolean hasToolbarEnableers()
public void addToolbarEnabler(UIToolBarEnablerBase enabler)
public void removeToolbarEnabler(UIToolBarEnablerBase enabler)
protected void setToolbarVisibility(boolean visible)
public void setUserData(java.lang.Object key, java.lang.Object data)
setUserData
in interface UISWTViewCore
public java.lang.Object getUserData(java.lang.Object key)
getUserData
in interface UISWTViewCore
public void setDestroyOnDeactivate(boolean b)
UISWTView
UISWTViewEvent.TYPE_FOCUSLOST
This allows overriding of the default behaviour
setDestroyOnDeactivate
in interface UISWTView
public boolean isDestroyOnDeactivate()
UISWTView
UISWTViewEvent.TYPE_FOCUSLOST
isDestroyOnDeactivate
in interface UISWTView
public boolean isDelayInitializeToFirstActivate()
public void setDelayInitializeToFirstActivate(boolean delayInitializeToFirstActivate)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |