Package com.biglybt.ui.swt.pif
Interface UISWTView
-
- All Superinterfaces:
UIPluginView
- All Known Subinterfaces:
MdiEntrySWT
,UISWTViewCore
- All Known Implementing Classes:
BaseMdiEntry
,SideBarEntrySWT
,TabbedEntry
,UISWTViewImpl
public interface UISWTView extends UIPluginView
Commands and Information about a SWT View
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONTROLTYPE_AWT
ForsetControlType(int)
; When the eventUISWTViewEvent.TYPE_INITIALIZE
is triggered, getData() will return aComponent
object.static int
CONTROLTYPE_SWT
ForsetControlType(int)
; When the eventUISWTViewEvent.TYPE_INITIALIZE
is triggered, getData() will return aComposite
object.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getControlType()
java.lang.Object
getDataSource()
Retrieve the data sources related to this view.java.lang.Object
getInitialDataSource()
Get the original datasource that was set to the viewUISWTView
getParentView()
Get parent view, if one existsPluginInterface
getPluginInterface()
Gets the plugin interface associated with this view, null if none definedboolean
isContentDisposed()
boolean
isDestroyOnDeactivate()
Retrieve whether this view can be destroyed onUISWTViewEvent.TYPE_FOCUSLOST
void
setControlType(int iControlType)
Sets the type of control this view uses.void
setDestroyOnDeactivate(boolean b)
To save memory/CPU, views are sometimes destroyed onUISWTViewEvent.TYPE_FOCUSLOST
void
setTitle(java.lang.String title)
Override the default title with a new one.void
triggerEvent(int eventType, java.lang.Object data)
Trigger an event for this view-
Methods inherited from interface com.biglybt.pif.ui.UIPluginView
closeView, getToolBarListener, getViewID, setToolBarListener
-
-
-
-
Field Detail
-
CONTROLTYPE_SWT
static final int CONTROLTYPE_SWT
ForsetControlType(int)
; When the eventUISWTViewEvent.TYPE_INITIALIZE
is triggered, getData() will return aComposite
object.- Since:
- 2.3.0.6
- See Also:
- Constant Field Values
-
CONTROLTYPE_AWT
static final int CONTROLTYPE_AWT
ForsetControlType(int)
; When the eventUISWTViewEvent.TYPE_INITIALIZE
is triggered, getData() will return aComponent
object.- Since:
- 2.3.0.6
- See Also:
- Constant Field Values
-
-
Method Detail
-
setControlType
void setControlType(int iControlType)
Sets the type of control this view uses. Set before view initialization.The default value is
CONTROLTYPE_SWT
- Parameters:
iControlType
-- Since:
- 2.3.0.6
-
getControlType
int getControlType()
- Returns:
- CONTROLTYPE_*
- Since:
- 4.3.1.3
-
getDataSource
java.lang.Object getDataSource()
Retrieve the data sources related to this view.- Specified by:
getDataSource
in interfaceUIPluginView
- Returns:
- Depending on the parent view you added your view to, the Object will be:
UISWTInstance.VIEW_MAIN
- null
UISWTInstance.VIEW_MYTORRENTS
-Download
UISWTInstance.VIEW_TORRENT_PEERS
-Peer
If created byUISWTInstance.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. - Since:
- 2.3.0.6
-
getInitialDataSource
java.lang.Object getInitialDataSource()
Get the original datasource that was set to the view- Since:
- 5.5.0.0
-
getParentView
UISWTView getParentView()
Get parent view, if one exists- Since:
- 5.5.0.0
-
triggerEvent
void triggerEvent(int eventType, java.lang.Object data)
Trigger an event for this view- Parameters:
eventType
- Event to triggerUISWTViewEvent
}data
- data to send with trigger- Since:
- 2.3.0.6
-
setTitle
void setTitle(java.lang.String title)
Override the default title with a new one. After setting this, you should use theUISWTViewEvent.TYPE_LANGUAGEUPDATE
to update your title to the new language.- Parameters:
title
- new Title- Since:
- 2.3.0.6
-
getPluginInterface
PluginInterface getPluginInterface()
Gets the plugin interface associated with this view, null if none defined Important Note
BiglyBT 2.0.0.0 and below will only return aPluginInterface
during theUISWTViewEvent.TYPE_CREATE
event. After this event is processed, the return value will be null. 2.0.0.1 and later will always return aPluginInterface
- Specified by:
getPluginInterface
in interfaceUIPluginView
- Since:
- Vuze 4.5.1.1, BiglyBT 1.0.0.0
-
setDestroyOnDeactivate
void setDestroyOnDeactivate(boolean b)
To save memory/CPU, views are sometimes destroyed onUISWTViewEvent.TYPE_FOCUSLOST
This allows overriding of the default behaviour
- Since:
- 5.6.0.1
-
isDestroyOnDeactivate
boolean isDestroyOnDeactivate()
Retrieve whether this view can be destroyed onUISWTViewEvent.TYPE_FOCUSLOST
- Since:
- 5.6.0.1
-
isContentDisposed
boolean isContentDisposed()
-
-