# Class WidgetProperties

java.lang.Object
org.eclipse.jface.databinding.swt.typed.WidgetProperties

public class WidgetProperties extends Object
A factory for creating properties of SWT `widgets`.

Since:
  1.9

## Constructor Summary

Constructors
Constructor
Description
`WidgetProperties()`

## Method Summary

Modifier and Type
Method
Description
`static <S extends Control>
IWidgetValueProperty<S,Color>`
`background()`
Returns a value property for observing the background color of a `Control`.
`static <S extends Control>
IWidgetValueProperty<S, Rectangle>`
`bounds()`
Returns a value property for observing the bounds of a `Control`.
`static IWidgetValueProperty<Button,Boolean>`
`buttonSelection()`
Returns a value property for observing the selection state of a `Button`.
`static IWidgetValueProperty<CCombo,String>`
`ccomboSelection()`
Returns a value property for observing the selection state of a `CCombo`.
`static IWidgetValueProperty<Combo,String>`
`comboSelection()`
Returns a value property for observing the selection state of a `Combo`.
`static IWidgetValueProperty<DateTime,Date>`
`dateTimeSelection()`
Returns a value property for observing the selection state of a `DateTime`.
`static <S extends Control>
IWidgetValueProperty<S,Boolean>`
`editable()`
Returns a value property for observing the editable state of a `CCombo` (since 1.6), `StyledText` (since 1.6), or `Text`.
`static <S extends Widget>
IWidgetValueProperty<S,Boolean>`
`enabled()`
Returns a value property for observing the enablement state of a `Control`, `Menu` (since 1.5), `MenuItem` (since 1.5), `ScrollBar` (since 1.5) or `ToolItem` (since 1.5).
`static <S extends Control>
IWidgetValueProperty<S,Boolean>`
`focused()`
Returns a value property for observing the focus state of a `Control`.
`static <S extends Control>
IWidgetValueProperty<S,Font>`
`font()`
Returns a value property for observing the font of a `Control`.
`static <S extends Control>
IWidgetValueProperty<S,Color>`
`foreground()`
Returns a value property for observing the foreground color of a `Control`.
`static <S extends Widget>
IWidgetValueProperty<S,Image>`
`image()`
Returns a value property for observing the image of a `Button`, `CLabel`, `Item` or `Label`.
`static <S extends Control>
IWidgetListProperty<S,String>`
`items()`
Returns a list property for observing the items of a `CCombo`, `Combo` or `List`.
`static IWidgetValueProperty<List,String>`
`listSelection()`
Returns a value property for observing the selection state of a `List`.
`static IWidgetValueProperty<DateTime, LocalDate>`
`localDateSelection()`
Returns a value property for observing the selection state of a `DateTime` with the `SWT.DATE` or `SWT.CALENDAR` style.
`static IWidgetValueProperty<DateTime, LocalTime>`
`localTimeSelection()`
Returns a value property for observing the selection state of a `DateTime` with the `SWT.TIME` style.
`static <S extends Control>
IWidgetValueProperty<S,Point>`
`location()`
Returns a value property for observing the location of a `Control`.
`static <S extends Control>
IWidgetValueProperty<S,Integer>`
`maximum()`
Returns a value property for observing the maximum value of a `Scale`, `Slider` (since 1.5) or `Spinner`.
`static IWidgetValueProperty<MenuItem,Boolean>`
`menuItemSelection()`
Returns a value property for observing the selection state of a `MenuItem`.
`static <S extends Widget>
IWidgetValueProperty<S,String>`
`message()`
Returns a value property for observing the message of a `Text` or `ToolTip`.
`static <S extends Control>
IWidgetValueProperty<S,Integer>`
`minimum()`
Returns a value property for observing the minimum value of a `Scale`, `Slider` (since 1.5) or `Spinner`.
`static IWidgetValueProperty<Scale,Integer>`
`scaleSelection()`
Returns a value property for observing the selection state of a `Scale`.
`static <S extends Control>
IWidgetValueProperty<S,Integer>`
`singleSelectionIndex()`
Returns a value property for observing the single selection index of a `CCombo`, `Combo`, `List` or `Table`.
`static <S extends Control>
IWidgetValueProperty<S,Point>`
`size()`
Returns a value property for observing the size of a `Control`.
`static IWidgetValueProperty<Slider,Integer>`
`sliderSelection()`
Returns a value property for observing the selection state of a `Slider`.
`static IWidgetValueProperty<Spinner,Integer>`
`spinnerSelection()`
Returns a value property for observing the selection state of a `Spinner`.
`static <S extends Widget>
IWidgetValueProperty<S,String>`
`text()`
Returns a value property for observing the text of a `Button`, `CCombo`, `CLabel`, `Combo`, `Item`, `Label`, `Link`, `Shell`, `Group`, `StyledText` or `Text`.
`static <S extends Widget>
IWidgetValueProperty<S,String>`
`text(int event)`
Returns a value property for observing the text of a `StyledText` or `Text`.
`static <S extends Widget>
IWidgetValueProperty<S,String>`
`text(int... events)`
Returns a value property for observing the text of a `StyledText` or `Text`.
`static <S extends Widget>
IWidgetValueProperty<S,String>`
`tooltipText()`
Returns a value property for observing the tooltip text of a `CTabItem`, `Control`, `TabItem`, `TableColumn`, `ToolItem`, `TrayItem` or `TreeColumn`.
`static <S extends Widget>
IWidgetValueProperty<S,Boolean>`
`visible()`
Returns a value property for observing the visibility state of a `Control`, `Menu`, `ScrollBar`, `ToolBar` or `ToolTip`.
`static <S extends Widget, T>
IWidgetValueProperty<S,T>`
`widgetSelection()`
Returns a value property for observing the selection state of a `Button`, `CCombo`, `Combo`, `DateTime`, `List`, `MenuItem` (since 1.5), `Scale`, `Slider` (since 1.5) or `Spinner`.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### WidgetProperties

