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 Object
    implements ISelectionProvider, IDisposable

The `ContentSelectionProvider` is an `ISelectionProvider` implementation that manages the un-/registration of listeners and their execution upon selection changes.

### Constructor Summary

Constructors
Constructor and Description
`ContentSelectionProvider(IViewer viewer)` Creates a new `ContentSelectionProvider` for the given `SelectionModel`.

### Method Summary

All Methods Instance Methods Concrete Methods
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ContentSelectionProvider

    public ContentSelectionProvider(IViewer viewer)

Creates a new `ContentSelectionProvider` for the given `SelectionModel`.

Parameters:
  `viewer` - The `IViewer` to associate this `ContentSelectionProvider` to.

### Method Detail

#### addSelectionChangedListener

    public void addSelectionChangedListener(ISelectionChangedListener listener)

Specified by:
  `addSelectionChangedListener` in interface `ISelectionProvider`

#### dispose

    public void dispose()

Specified by:
  `dispose` in interface `IDisposable`

#### getSelection

    public ISelection getSelection()

Specified by:
  `getSelection` in interface `ISelectionProvider`

#### getViewer

    protected IViewer getViewer()

Returns the `IViewer` this `ContentSelectionProvider` is bound to.

Returns:
  The `IViewer` this `ContentSelectionProvider` is bound to.

#### removeSelectionChangedListener

    public void removeSelectionChangedListener(ISelectionChangedListener listener)

Specified by:
  `removeSelectionChangedListener` in interface `ISelectionProvider`

#### setSelection

    public void setSelection(ISelection selection)

Specified by:
  `setSelection` in interface `ISelectionProvider`