blob: e9078342ee842a7d93a20884f92d9e1265337597 [file] [log] [blame]
david_williamscfdb2cd2004-11-11 08:37:49 +00001/*******************************************************************************
amywuecebb042007-04-10 20:07:35 +00002 * Copyright (c) 2001, 2005 IBM Corporation and others.
david_williamscfdb2cd2004-11-11 08:37:49 +00003 * 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
amywuecebb042007-04-10 20:07:35 +00007 *
david_williamscfdb2cd2004-11-11 08:37:49 +00008 * Contributors:
9 * IBM Corporation - initial API and implementation
10 * Jens Lukowski/Innoopract - initial renaming/restructuring
11 *
12 *******************************************************************************/
david_williamsf3680f02005-04-13 22:43:54 +000013package org.eclipse.wst.sse.ui.internal.view.events;
david_williamscfdb2cd2004-11-11 08:37:49 +000014
david_williamscfdb2cd2004-11-11 08:37:49 +000015/**
nitind0d5b3412005-09-27 21:36:16 +000016 * @deprecated - use base selection notification
17 *
david_williamscfdb2cd2004-11-11 08:37:49 +000018 * Simply holds data to be passed to CaretEventListeners
19 */
20public class CaretEvent extends java.util.EventObject {
21
david_williams16f26a82004-11-12 07:30:49 +000022 /**
23 * Comment for <code>serialVersionUID</code>
24 */
25 private static final long serialVersionUID = 1L;
david_williamscfdb2cd2004-11-11 08:37:49 +000026 // initialize to impossible location
27 int fPosition = -1;
28
29 /**
30 * doesnt't make sense to have a CaretEvent without the Caret postion, so
31 * use other constructor
32 */
33 protected CaretEvent(Object source) {
34 super(source);
35 }
36
37 /**
38 * This is the preferred constructor.
39 */
40 public CaretEvent(Object source, int position) {
41 super(source);
42 setPosition(position);
43 }
44
45 public int getPosition() {
46 return fPosition;
47 }
48
49 void setPosition(int newPosition) {
50 fPosition = newPosition;
51 }
52}