|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.ui.rtextarea.SearchContext
public class SearchContext
Contains information about a find/replace operation. Applications can
keep an instance of this class around and use it to maintain the user's
selection for options such as "match case," "regular expression," etc.,
between search operations. They can then pass the instance as a parameter
to the public SearchEngine methods to do the actual searching.
SearchEngine| Constructor Summary | |
|---|---|
SearchContext()
Creates a new search context. |
|
SearchContext(String searchFor)
Creates a new search context. |
|
SearchContext(String searchFor,
boolean matchCase)
Creates a new search context. |
|
| Method Summary | |
|---|---|
boolean |
getMatchCase()
Returns whether case should be honored while searching. |
String |
getReplaceWith()
Returns the text to replace with, if doing a replace operation. |
String |
getSearchFor()
Returns the text to search for. |
boolean |
getSearchForward()
Returns whether the search should be forward through the text (vs. |
boolean |
getSearchSelectionOnly()
Returns whether the search should only be done in the selected text. |
boolean |
getWholeWord()
Returns whether only "whole word" matches should be returned. |
boolean |
isRegularExpression()
Returns whether a regular expression search should be done. |
void |
setMatchCase(boolean matchCase)
Sets whether case should be honored while searching. |
void |
setRegularExpression(boolean regex)
Sets whether a regular expression search should be done. |
void |
setReplaceWith(String replaceWith)
Sets the text to replace with, if doing a replace operation. |
void |
setSearchFor(String searchFor)
Sets the text to search for. |
void |
setSearchForward(boolean forward)
Sets whether the search should be forward through the text (vs. |
void |
setSearchSelectionOnly(boolean selectionOnly)
Sets whether only the selected text should be searched. |
void |
setWholeWord(boolean wholeWord)
Sets whether only "whole word" matches should be returned. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SearchContext()
public SearchContext(String searchFor)
searchFor - The text to search for.
public SearchContext(String searchFor,
boolean matchCase)
searchFor - The text to search for.matchCase - Whether to do a case-sensitive search.| Method Detail |
|---|
public boolean getMatchCase()
setMatchCase(boolean)public String getReplaceWith()
setReplaceWith(String),
getSearchFor()public String getSearchFor()
setSearchFor(String),
getReplaceWith()public boolean getSearchForward()
setSearchForward(boolean)public boolean getSearchSelectionOnly()
setSearchSelectionOnly(boolean)public boolean getWholeWord()
setWholeWord(boolean)public boolean isRegularExpression()
setRegularExpression(boolean)public void setMatchCase(boolean matchCase)
matchCase - Whether case should be honored.getMatchCase()public void setRegularExpression(boolean regex)
regex - Whether a regular expression search should be done.isRegularExpression()public void setReplaceWith(String replaceWith)
replaceWith - The text to replace with.getReplaceWith(),
setSearchFor(String)public void setSearchFor(String searchFor)
searchFor - The text to search for.getSearchFor(),
setReplaceWith(String)public void setSearchForward(boolean forward)
forward - Whether we should search forwards.getSearchForward()public void setSearchSelectionOnly(boolean selectionOnly)
selectionOnly - Whether only selected text should be searched.getSearchSelectionOnly()public void setWholeWord(boolean wholeWord)
wholeWord - Whether only "whole word" matches should be returned.getWholeWord()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||