-
Notifications
You must be signed in to change notification settings - Fork 53
/
AutoCompletionEvent.java
71 lines (57 loc) · 1.36 KB
/
AutoCompletionEvent.java
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
70
71
/*
* 02/08/2014
*
* This library is distributed under a modified BSD license. See the included
* RSyntaxTextArea.License.txt file for details.
*/
package org.fife.ui.autocomplete;
import java.util.EventObject;
/**
* An event fired by an instance of {@link AutoCompletion}. This can be
* used by applications that wish to be notified of the auto-complete popup
* window showing and hiding.
*
* @author Robert Futrell
* @version 1.0
*/
public class AutoCompletionEvent extends EventObject {
/**
* The type of this event.
*/
private Type type;
/**
* Constructor.
*
* @param source The <code>AutoCompletion</code> instance that fired
* this event.
* @param type The event type.
*/
public AutoCompletionEvent(AutoCompletion source, Type type) {
super(source);
this.type = type;
}
/**
* Returns the source <code>AutoCompletion</code> instance. This is just
* shorthand for <code>return (AutoCompletion)getSource();</code>.
*
* @return The source <code>AutoCompletion</code> instance.
*/
public AutoCompletion getAutoCompletion() {
return (AutoCompletion)getSource();
}
/**
* Returns the type of this event.
*
* @return The type of this event.
*/
public Type getEventType() {
return type;
}
/**
* Enumeration of the various types of this event.
*/
public static enum Type {
POPUP_SHOWN,
POPUP_HIDDEN
}
}