1 | Object[] listeners = listenerList.getListenerList();↵ | | 1 | Object[] listeners = listenerList.getListenerList();↵
|
2 |
↵ | | |
|
|
3 | // Process the listeners last to first, notifying
↵ | | 2 | // Process the listeners last to first, notifying↵
|
4 | // those that are interested in this event
↵ | | 3 | // those that are interested in this event↵
|
5 | for (int i = listeners.length - 2; i >= 0; i -= 2) {
↵ | | 4 | for (int i = listeners.length - 2; i >= 0; i -= 2) {↵
|
6 | if (listeners[i] == ITagListener.class) {
↵ | | 5 | if (listeners[i] == IResultListener.class) {↵
|
7 | ((ITagListener) listeners[i + 1]).tagAdded(e);
↵ | | 6 | ((IResultListener) listeners[i + 1]).finished(e);↵
|
8 | }
↵ | | 7 | }↵
|
9 | }
↵ | | 8 | }↵
|
|
10 | }↵ | | 9 | }↵
|
11 |
↵ | | |
|
|
12 | /**
↵ | | 10 | /**↵
|
13 | * @param id
↵ | | 11 | * Propagates an event to all registered listeners↵
|
14 | */
↵ | | 12 | */↵
|
15 | protected void fireTagDeletedEvent(String id) {
↵ | | 13 | protected void fireClearSearch(String searchTerm) {↵
|
|
16 | ITagEvent e = new TagEvent(this, id);↵ | | 14 | IResultEvent e = new ResultEvent(this, ↵
|
17 |
↵ | | 15 | searchTerm);↵
|
18 | // Guaranteed to return a non-null array
↵ | | 16 | // Guaranteed to return a non-null array↵
|
19 | Object[] listeners = listenerList.getListenerList();↵ | | 17 | Object[] listeners = listenerList.getListenerList();↵
|
20 |
↵ | | |
|
|
21 | // Process the listeners last to first, notifying
↵ | | 18 | // Process the listeners last to first, notifying↵
|
22 | // those that are interested in this event
↵ | | 19 | // those that are interested in this event↵
|
23 | for (int i = listeners.length - 2; i >= 0; i -= 2) {
↵ | | 20 | for (int i = listeners.length - 2; i >= 0; i -= 2) {↵
|
24 | if (listeners[i] == ITagListener.class) {
↵ | | 21 | if (listeners[i] == IResultListener.class) {↵
|
25 | ((ITagListener) listeners[i + 1]).tagDeleted(e);
↵ | | 22 | ((IResultListener) listeners[i + 1]).clearSearch(e);↵
|
26 | }
↵ | | 23 | }↵
|
27 | }
↵ | | 24 | }↵
|
28 | | | 25 |
|