|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjsyntaxpane.actions.DocumentSearchData
public class DocumentSearchData
Data that is shared by Find / Replace and Find Next actions for a Document The data here will be added as a property of the Document using the key PROPERTY_KEY. Only through the getFtmEditor can you crate a new instance. The class is responsible for handling the doFind and doReplace all actions. The class is also responsible for displaying the Find / Replace dialog
| Method Summary | |
|---|---|
boolean |
doFindNext(javax.swing.text.JTextComponent target)
Perform a FindNext operation on the given text component. |
boolean |
doFindPrev(javax.swing.text.JTextComponent target)
FInd the previous match |
void |
doReplace(javax.swing.text.JTextComponent target,
java.lang.String replacement)
Replace single occurrence of match with the replacement. |
void |
doReplaceAll(javax.swing.text.JTextComponent target,
java.lang.String replacement)
Perform a replace all operation on the given component. |
static DocumentSearchData |
getFromEditor(javax.swing.text.JTextComponent target)
Get the Search data from a Document. |
java.util.regex.Pattern |
getPattern()
|
boolean |
isWrap()
|
void |
msgNotFound(java.awt.Component target)
Display an OptionPane dialog that the search string is not found |
void |
setPattern(java.util.regex.Pattern pattern)
Set the pattern to the given compiled pattern. |
void |
setPattern(java.lang.String pat,
boolean regex,
boolean ignoreCase)
Sets the pattern from a string and flags |
void |
setWrap(boolean wrap)
|
void |
showQuickFindDialog(javax.swing.text.JTextComponent target)
|
void |
showReplaceDialog(javax.swing.text.JTextComponent target)
Show the Find and Replace dialog for the given frame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.util.regex.Pattern getPattern()
public void setPattern(java.util.regex.Pattern pattern)
pattern - this#setPattern(String, boolean, boolean)
public void setPattern(java.lang.String pat,
boolean regex,
boolean ignoreCase)
throws java.util.regex.PatternSyntaxException
pat - String of patternregex - true if the pattern should be a regexpignoreCase - true to ignore case
java.util.regex.PatternSyntaxExceptionpublic boolean isWrap()
public void setWrap(boolean wrap)
public static DocumentSearchData getFromEditor(javax.swing.text.JTextComponent target)
target - JTextCOmponent we are attaching to
public void doReplaceAll(javax.swing.text.JTextComponent target,
java.lang.String replacement)
target - replacement -
public void doReplace(javax.swing.text.JTextComponent target,
java.lang.String replacement)
target - replacement - public boolean doFindPrev(javax.swing.text.JTextComponent target)
target -
public boolean doFindNext(javax.swing.text.JTextComponent target)
target -
public void msgNotFound(java.awt.Component target)
target - public void showReplaceDialog(javax.swing.text.JTextComponent target)
target - public void showQuickFindDialog(javax.swing.text.JTextComponent target)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||