public class SearchResults extends java.lang.Object implements DocumentListener, CaretListener
Modifier and Type | Class and Description |
---|---|
static class |
SearchResults.Direction |
static interface |
SearchResults.SearchResultsListener |
ARRAY_FACTORY, EMPTY_ARRAY
Constructor and Description |
---|
SearchResults(Editor editor,
Project project) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(SearchResults.SearchResultsListener srl) |
void |
beforeDocumentChange(DocumentEvent event)
Called before the text of the document is changed.
|
void |
caretPositionChanged(CaretEvent event)
Called when the caret position has changed.
|
void |
clear() |
void |
dispose() |
void |
exclude(FindResult occurrence) |
FindResult |
getCursor() |
int |
getCursorVisualIndex() |
Editor |
getEditor() |
java.util.Set<RangeMarker> |
getExcluded() |
FindModel |
getFindModel() |
int |
getMatchesCount() |
int |
getMatchesLimit() |
java.util.List<FindResult> |
getOccurrences() |
Project |
getProject() |
int |
getStamp() |
boolean |
hasMatches() |
boolean |
isExcluded(FindResult occurrence) |
boolean |
isUpdating() |
boolean |
isUpToDate() |
void |
moveCursorTo(FindResult next,
boolean retainOldSelection,
boolean adjustScrollPosition) |
void |
nextOccurrence(boolean retainOldSelection) |
void |
prevOccurrence(boolean findSelected) |
void |
removeListener(SearchResults.SearchResultsListener srl) |
void |
setMatchesLimit(int matchesLimit) |
void |
setNotFoundState(boolean isForward) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bulkUpdateFinished, bulkUpdateStarting, documentChanged
caretAdded, caretRemoved
public int getStamp()
public void beforeDocumentChange(DocumentEvent event)
DocumentListener
beforeDocumentChange
in interface DocumentListener
event
- the event containing the information about the change.public void caretPositionChanged(CaretEvent event)
CaretListener
Only explicit caret movements (caused by 'move' methods in Caret
and CaretModel
) are reported, 'induced' changes of
caret offset due to document modifications are not reported.
caretPositionChanged
in interface CaretListener
event
- the event containing information about the caret movement.public void setNotFoundState(boolean isForward)
public int getMatchesCount()
public boolean hasMatches()
public FindModel getFindModel()
public boolean isExcluded(FindResult occurrence)
public void exclude(FindResult occurrence)
public java.util.Set<RangeMarker> getExcluded()
public void addListener(SearchResults.SearchResultsListener srl)
public void removeListener(SearchResults.SearchResultsListener srl)
public int getMatchesLimit()
public void setMatchesLimit(int matchesLimit)
public FindResult getCursor()
public int getCursorVisualIndex()
public java.util.List<FindResult> getOccurrences()
public Project getProject()
public Editor getEditor()
public void clear()
public void dispose()
public void prevOccurrence(boolean findSelected)
public void nextOccurrence(boolean retainOldSelection)
public void moveCursorTo(FindResult next, boolean retainOldSelection, boolean adjustScrollPosition)
public boolean isUpToDate()
public boolean isUpdating()