Eclipse Platform
2.1

org.eclipse.jface.viewers
Interface ISelectionProvider

All Known Subinterfaces:
IContentOutlinePage, IInputSelectionProvider
All Known Implementing Classes:
CompareViewerSwitchingPane, PageBookView.SelectionProvider, MultiPageSelectionProvider, ContentOutline

public interface ISelectionProvider

Interface common to all objects that provide a selection.

See Also:
ISelection, ISelectionChangedListener, SelectionChangedEvent

Method Summary
 void addSelectionChangedListener(ISelectionChangedListener listener)
          Adds a listener for selection changes in this selection provider.
 ISelection getSelection()
          Returns the current selection for this provider.
 void removeSelectionChangedListener(ISelectionChangedListener listener)
          Removes the given selection change listener from this selection provider.
 void setSelection(ISelection selection)
          Sets the current selection for this selection provider.
 

Method Detail

addSelectionChangedListener

public void addSelectionChangedListener(ISelectionChangedListener listener)
Adds a listener for selection changes in this selection provider. Has no effect if an identical listener is already registered.
Parameters:
listener - a selection changed listener

getSelection

public ISelection getSelection()
Returns the current selection for this provider.
Returns:
the current selection

removeSelectionChangedListener

public void removeSelectionChangedListener(ISelectionChangedListener listener)
Removes the given selection change listener from this selection provider. Has no affect if an identical listener is not registered.
Parameters:
listener - a selection changed listener

setSelection

public void setSelection(ISelection selection)
Sets the current selection for this selection provider.
Parameters:
selection - the new selection

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.