Package org.eclipse.gef.mvc.fx.ui.parts
Class ContentSelectionProvider
- java.lang.Object
-
- org.eclipse.gef.mvc.fx.ui.parts.ContentSelectionProvider
-
- All Implemented Interfaces:
ISelectionProvider
,IDisposable
public class ContentSelectionProvider extends java.lang.Object implements ISelectionProvider, IDisposable
TheContentSelectionProvider
is anISelectionProvider
implementation that manages the un-/registration of listeners and their execution upon selection changes.
-
-
Constructor Summary
Constructors Constructor Description ContentSelectionProvider(IViewer viewer)
Creates a newContentSelectionProvider
for the givenSelectionModel
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSelectionChangedListener(ISelectionChangedListener listener)
void
dispose()
ISelection
getSelection()
protected IViewer
getViewer()
Returns theIViewer
thisContentSelectionProvider
is bound to.void
removeSelectionChangedListener(ISelectionChangedListener listener)
void
setSelection(ISelection selection)
-
-
-
Constructor Detail
-
ContentSelectionProvider
public ContentSelectionProvider(IViewer viewer)
Creates a newContentSelectionProvider
for the givenSelectionModel
.- Parameters:
viewer
- TheIViewer
to associate thisContentSelectionProvider
to.
-
-
Method Detail
-
addSelectionChangedListener
public void addSelectionChangedListener(ISelectionChangedListener listener)
- Specified by:
addSelectionChangedListener
in interfaceISelectionProvider
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceIDisposable
-
getSelection
public ISelection getSelection()
- Specified by:
getSelection
in interfaceISelectionProvider
-
getViewer
protected IViewer getViewer()
Returns theIViewer
thisContentSelectionProvider
is bound to.- Returns:
- The
IViewer
thisContentSelectionProvider
is bound to.
-
removeSelectionChangedListener
public void removeSelectionChangedListener(ISelectionChangedListener listener)
- Specified by:
removeSelectionChangedListener
in interfaceISelectionProvider
-
setSelection
public void setSelection(ISelection selection)
- Specified by:
setSelection
in interfaceISelectionProvider
-
-