KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > search > ui > SearchResultEvent


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * 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
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.search.ui;
12
13 import java.util.EventObject JavaDoc;
14
15 /**
16  * The common superclass of all events sent from <code>ISearchResults</code>.
17  * This class is supposed to be subclassed to provide more specific
18  * notification.
19  *
20  * @see org.eclipse.search.ui.ISearchResultListener#searchResultChanged(SearchResultEvent)
21  *
22  * @since 3.0
23  */

24 public abstract class SearchResultEvent extends EventObject JavaDoc {
25     /**
26      * Creates a new search result event for the given search result.
27      *
28      * @param searchResult the source of the event
29      */

30     protected SearchResultEvent(ISearchResult searchResult) {
31         super(searchResult);
32     }
33     /**
34      * Gets the <code>ISearchResult</code> for this event.
35      *
36      * @return the source of this event
37      */

38     public ISearchResult getSearchResult() {
39         return (ISearchResult) getSource();
40     }
41 }
42
Popular Tags