1
|
/*******************************************************************************
|
2
|
* Copyright (c) 2005, 2010 IBM Corporation and others.
|
3
|
* All rights reserved. This program and the accompanying materials
|
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
5
|
* which accompanies this distribution, and is available at
|
6
|
* http://www.eclipse.org/legal/epl-v10.html
|
7
|
*
|
8
|
* Contributors:
|
9
|
* IBM Corporation - initial API and implementation
|
10
|
*******************************************************************************/
|
11
|
package org.eclipse.gef;
|
12
|
|
13
|
import org.eclipse.swt.widgets.Event;
|
14
|
|
15
|
/**
|
16
|
* MouseWheelHelpers provide each EditPart to handle mouse-wheel events in their
|
17
|
* own desired way. By default, when mouse-wheel events are generated that have
|
18
|
* no stateMask, a default {@link MouseWheelHandler} delegates the task to the
|
19
|
* MouseWheelHelper that is returned by the getAdapter() method of the EditPart
|
20
|
* in focus.
|
21
|
* <p>
|
22
|
* The most common usage of MouseWheelHelpers involves scrolling of an
|
23
|
* EditPart's figure. They should be returned in the EditPart's getAdapter()
|
24
|
* method.
|
25
|
*
|
26
|
* @see org.eclipse.gef.editparts.ViewportMouseWheelHelper
|
27
|
* @author Pratik Shah
|
28
|
* @since 3.1
|
29
|
*/
|
30
|
public interface MouseWheelHelper {
|
31
|
|
32
|
/**
|
33
|
* Handles mouse-wheel events. If the given event was handled in some way,
|
34
|
* its {@link Event#doit doit} field should be set to false so as to prevent
|
35
|
* further processing of that event.
|
36
|
*
|
37
|
* @param event
|
38
|
* The SWT event that was generated as a result of the
|
39
|
* mouse-wheel scrolling
|
40
|
*/
|
41
|
void handleMouseWheelScrolled(Event event);
|
42
|
|
43
|
}
|