public class SearchEngine
extends java.lang.Object
Constructor and Description |
---|
SearchEngine() |
Modifier and Type | Method and Description |
---|---|
int |
getSearchIndex()
Return the search index.
|
int |
getSearchOffset()
Return the search offset.
|
java.lang.String |
getTextToSearch()
Return the text to search.
|
boolean |
hasNextResult()
Return true if the search has a next result.
|
boolean |
hasPreviousResult()
Return true if the search has a previous result.
|
void |
reset()
Resets the search.
|
void |
search(java.lang.String searchString,
boolean regex,
boolean matchCase)
Search for a pattern.
|
void |
searchNext()
Search the next result.
|
void |
searchPrevious()
Search the previous result.
|
void |
setSearch(java.lang.String text,
JEditor editor)
Set the search parameters.
|
void |
setSearch(java.lang.String text,
JEditor editor,
int offset)
Set the search parameters.
|
void |
setSearchOffset(int offset)
Set the search offset.
|
public void reset()
public int getSearchIndex()
public boolean hasPreviousResult()
public boolean hasNextResult()
public void search(java.lang.String searchString, boolean regex, boolean matchCase)
searchString
- the search stringregex
- if using a regular expressionmatchCase
- for matching the casepublic void searchPrevious()
public void searchNext()
public void setSearch(java.lang.String text, JEditor editor, int offset)
text
- the text to searcheditor
- the editoroffset
- the search offsetpublic void setSearchOffset(int offset)
offset
- the search offsetpublic int getSearchOffset()
public void setSearch(java.lang.String text, JEditor editor)
text
- the text to searcheditor
- the editorpublic java.lang.String getTextToSearch()
Copyright © 2016, 2017, 2018, 2019, 2023 Herve Girod. All Rights Reserved. Documentation and source under the MIT licence