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
TheContentSelectionProvideris anISelectionProviderimplementation that manages the un-/registration of listeners and their execution upon selection changes.
-
-
Constructor Summary
Constructors Constructor Description ContentSelectionProvider(IViewer viewer)Creates a newContentSelectionProviderfor the givenSelectionModel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSelectionChangedListener(ISelectionChangedListener listener)voiddispose()ISelectiongetSelection()protected IViewergetViewer()Returns theIViewerthisContentSelectionProvideris bound to.voidremoveSelectionChangedListener(ISelectionChangedListener listener)voidsetSelection(ISelection selection)
-
-
-
Constructor Detail
-
ContentSelectionProvider
public ContentSelectionProvider(IViewer viewer)
Creates a newContentSelectionProviderfor the givenSelectionModel.- Parameters:
viewer- TheIViewerto associate thisContentSelectionProviderto.
-
-
Method Detail
-
addSelectionChangedListener
public void addSelectionChangedListener(ISelectionChangedListener listener)
- Specified by:
addSelectionChangedListenerin interfaceISelectionProvider
-
dispose
public void dispose()
- Specified by:
disposein interfaceIDisposable
-
getSelection
public ISelection getSelection()
- Specified by:
getSelectionin interfaceISelectionProvider
-
getViewer
protected IViewer getViewer()
Returns theIViewerthisContentSelectionProvideris bound to.- Returns:
- The
IViewerthisContentSelectionProvideris bound to.
-
removeSelectionChangedListener
public void removeSelectionChangedListener(ISelectionChangedListener listener)
- Specified by:
removeSelectionChangedListenerin interfaceISelectionProvider
-
setSelection
public void setSelection(ISelection selection)
- Specified by:
setSelectionin interfaceISelectionProvider
-
-