public WidgetProperties()

## Method Details

### background

public static <S extends Control> IWidgetValueProperty<S,Color> background()
Returns a value property for observing the background color of a `Control`.

Returns:
  a value property for observing the background color of a `Control`.

### bounds

public static <S extends Control> IWidgetValueProperty<S, Rectangle> bounds()
Returns a value property for observing the bounds of a `Control`.

Returns:
  a value property for observing the bounds of a `Control`.

### editable

public static <S extends Control> IWidgetValueProperty<S,Boolean> editable()
Returns a value property for observing the editable state of a `CCombo` (since 1.6), `StyledText` (since 1.6), or `Text`.

Returns:
  a value property for observing the editable state of a `CCombo`, `StyledText`, or `Text`.

### enabled

public static <S extends Widget> IWidgetValueProperty<S,Boolean> enabled()
Returns a value property for observing the enablement state of a `Control`, `Menu` (since 1.5), `MenuItem` (since 1.5), `ScrollBar` (since 1.5) or `ToolItem` (since 1.5).

Returns:
  a value property for observing the enablement state of a `Control`, `Menu`, `MenuItem`, `ScrollBar` or `ToolItem`.

### focused

public static <S extends Control> IWidgetValueProperty<S,Boolean> focused()
Returns a value property for observing the focus state of a `Control`.

Returns:
  a value property for observing the focus state of a `Control`.

### font

public static <S extends Control> IWidgetValueProperty<S,Font> font()
Returns a value property for observing the font of a `Control`.

Returns:
  a value property for observing the font of a `Control`.

### foreground

public static <S extends Control> IWidgetValueProperty<S,Color> foreground()
Returns a value property for observing the foreground color of a `Control`.

Returns:
  a value property for observing the foreground color of a `Control`.

### image

public static <S extends Widget> IWidgetValueProperty<S,Image> image()
Returns a value property for observing the image of a `Button`, `CLabel`, `Item` or `Label`.

Returns:
  a value property for observing the image of a `Button`, `CLabel`, `Item` or `Label`.

### items

public static <S extends Control> IWidgetListProperty<S,String> items()
Returns a list property for observing the items of a `CCombo`, `Combo` or `List`.

Returns:
  a list property for observing the items of a `CCombo`, `Combo` or `List`.

### location

public static <S extends Control> IWidgetValueProperty<S,Point> location()
Returns a value property for observing the location of a `Control`.

Returns:
  a value property for observing the location of a `Control`.

### maximum

public static <S extends Control> IWidgetValueProperty<S,Integer> maximum()
Returns a value property for observing the maximum value of a `Scale`, `Slider` (since 1.5) or `Spinner`.

Returns:
  a value property for observing the maximum value of a `Scale`, `Slider` (since 1.5) or `Spinner`.

### message

public static <S extends Widget> IWidgetValueProperty<S,String> message()
Returns a value property for observing the message of a `Text` or `ToolTip`.

Returns:
  a value property for observing the message of a `Text` or `ToolTip`.

### minimum

public static <S extends Control> IWidgetValueProperty<S,Integer> minimum()
Returns a value property for observing the minimum value of a `Scale`, `Slider` (since 1.5) or `Spinner`.

Returns:
  a value property for observing the minimum value of a `Scale`, `Slider` (since 1.5) or `Spinner`.

### widgetSelection

public static <S extends Widget, T> IWidgetValueProperty<S,T> widgetSelection()
Returns a value property for observing the selection state of a `Button`, `CCombo`, `Combo`, `DateTime`, `List`, `MenuItem` (since 1.5), `Scale`, `Slider` (since 1.5) or `Spinner`.

Returns:
  a value property for observing the selection state of a `Button`, `CCombo`, `Combo`, `DateTime`, `List`, `MenuItem`, `Scale`, `Slider` or `Spinner`.

### dateTimeSelection

public static IWidgetValueProperty<DateTime,Date> dateTimeSelection()
Returns a value property for observing the selection state of a `DateTime`.

Returns:
  a value property for observing the selection state of a `DateTime`.
Since:
  1.9

### localDateSelection

