Eclipse Platform
Release 3.3

org.eclipse.jface.databinding.swt
Class SWTObservables

java.lang.Object
  extended byorg.eclipse.jface.databinding.swt.SWTObservables

public class SWTObservables
extends Object

A factory for creating observables for SWT widgets

Since:
1.1

Constructor Summary
SWTObservables()
           
 
Method Summary
static Realm getRealm(Display display)
          Returns the realm representing the UI thread for the given display.
static ISWTObservableValue observeBackground(Control control)
           
static ISWTObservableValue observeEditable(Control control)
          Returns an observable observing the editable attribute of the provided control.
static ISWTObservableValue observeEnabled(Control control)
           
static ISWTObservableValue observeFont(Control control)
           
static ISWTObservableValue observeForeground(Control control)
           
static IObservableList observeItems(Control control)
          Returns an observable observing the items attribute of the provided control.
static ISWTObservableValue observeMax(Control control)
          Returns an observable observing the maximum attribute of the provided control.
static ISWTObservableValue observeMin(Control control)
          Returns an observable observing the minimum attribute of the provided control.
static ISWTObservableValue observeSelection(Control control)
          Returns an observable observing the selection attribute of the provided control.
static ISWTObservableValue observeSingleSelectionIndex(Control control)
          Returns an observable observing the single selection index attribute of the provided control.
static ISWTObservableValue observeText(Control control)
          Returns an observable observing the text attribute of the provided control.
static ISWTObservableValue observeText(Control control, int event)
          Returns an observable observing the text attribute of the provided control.
static ISWTObservableValue observeTooltipText(Control control)
           
static ISWTObservableValue observeVisible(Control control)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWTObservables

public SWTObservables()
Method Detail

getRealm

public static Realm getRealm(Display display)
Returns the realm representing the UI thread for the given display.

Parameters:
display -
Returns:
the realm representing the UI thread for the given display

observeEnabled

public static ISWTObservableValue observeEnabled(Control control)
Parameters:
control -
Returns:
an observable value tracking the enabled state of the given control

observeVisible

public static ISWTObservableValue observeVisible(Control control)
Parameters:
control -
Returns:
an observable value tracking the visible state of the given control

observeTooltipText

public static ISWTObservableValue observeTooltipText(Control control)
Parameters:
control -
Returns:
an observable value tracking the tooltip text of the given control

observeSelection

public static ISWTObservableValue observeSelection(Control control)
Returns an observable observing the selection attribute of the provided control. The supported types are:

Parameters:
control -
Returns:
observable value
Throws:
IllegalArgumentException - if control type is unsupported

observeMin

public static ISWTObservableValue observeMin(Control control)
Returns an observable observing the minimum attribute of the provided control. The supported types are:

Parameters:
control -
Returns:
observable value
Throws:
IllegalArgumentException - if control type is unsupported

observeMax

public static ISWTObservableValue observeMax(Control control)
Returns an observable observing the maximum attribute of the provided control. The supported types are:

Parameters:
control -
Returns:
observable value
Throws:
IllegalArgumentException - if control type is unsupported

observeText

public static ISWTObservableValue observeText(Control control,
                                              int event)
Returns an observable observing the text attribute of the provided control. The supported types are:

Parameters:
control -
event - event type to register for change events
Returns:
observable value
Throws:
IllegalArgumentException - if control type is unsupported

observeText

public static ISWTObservableValue observeText(Control control)
Returns an observable observing the text attribute of the provided control. The supported types are:

Parameters:
control -
Returns:
observable value
Throws:
IllegalArgumentException - if control type is unsupported

observeItems

public static IObservableList observeItems(Control control)
Returns an observable observing the items attribute of the provided control. The supported types are:

Parameters:
control -
Returns:
observable list
Throws:
IllegalArgumentException - if control type is unsupported

observeSingleSelectionIndex

public static ISWTObservableValue observeSingleSelectionIndex(Control control)
Returns an observable observing the single selection index attribute of the provided control. The supported types are:

Parameters:
control -
Returns:
observable value
Throws:
IllegalArgumentException - if control type is unsupported

observeForeground

public static ISWTObservableValue observeForeground(Control control)
Parameters:
control -
Returns:
an observable value tracking the foreground color of the given control

observeBackground

public static ISWTObservableValue observeBackground(Control control)
Parameters:
control -
Returns:
an observable value tracking the background color of the given control

observeFont

public static ISWTObservableValue observeFont(Control control)
Parameters:
control -
Returns:
an observable value tracking the font of the given control

observeEditable

public static ISWTObservableValue observeEditable(Control control)
Returns an observable observing the editable attribute of the provided control. The supported types are:

Parameters:
control -
Returns:
observable value
Throws:
IllegalArgumentException - if control type is unsupported

Eclipse Platform
Release 3.3

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.