public class ContentSelectionProvider extends java.lang.Object implements ISelectionProvider, IDisposable
ContentSelectionProvider is an ISelectionProvider
implementation that manages the un-/registration of listeners and their
execution upon selection changes.| Constructor and Description |
|---|
ContentSelectionProvider(IViewer viewer)
Creates a new
ContentSelectionProvider for the given
SelectionModel. |
| Modifier and Type | Method and Description |
|---|---|
void |
addSelectionChangedListener(ISelectionChangedListener listener) |
void |
dispose() |
ISelection |
getSelection() |
protected IViewer |
getViewer()
Returns the
IViewer this ContentSelectionProvider is
bound to. |
void |
removeSelectionChangedListener(ISelectionChangedListener listener) |
void |
setSelection(ISelection selection) |
public ContentSelectionProvider(IViewer viewer)
ContentSelectionProvider for the given
SelectionModel.viewer - The IViewer to associate this
ContentSelectionProvider to.public void addSelectionChangedListener(ISelectionChangedListener listener)
addSelectionChangedListener in interface ISelectionProviderpublic void dispose()
dispose in interface IDisposablepublic ISelection getSelection()
getSelection in interface ISelectionProviderprotected IViewer getViewer()
IViewer this ContentSelectionProvider is
bound to.IViewer this ContentSelectionProvider is
bound to.public void removeSelectionChangedListener(ISelectionChangedListener listener)
removeSelectionChangedListener in interface ISelectionProviderpublic void setSelection(ISelection selection)
setSelection in interface ISelectionProviderCopyright (c) 2014, 2016 itemis AG and others. All rights reserved.