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 ISelectionProvider
public void dispose()
dispose
in interface IDisposable
public ISelection getSelection()
getSelection
in interface ISelectionProvider
protected IViewer getViewer()
IViewer
this ContentSelectionProvider
is
bound to.IViewer
this ContentSelectionProvider
is
bound to.public void removeSelectionChangedListener(ISelectionChangedListener listener)
removeSelectionChangedListener
in interface ISelectionProvider
public void setSelection(ISelection selection)
setSelection
in interface ISelectionProvider
Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.