1
|
/*******************************************************************************
|
2
|
* Copyright (c) 2000, 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
|
/**
|
14
|
* A specialization of Tool that is used by the
|
15
|
* {@link org.eclipse.gef.tools.SelectionTool} during a Mouse Drag. The
|
16
|
* <code>SelectionTool</code> obtains a <code>DragTracker</code> on mouse down,
|
17
|
* and forwards all input to that tracker until after the mouse is released. The
|
18
|
* SelectionTool also obtains DragTrackers in keyboard accessible ways.
|
19
|
*/
|
20
|
public interface DragTracker extends Tool {
|
21
|
|
22
|
/**
|
23
|
* The <code>SelectionTool</code> supports keyboard accessible drags. In
|
24
|
* such scenarios it is up to the SelectionTool to interpret <i>commit</i>
|
25
|
* and <i>abort</i> keystrokes. Since the DragTracker cannot do this, this
|
26
|
* method is used to indicate that the User has committed the drag using the
|
27
|
* keyboard. Abort is not handled specially, and the DragTracker should
|
28
|
* peform the usual cleanup in its {@link Tool#deactivate()} method.
|
29
|
*/
|
30
|
void commitDrag();
|
31
|
|
32
|
}
|