KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > custom > MovementListener


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.swt.custom;
12
13 import org.eclipse.swt.internal.SWTEventListener;
14
15 /**
16  * This listener is invoked when a new offset is required based on the current
17  * offset and a movement type.
18  *
19  * @see org.eclipse.swt.SWT#MOVEMENT_WORD
20  * @see org.eclipse.swt.SWT#MOVEMENT_WORD_END
21  * @see org.eclipse.swt.SWT#MOVEMENT_WORD_START
22  * @see org.eclipse.swt.SWT#MOVEMENT_CHAR
23  * @see org.eclipse.swt.SWT#MOVEMENT_CLUSTER
24  *
25  * @since 3.3
26  */

27 public interface MovementListener extends SWTEventListener {
28 /**
29  * This method is called when a new offset is required based on the current
30  * offset and a movement type.
31  *
32  * <p>
33  * The following event fields are used:<ul>
34  * <li>event.lineOffset line start offset (input)</li>
35  * <li>event.lineText line text (input)</li>
36  * <li>event.movement the movement type (input)</li>
37  * <li>event.offset the current offset (input)</li>
38  * <li>event.newOffset the new offset (input, output)</li>
39  * </ul>
40  *
41  * @param event the event
42  *
43  * @see MovementEvent
44  * @see StyledText#addWordMovementListener(MovementListener)
45  */

46 public void getNextOffset (MovementEvent event);
47 /**
48  * This method is called when a new offset is required based on the current
49  * offset and a movement type.
50  *
51  * <p>
52  * The following event fields are used:<ul>
53  * <li>event.lineOffset line start offset (input)</li>
54  * <li>event.lineText line text (input)</li>
55  * <li>event.movement the movement type (input)</li>
56  * <li>event.offset the current offset (input)</li>
57  * <li>event.newOffset the new offset (input, output)</li>
58  * </ul>
59  *
60  * @param event the event
61  *
62  * @see MovementEvent
63  * @see StyledText#addWordMovementListener(MovementListener)
64  */

65 public void getPreviousOffset (MovementEvent event);
66
67 }
68
Popular Tags