Package org.eclipse.search.ui.text
Class MatchEvent
java.lang.Object
java.util.EventObject
org.eclipse.search.ui.SearchResultEvent
org.eclipse.search.ui.text.MatchEvent
- All Implemented Interfaces:
Serializable
An event object describing addition and removal of matches. Events of this
class are sent when
Matches are added or removed from an
AbstractTextSearchResult.
Clients may instantiate or subclass this class.
- Since:
- 3.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant for a matches being added.static final intConstant for a matches being removed.Fields inherited from class java.util.EventObject
source -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetKind()Tells whether this is a remove or an add.Match[]Returns the concerned matches.protected voidsetKind(int kind) Sets the kind of event this is.protected voidSets the match for the change this event reports.protected voidsetMatches(Match[] matches) Sets the matches for the change this event reports.Methods inherited from class org.eclipse.search.ui.SearchResultEvent
getSearchResultMethods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
ADDED
public static final int ADDEDConstant for a matches being added.- See Also:
-
REMOVED
public static final int REMOVEDConstant for a matches being removed.- See Also:
-
-
Constructor Details
-
MatchEvent
Constructs a newMatchEvent.- Parameters:
searchResult- the search result concerned
-
-
Method Details
-
getKind
public int getKind()Tells whether this is a remove or an add.- Returns:
- one of
ADDEDorREMOVED
-
getMatches
Returns the concerned matches.- Returns:
- the matches this event is about
-
setKind
protected void setKind(int kind) Sets the kind of event this is.- Parameters:
kind- the kind to set; eitherADDEDorREMOVED
-
setMatch
Sets the match for the change this event reports.- Parameters:
match- the match to set
-
setMatches
Sets the matches for the change this event reports.- Parameters:
matches- the matches to set
-