Class SWTObservables
- java.lang.Object
-
- org.eclipse.jface.databinding.swt.SWTObservables
-
@Deprecated public class SWTObservables extends Object
Deprecated.This class will be removed in a future release. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=546820 for more information. UseWidgetProperties
instead.A factory for creating observables for SWT widgets- Since:
- 1.1
- Restriction:
-
-
Constructor Summary
Constructors Constructor Description SWTObservables()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Realm
getRealm(Display display)
Deprecated.please useDisplayRealm.getRealm(Display)
instead.static ISWTObservableValue
observeBackground(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeBounds(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeDelayedValue(int delay, ISWTObservableValue observable)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeEditable(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeEnabled(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeEnabled(Widget widget)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeFocus(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeFont(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeForeground(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeImage(Widget widget)
Deprecated.useWidgetProperties
insteadstatic IObservableList
observeItems(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeLocation(Control control)
Deprecated.Returns an observable value tracking the location of the given control.static ISWTObservableValue
observeMax(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeMessage(Widget widget)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeMin(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeSelection(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeSelection(Widget widget)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeSingleSelectionIndex(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeSize(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeText(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeText(Control control, int event)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeText(Control control, int[] events)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeText(Widget widget)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeTooltipText(Control control)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeTooltipText(Widget widget)
Deprecated.useWidgetProperties
insteadstatic ISWTObservableValue
observeVisible(Control control)
Deprecated.useWidgetProperties
instead
-
-
-
Method Detail
-
getRealm
@Deprecated public static Realm getRealm(Display display)
Deprecated.please useDisplayRealm.getRealm(Display)
instead.Returns the realm representing the UI thread for the given display.- Parameters:
display
- the display to get realm for- Returns:
- the realm representing the UI thread for the given display
-
observeDelayedValue
@Deprecated public static ISWTObservableValue observeDelayedValue(int delay, ISWTObservableValue observable)
Deprecated.useWidgetProperties
insteadReturns an observable which delays notification of value change events fromobservable
untildelay
milliseconds have elapsed since the last change event, or until a FocusOut event is received from the underlying widget (whichever happens first). This observable helps to boost performance in situations where an observable has computationally expensive listeners (e.g. changing filters in a viewer) or many dependencies (master fields with multiple detail fields). A common use of this observable is to delay validation of user input until the user stops typing in a UI field.To notify about pending changes, the returned observable fires a stale event when the wrapped observable value fires a change event, and remains stale until the delay has elapsed and the value change is fired. A call to
getValue()
while a value change is pending will fire the value change immediately, short-circuiting the delay.Only updates resulting from the observed widget are delayed. Calls directly to
IObservableValue.setValue(T)
are not, and they cancel pending delayed values.Note that this observable will not forward
ValueChangingEvent
events from a wrappedIVetoableValue
.- Parameters:
delay
- the delay in millisecondsobservable
- the observable being delayed- Returns:
- an observable which delays notification of value change events
from
observable
untildelay
milliseconds have elapsed since the last change event. - Since:
- 1.2
-
observeEnabled
@Deprecated public static ISWTObservableValue observeEnabled(Widget widget)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the enabled state of the given widget. The supported types are:- org.eclipse.swt.widgets.Control
- org.eclipse.swt.widgets.Menu
- org.eclipse.swt.widgets.MenuItem
- org.eclipse.swt.widgets.ScrollBar
- org.eclipse.swt.widgets.ToolItem
- Parameters:
widget
- the widget to observe- Returns:
- an observable value tracking the enabled state of the given widget.
- Since:
- 1.5
-
observeEnabled
@Deprecated public static ISWTObservableValue observeEnabled(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the enabled state of the given control- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the enabled state of the given control
-
observeVisible
@Deprecated public static ISWTObservableValue observeVisible(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the visible state of the given control- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the visible state of the given control
-
observeTooltipText
@Deprecated public static ISWTObservableValue observeTooltipText(Widget widget)
Deprecated.useWidgetProperties
insteadReturns an observable tracking the tooltip text of the given item. The supported types are:- org.eclipse.swt.widgets.Control
- org.eclipse.swt.custom.CTabItem
- org.eclipse.swt.widgets.TabItem
- org.eclipse.swt.widgets.TableColumn
- org.eclipse.swt.widgets.ToolItem
- org.eclipse.swt.widgets.TrayItem
- org.eclipse.swt.widgets.TreeColumn
- Parameters:
widget
- the widget to observe- Returns:
- an observable value tracking the tooltip text of the given item
- Since:
- 1.3
-
observeTooltipText
@Deprecated public static ISWTObservableValue observeTooltipText(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the tooltip text of the given control- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the tooltip text of the given control
-
observeSelection
@Deprecated public static ISWTObservableValue observeSelection(Widget widget)
Deprecated.useWidgetProperties
insteadReturns an observable observing the selection attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.widgets.Spinner
- org.eclipse.swt.widgets.Button
- org.eclipse.swt.widgets.Combo
- org.eclipse.swt.custom.CCombo
- org.eclipse.swt.widgets.List
- org.eclipse.swt.widgets.MenuItem (since 1.5)
- org.eclipse.swt.widgets.Scale
- Parameters:
widget
- the widget to observe- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported- Since:
- 1.5
-
observeSelection
@Deprecated public static ISWTObservableValue observeSelection(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable observing the selection attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.widgets.Button
- org.eclipse.swt.widgets.Combo
- org.eclipse.swt.custom.CCombo
- org.eclipse.swt.widgets.List
- org.eclipse.swt.widgets.Scale
- org.eclipse.swt.widgets.Slider (since 1.5)
- org.eclipse.swt.widgets.Spinner
- Parameters:
control
- the control to observe- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported
-
observeMin
@Deprecated public static ISWTObservableValue observeMin(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable observing the minimum attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.widgets.Spinner
- org.eclipse.swt.widgets.Slider (since 1.5)
- org.eclipse.swt.widgets.Scale
- Parameters:
control
- the control to observe- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported
-
observeMax
@Deprecated public static ISWTObservableValue observeMax(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable observing the maximum attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.widgets.Spinner
- org.eclipse.swt.widgets.Slider (since 1.5)
- org.eclipse.swt.widgets.Scale
- Parameters:
control
- the control to observe- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported
-
observeText
@Deprecated public static ISWTObservableValue observeText(Control control, int[] events)
Deprecated.useWidgetProperties
insteadReturns an observable observing the text attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.widgets.Text
- org.eclipse.swt.custom.StyledText (as of 1.3)
- Parameters:
control
- the control to observeevents
- array of SWT event types to register for change events. May includeSWT.None
,SWT.Modify
,SWT.FocusOut
orSWT.DefaultSelection
.- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported- Since:
- 1.3
-
observeText
@Deprecated public static ISWTObservableValue observeText(Control control, int event)
Deprecated.useWidgetProperties
insteadReturns an observable observing the text attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.widgets.Text
- org.eclipse.swt.custom.StyledText (as of 1.3)
- Parameters:
control
- the control to observeevent
- event type to register for change events- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported
-
observeText
@Deprecated public static ISWTObservableValue observeText(Widget widget)
Deprecated.useWidgetProperties
insteadReturns an observable observing the text attribute of the providedwidget
. The supported types are:- org.eclipse.swt.widgets.Button (as of 1.3)
- org.eclipse.swt.custom.CCombo
- org.eclipse.swt.custom.CLabel
- org.eclipse.swt.widgets.Combo
- org.eclipse.swt.widgets.Group (as of 1.7)
- org.eclipse.swt.widgets.Item
- org.eclipse.swt.widgets.Label
- org.eclipse.swt.widgets.Link (as of 1.2)
- org.eclipse.swt.widgets.Shell
- org.eclipse.swt.widgets.StyledText (as of 1.3)
- org.eclipse.swt.widgets.Text (as of 1.3)
- Parameters:
widget
- the widget to observe- Returns:
- observable value
- Throws:
IllegalArgumentException
- if the type ofwidget
is unsupported- Since:
- 1.3
-
observeText
@Deprecated public static ISWTObservableValue observeText(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable observing the text attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.widgets.Button (as of 1.3)
- org.eclipse.swt.custom.CCombo
- org.eclipse.swt.custom.CLabel
- org.eclipse.swt.widgets.Combo
- org.eclipse.swt.widgets.Group (as of 1.7)
- org.eclipse.swt.widgets.Label
- org.eclipse.swt.widgets.Link (as of 1.2)
- org.eclipse.swt.widgets.Shell
- org.eclipse.swt.custom.StyledText (as of 1.3)
- org.eclipse.swt.widgets.Text (as of 1.3)
- Parameters:
control
- the control to observe- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported
-
observeMessage
@Deprecated public static ISWTObservableValue observeMessage(Widget widget)
Deprecated.useWidgetProperties
insteadReturns an observable observing the message attribute of the providedwidget
. the supported types are:- org.eclipse.swt.widgets.Text
- org.eclipse.swt.widgets.ToolTip
- Parameters:
widget
- the widget to observe- Returns:
- an observable observing the message attribute of the provided
widget
. - Since:
- 1.3
-
observeImage
@Deprecated public static ISWTObservableValue observeImage(Widget widget)
Deprecated.useWidgetProperties
insteadReturns an observable observing the image attribute of the providedwidget
. The supported types are:- org.eclipse.swt.widgets.Button
- org.eclipse.swt.custom.CLabel
- org.eclipse.swt.widgets.Item
- org.eclipse.swt.widgets.Label
- Parameters:
widget
- the widget to observe- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifwidget
type is unsupported- Since:
- 1.3
-
observeItems
@Deprecated public static IObservableList observeItems(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable observing the items attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.widgets.Combo
- org.eclipse.swt.custom.CCombo
- org.eclipse.swt.widgets.List
- Parameters:
control
- the control to observe- Returns:
- observable list
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported
-
observeSingleSelectionIndex
@Deprecated public static ISWTObservableValue observeSingleSelectionIndex(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable observing the single selection index attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.widgets.Table
- org.eclipse.swt.widgets.Combo
- org.eclipse.swt.custom.CCombo
- org.eclipse.swt.widgets.List
- Parameters:
control
- the control to observe- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported
-
observeForeground
@Deprecated public static ISWTObservableValue observeForeground(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the foreground color of the given control- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the foreground color of the given control
-
observeBackground
@Deprecated public static ISWTObservableValue observeBackground(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the background color of the given control- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the background color of the given control
-
observeFont
@Deprecated public static ISWTObservableValue observeFont(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the font of the given control.- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the font of the given control
-
observeSize
@Deprecated public static ISWTObservableValue observeSize(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the size of the given control.- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the size of the given control
- Since:
- 1.3
-
observeLocation
public static ISWTObservableValue observeLocation(Control control)
Deprecated.Returns an observable value tracking the location of the given control.- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the location of the given control
- Since:
- 1.3
-
observeFocus
@Deprecated public static ISWTObservableValue observeFocus(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the focus of the given control.- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the focus of the given control
- Since:
- 1.3
-
observeBounds
@Deprecated public static ISWTObservableValue observeBounds(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable value tracking the bounds of the given control.- Parameters:
control
- the control to observe- Returns:
- an observable value tracking the bounds of the given control
- Since:
- 1.3
-
observeEditable
@Deprecated public static ISWTObservableValue observeEditable(Control control)
Deprecated.useWidgetProperties
insteadReturns an observable observing the editable attribute of the providedcontrol
. The supported types are:- org.eclipse.swt.custom.CCombo (since 1.6)
- org.eclipse.swt.custom.StyledText (since 1.6)
- org.eclipse.swt.widgets.Text
- Parameters:
control
- the control to observe- Returns:
- observable value
- Throws:
IllegalArgumentException
- ifcontrol
type is unsupported
-
-