|
|||||||||
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 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
UISWTViewEventCancelledException
public UISWTViewEventListener getEventListener()
getEventListener
in interface UISWTViewCore
public Object getInitialDataSource()
UISWTView
getInitialDataSource
in interface UISWTView
public void setDatasource(Object datasource)
public 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 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, Object data)
UISWTView
triggerEvent
in interface UISWTView
eventType
- Event to trigger UISWTViewEvent
}data
- data to send with triggerprotected boolean triggerEventRaw(int eventType, Object data)
public void setTitle(String title)
UISWTView
UISWTViewEvent.TYPE_LANGUAGEUPDATE
to update your title to the
new language.
setTitle
in interface UISWTView
title
- new Titlepublic void setTitleID(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 String getTitleID()
UISWTViewCore
getTitleID
in interface UISWTViewCore
public 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, Object datasource)
UIToolBarActivationListener
toolBarItemActivated
in interface UIToolBarActivationListener
public void refreshToolBarItems(Map<String,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(Object key, Object data)
setUserData
in interface UISWTViewCore
public Object getUserData(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 |