|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.databinding.viewers.ViewersObservables
Factory methods for creating observables for JFace viewers
Constructor Summary | |
ViewersObservables()
|
Method Summary | |
static IViewerObservableSet |
observeCheckedElements(CheckboxTableViewer viewer,
Object elementType)
Returns an observable set that tracks the checked elements of the given viewer. |
static IViewerObservableSet |
observeCheckedElements(CheckboxTreeViewer viewer,
Object elementType)
Returns an observable set that tracks the checked elements of the given viewer. |
static IObservableSet |
observeCheckedElements(ICheckable checkable,
Object elementType)
Returns an observable set that tracks the checked elements of the given ICheckable . |
static IObservableValue |
observeInput(Viewer viewer)
Returns an observable value that tracks the input of the given viewer. |
static IObservableList |
observeMultiSelection(ISelectionProvider selectionProvider)
Returns an observable list that tracks the current selection of the given selection provider. |
static IViewerObservableList |
observeMultiSelection(Viewer viewer)
Returns an observable list that tracks the current selection of the given viewer. |
static IObservableValue |
observeSingleSelection(ISelectionProvider selectionProvider)
Returns an observable value that tracks the current selection of the given selection provider. |
static IViewerObservableValue |
observeSingleSelection(Viewer viewer)
Returns an observable value that tracks the current selection of the given viewer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ViewersObservables()
Method Detail |
public static IObservableValue observeSingleSelection(ISelectionProvider selectionProvider)
IStructuredSelection
, the observable value will be the
first element of the structured selection as returned by
IStructuredSelection.getFirstElement()
.
selectionProvider
-
public static IObservableList observeMultiSelection(ISelectionProvider selectionProvider)
IStructuredSelection
. Note that the
observable list will not honor the full contract of
java.util.List
in that it may delete or reorder elements
based on what the selection provider returns from
ISelectionProvider.getSelection()
after having called
ISelectionProvider.setSelection(org.eclipse.jface.viewers.ISelection)
based on the requested change to the observable list. The affected
methods are add
, addAll
, and
set
.
selectionProvider
-
public static IViewerObservableValue observeSingleSelection(Viewer viewer)
IStructuredSelection
, the observable value will be the first
element of the structured selection as returned by
IStructuredSelection.getFirstElement()
.
viewer
- the viewer
public static IViewerObservableList observeMultiSelection(Viewer viewer)
IStructuredSelection
. Note that the
observable list will not honor the full contract of
java.util.List
in that it may delete or reorder elements
based on what the viewer returns from
ISelectionProvider.getSelection()
after having called
ISelectionProvider.setSelection(org.eclipse.jface.viewers.ISelection)
based on the requested change to the observable list. The affected
methods are add
, addAll
, and
set
.
viewer
-
public static IObservableValue observeInput(Viewer viewer)
The returned observer is blind to changes in the viewer's input unless
its IObservableValue.setValue(Object)
method is called directly.
viewer
- the viewer to observe
public static IObservableSet observeCheckedElements(ICheckable checkable, Object elementType)
ICheckable
.
checkable
- ICheckable
containing the checked elements to trackelementType
- element type of the returned set
public static IViewerObservableSet observeCheckedElements(CheckboxTableViewer viewer, Object elementType)
ICheckable
.
viewer
- CheckboxTableViewer
containing the checked elements to
track.elementType
- element type of the returned set
public static IViewerObservableSet observeCheckedElements(CheckboxTreeViewer viewer, Object elementType)
ICheckable
.
viewer
- CheckboxTreeViewer
containing the checked elements to
track.elementType
- element type of the returned set
|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.