blob: 2efa88bf76e8d4bf05475766d758a0c2197f2bc1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/*******************************************************************************
* Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jface.text.source;
import org.eclipse.swt.widgets.Event;
/**
* An event sent to {@link org.eclipse.jface.text.source.IVerticalRulerListener} instances when annotation
* related event occurs on the vertical ruler.
*
* @since 3.0
*/
public class VerticalRulerEvent {
private Annotation fAnnotation;
private Event fEvent;
/**
* Creates a new event.
*
* @param annotation the annotation concerned, or <code>null</code>
*/
public VerticalRulerEvent(Annotation annotation) {
fAnnotation= annotation;
}
/**
* Creates a new event.
*
* @param annotation the annotation concerned, or <code>null</code>
* @param event the SWT event that triggered this vertical ruler event, or <code>null</code>
* @since 3.8
*/
public VerticalRulerEvent(Annotation annotation, Event event) {
fAnnotation= annotation;
fEvent= event;
}
/**
* @return the concerned annotation or <code>null</code>
*/
public Annotation getSelectedAnnotation() {
return fAnnotation;
}
/**
* @param annotation the concerned annotation, or <code>null</code>
*/
public void setSelectedAnnotation(Annotation annotation) {
fAnnotation= annotation;
}
/**
* @return the SWT event that triggered this vertical ruler event, or <code>null</code>.
* @since 3.8
*/
public Event getEvent() {
return fEvent;
}
}
|