public class DefaultScrollingProvider extends java.lang.Object implements IScrollingProvider
IScrollingProvider interface.
This class registers a selection listener on the scrollable control for
monitoring scrolling events.IScrollingProviderHORIZONTAL_SCROLLING, VERTICAL_SCROLLING| Constructor and Description |
|---|
DefaultScrollingProvider(org.eclipse.swt.widgets.Scrollable control,
IContentViewerPane pane)
Constructs a new DefaultScrollingProvider
|
| Modifier and Type | Method and Description |
|---|---|
void |
addScrollingEventListener(IScrollingListener listener)
Adds a listener for scrolling changes.
|
protected org.eclipse.core.runtime.ListenerList |
getScrollingListeners()
Returns the scrolling listeners
|
int |
getSelection(int scrollingType)
Gets the single selection that is the receiver's value for the specified
scrolling type.
|
protected void |
notifyListeners(int scrollingType,
org.eclipse.swt.events.SelectionEvent event)
Notifies the scrolling listeners
|
void |
removeScrollingEventListener(IScrollingListener listener)
Removes a listener for scrolling changes.
|
void |
setSelection(int scrollingType,
int selection)
Sets the single selection that is the receiver's value to the specified
selection which must be greater than or equal to zero for the specified
scrolling type.
|
public DefaultScrollingProvider(org.eclipse.swt.widgets.Scrollable control,
IContentViewerPane pane)
control - the scrollable controlpane - the content viewer panepublic final void addScrollingEventListener(IScrollingListener listener)
IScrollingProvideraddScrollingEventListener in interface IScrollingProviderlistener - a scrolling listenerIScrollingProvider.addScrollingEventListener(com.ibm.xtools.comparemerge.ui.listeners.IScrollingListener)public int getSelection(int scrollingType)
IScrollingProvidergetSelection in interface IScrollingProviderscrollingType - the type of scrolling, e.g. HORIZONTAL_SCROLLINGIScrollingProvider.getSelection(int)public final void removeScrollingEventListener(IScrollingListener listener)
IScrollingProviderremoveScrollingEventListener in interface IScrollingProviderlistener - a scrolling listenerIScrollingProvider.removeScrollingEventListener(com.ibm.xtools.comparemerge.ui.listeners.IScrollingListener)public void setSelection(int scrollingType,
int selection)
IScrollingProvidersetSelection in interface IScrollingProviderscrollingType - the type of scrolling , e.g. HORIZONTAL_SCROLLINGselection - the new selection (must be zero or greater)IScrollingProvider.setSelection(int,
int)protected void notifyListeners(int scrollingType,
org.eclipse.swt.events.SelectionEvent event)
scrollingType - the scrolling typeevent - the eventprotected final org.eclipse.core.runtime.ListenerList getScrollingListeners()