Package org.csstudio.ui.util
Class AbstractSelectionProviderWrapper
java.lang.Object
org.csstudio.ui.util.AbstractSelectionProviderWrapper
- All Implemented Interfaces:
ISelectionProvider
Helper class to wrap a selection provider (e.g. a table, a tree, ...), so that events are fired at the same time, but
the selection is changed to a different type (e.g. String to ProcessVariable).
This class is useful when constructing a composite that should behave like a standard JFace widget in term of selection but with CSS business objects. To use, you implement the transform and reverseTransform that convert the selection back and forth.
-
Constructor Summary
ConstructorDescriptionAbstractSelectionProviderWrapper
(ISelectionProvider wrappedProvider, ISelectionProvider eventSource) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
protected ISelection
reverseTransform
(IStructuredSelection selection) void
setSelection
(ISelection selection) protected abstract ISelection
transform
(IStructuredSelection selection)
-
Constructor Details
-
AbstractSelectionProviderWrapper
public AbstractSelectionProviderWrapper(ISelectionProvider wrappedProvider, ISelectionProvider eventSource)
-
-
Method Details
-
addSelectionChangedListener
- Specified by:
addSelectionChangedListener
in interfaceISelectionProvider
-
removeSelectionChangedListener
- Specified by:
removeSelectionChangedListener
in interfaceISelectionProvider
-
getSelection
- Specified by:
getSelection
in interfaceISelectionProvider
-
setSelection
- Specified by:
setSelection
in interfaceISelectionProvider
-
transform
-
reverseTransform
-