public static IWidgetValueProperty<DateTime, LocalDate> localDateSelection()
Returns a value property for observing the selection state of a `DateTime` with the `SWT.DATE` or `SWT.CALENDAR` style.

Returns:
  a value property for observing the selection state of a `DateTime`.
Since:
  1.12

### localTimeSelection

public static IWidgetValueProperty<DateTime, LocalTime> localTimeSelection()
Returns a value property for observing the selection state of a `DateTime` with the `SWT.TIME` style.

Returns:
  a value property for observing the selection state of a `DateTime`.
Since:
  1.12

### buttonSelection

public static IWidgetValueProperty<Button,Boolean> buttonSelection()
Returns a value property for observing the selection state of a `Button`.

Returns:
  a value property for observing the selection state of a `Button`.
Since:
  1.9

### comboSelection

public static IWidgetValueProperty<Combo,String> comboSelection()
Returns a value property for observing the selection state of a `Combo`.

Returns:
  a value property for observing the selection state of a `Combo`.
Since:
  1.9

### ccomboSelection

public static IWidgetValueProperty<CCombo,String> ccomboSelection()
Returns a value property for observing the selection state of a `CCombo`.

Returns:
  a value property for observing the selection state of a `CCombo`.
Since:
  1.9

### listSelection

public static IWidgetValueProperty<List,String> listSelection()
Returns a value property for observing the selection state of a `List`.

Returns:
  a value property for observing the selection state of a `List`.
Since:
  1.9

### menuItemSelection

public static IWidgetValueProperty<MenuItem,Boolean> menuItemSelection()
Returns a value property for observing the selection state of a `MenuItem`.

Returns:
  a value property for observing the selection state of a `MenuItem`.
Since:
  1.9

### scaleSelection

public static IWidgetValueProperty<Scale,Integer> scaleSelection()
Returns a value property for observing the selection state of a `Scale`.

Returns:
  a value property for observing the selection state of a `Scale`.
Since:
  1.9

### sliderSelection

public static IWidgetValueProperty<Slider,Integer> sliderSelection()
Returns a value property for observing the selection state of a `Slider`.

Returns:
  a value property for observing the selection state of a `Slider`.
Since:
  1.9

### spinnerSelection

public static IWidgetValueProperty<Spinner,Integer> spinnerSelection()
Returns a value property for observing the selection state of a `Spinner`.

Returns:
  a value property for observing the selection state of a `Spinner`.
Since:
  1.9

### singleSelectionIndex

public static <S extends Control> IWidgetValueProperty<S,Integer> singleSelectionIndex()
Returns a value property for observing the single selection index of a `CCombo`, `Combo`, `List` or `Table`.

Returns:
  a value property for the single selection index of a SWT Combo.

### size

public static <S extends Control> IWidgetValueProperty<S,Point> size()
Returns a value property for observing the size of a `Control`.

Returns:
  a value property for observing the size of a `Control`.

### text

public static <S extends Widget> IWidgetValueProperty<S,String> text()
Returns a value property for observing the text of a `Button`, `CCombo`, `CLabel`, `Combo`, `Item`, `Label`, `Link`, `Shell`, `Group`, `StyledText` or `Text`.

Returns:
  a value property for observing the text of a `Button`, `CCombo`, `CLabel`, `Combo`, `Group`, `Item`, `Label`, `Link`, `Shell`, link StyledText} or `Text`.

### text

public static <S extends Widget> IWidgetValueProperty<S,String> text(int event)
Returns a value property for observing the text of a `StyledText` or `Text`.

Parameters:
  `event` - the SWT event type to register for change events. May be `SWT.None`, `SWT.Modify`, `SWT.FocusOut` or `SWT.DefaultSelection`.
Returns:
  a value property for observing the text of a `StyledText` or `Text`.

### text

public static <S extends Widget> IWidgetValueProperty<S,String> text(int... events)
Returns a value property for observing the text of a `StyledText` or `Text`.

Parameters:
  `events` - varags of SWT event types to register for change events. May include `SWT.None`, `SWT.Modify`, `SWT.FocusOut` or `SWT.DefaultSelection`.
Returns:
  a value property for observing the text of a `StyledText` or `Text`.

### tooltipText

public static <S extends Widget> IWidgetValueProperty<S,String> tooltipText()
Returns a value property for observing the tooltip text of a `CTabItem`, `Control`, `TabItem`, `TableColumn`, `ToolItem`, `TrayItem` or `TreeColumn`.

Returns:
  a value property for observing the tooltip text of a `CTabItem`, `Control`, `TabItem`, `TableColumn`, `ToolItem`, `TrayItem` or `TreeColumn`.

### visible

public static <S extends Widget> IWidgetValueProperty<S,Boolean> visible()
Returns a value property for observing the visibility state of a `Control`, `Menu`, `ScrollBar`, `ToolBar` or `ToolTip`.

Returns:
  a value property for observing the visibility state of a `Control`, `Menu`, `ScrollBar`, `ToolBar` or `ToolTip`.
See Also:
  - `Control.getVisible()`