Ejemplo n.º 1
0
 protected void fireSearchResult(EventSearchResult esr) {
   // Guaranteed to return a non-null array
   Object[] listeners = listenerList.getListenerList();
   // Process the listeners last to first, notifying
   // those that are interested in this event
   for (int i = listeners.length - 2; i >= 0; i -= 2) {
     if (listeners[i] == SearchResultListener.class) {
       ((SearchResultListener) listeners[i + 1]).processSearchResult(esr);
     }
   }
 }
Ejemplo n.º 2
0
 public void addSearchResultListener(SearchResultListener l) {
   listenerList.add(SearchResultListener.class, l);
 }