org.gudy.azureus2.ui.swt.plugins
Interface UISWTViewEvent

All Known Implementing Classes:
UISWTViewEventImpl

public interface UISWTViewEvent

A UI SWT View Event triggered by the UISWTViewEventListener

Author:
TuxPaper
See Also:
UISWTViewEventListener, UISWTInstance.addView(String, String, UISWTViewEventListener)

Field Summary
static java.lang.String[] DEBUG_TYPES
           
static int TYPE_CLOSE
          Triggered when the parent view is about to be closed
static int TYPE_CREATE
          Triggered before view is initialize in order to allow any set up before initialization
static int TYPE_DATASOURCE_CHANGED
          Triggered when the datasource related to this view change.
static int TYPE_DESTROY
          Triggered when the parent view is about to be destroyed
static int TYPE_FOCUSGAINED
          Focus Gained
static int TYPE_FOCUSLOST
          Focus Lost
static int TYPE_INITIALIZE
          Initialize your view.
static int TYPE_LANGUAGEUPDATE
          Language has changed.
static int TYPE_OBFUSCATE
          Triggered when the UI needs a privacy sensitive view.
static int TYPE_REFRESH
          Triggered on user-specified intervals.
 
Method Summary
 java.lang.Object getData()
          Get the data
 int getType()
          Get the type.
 UISWTView getView()
          Get the View
 

Field Detail

DEBUG_TYPES

static final java.lang.String[] DEBUG_TYPES

TYPE_CREATE

static final int TYPE_CREATE
Triggered before view is initialize in order to allow any set up before initialization

This is the only time that setting UISWTView.setControlType(int) has any effect.

return true from UISWTViewEventListener.eventOccurred(UISWTViewEvent) if creation was successfull. If you want only one instance of your view, or if there's any reason you can't create, return false, and an existing view will be used, if one is present.

Since:
2.3.0.6
See Also:
Constant Field Values

TYPE_DATASOURCE_CHANGED

static final int TYPE_DATASOURCE_CHANGED
Triggered when the datasource related to this view change.

Usually called after TYPE_CREATE, but before TYPE_INITIALIZE

getData() will return an Object[] array, or null

Since:
2.3.0.6
See Also:
Constant Field Values

TYPE_INITIALIZE

static final int TYPE_INITIALIZE
Initialize your view.

getData() will return a SWT Composite or AWT Container for you to place object in.

Since:
2.3.0.6
See Also:
Constant Field Values

TYPE_FOCUSGAINED

static final int TYPE_FOCUSGAINED
Focus Gained

Since:
2.3.0.6
See Also:
Constant Field Values

TYPE_FOCUSLOST

static final int TYPE_FOCUSLOST
Focus Lost

TYPE_FOCUSLOST may not be called before TYPE_DESTROY

Since:
2.3.0.6
See Also:
Constant Field Values

TYPE_REFRESH

static final int TYPE_REFRESH
Triggered on user-specified intervals. Plugins should update any live information at this time.

Caller is the GUI thread

Since:
2.3.0.6
See Also:
Constant Field Values

TYPE_LANGUAGEUPDATE

static final int TYPE_LANGUAGEUPDATE
Language has changed. Plugins should update their text to the new language. To determine the new language, use Locale.getDefault()

Since:
2.3.0.6
See Also:
Constant Field Values

TYPE_DESTROY

static final int TYPE_DESTROY
Triggered when the parent view is about to be destroyed

TYPE_FOCUSLOST may not be called before TYPE_DESTROY

Since:
2.3.0.6
See Also:
Constant Field Values

TYPE_CLOSE

static final int TYPE_CLOSE
Triggered when the parent view is about to be closed

Return false to abort close

Since:
2.5.0.1
See Also:
Constant Field Values

TYPE_OBFUSCATE

static final int TYPE_OBFUSCATE
Triggered when the UI needs a privacy sensitive view.

Currently, getData() will return a map, with "image" key containing Image

Since:
4.7.0.3
See Also:
Constant Field Values
Method Detail

getType

int getType()
Get the type.

Returns:
The TYPE_* constant for this event
Since:
2.3.0.6

getData

java.lang.Object getData()
Get the data

Returns:
Any data for this event
Since:
2.3.0.6

getView

UISWTView getView()
Get the View

Returns:
Information and control over the view
Since:
2.3.0.6