|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
kernel.Plugin
kernel.PluginText
public abstract class PluginText
All text plugins have to extend this abstract class and to redefine the
execute method from Plugin.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Method Summary | |
|---|---|
int |
getFlags()
Returns an integer in which each bit codes a flag. |
String |
getFlagsAsLiteral()
Returns the literal form of the flags like (? |
String |
getFlagsAsString()
Returns a String containing the names of all the ticked flags. |
String |
getReplace()
Returns the content of the Replace by field. |
String |
getSearch()
Returns the content of the Search field. |
String |
getSelectedText()
Returns the selected text. |
int |
getSelectionEnd()
Returns the selected text's end position. |
int |
getSelectionStart()
Returns the selected text's start position. |
String |
getText()
Returns the current text to process. |
boolean |
isCANON_EQ()
Indicates whether the CANON_EQ flag is ticked off. |
boolean |
isCASE_INSENSITIVE()
Indicates whether the CASE_INSENSITIVE flag is ticked off. |
boolean |
isCOMMENTS()
Indicates whether the COMMENTS flag is ticked off. |
boolean |
isDOTALL()
Indicates whether the DOTALL flag is ticked off. |
boolean |
isMULTILINE()
Indicates whether the MULTILINE flag is ticked off. |
boolean |
isUNICODE_CASE()
Indicates whether the UNICODE_CASE flag is ticked off. |
boolean |
isUNIX_LINES()
Indicates whether the UNIX_LINES flag is ticked off. |
void |
replace(int start,
int end,
String replacement)
Replaces the text that is between the start and the end positions by the specified one. |
void |
replaceAll(String search,
String replace)
Replaces, in the current text, all the strings that matches the search regex by the replacement string. |
void |
replaceAllSel(String search,
String replace)
Replaces, in the current selected text, all the strings that matches the search regex by the replacement string. |
void |
setCANON_EQ(boolean b)
Ticks or unticks the CANON_EQ flag. |
void |
setCASE_INSENSITIVE(boolean b)
Ticks or unticks the CASE_INSENSITIVE flag. |
void |
setCOMMENTS(boolean b)
Ticks or unticks the COMMENTS flag. |
void |
setDOTALL(boolean b)
Ticks or unticks the DOTALL flag. |
void |
setMULTILINE(boolean b)
Ticks or unticks the MULTILINE flag. |
void |
setReplace(String text)
Sets the content of the Replace by field. |
void |
setSearch(String text)
Sets the content of the Search field. |
void |
setText(String text)
Sets the text to process. |
void |
setUNICODE_CASE(boolean b)
Ticks or unticks the UNICODE_CASE flag. |
void |
setUNIX_LINES(boolean b)
Ticks or unticks the UNIX_LINES flag. |
| Methods inherited from class kernel.Plugin |
|---|
compareTo, execute, getAppLanguage, getDescription, getOwner, getPluginsDir, getSummary, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, readFile, setDescription, setSummary |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public String getSearch()
Search field.
Search fieldpublic String getReplace()
Replace by field.
Replace by fieldpublic String getText()
public String getSelectedText()
public int getSelectionStart()
public int getSelectionEnd()
public int getFlags()
((getFlags() & Pattern.CANON_EQ) > 0) returns
true if the CANON_EQ flag is ticked off.
public String getFlagsAsLiteral()
(?ixsmud), or "" if
no flags is ticked off. Note that there is not literal form for the
CANON_EQ flag.
public String getFlagsAsString()
(getFlagsAsString().indexOf("CANON_EQ") > -1) returns
true if the CANON_EQ flag is ticked off.
public boolean isCANON_EQ()
CANON_EQ flag is ticked off.
true if CANON_EQ is ticked off;
false otherwisepublic boolean isCASE_INSENSITIVE()
CASE_INSENSITIVE flag is ticked off.
true if CASE_INSENSITIVE is ticked off;
false otherwisepublic boolean isCOMMENTS()
COMMENTS flag is ticked off.
true if COMMENTS is ticked off;
false otherwisepublic boolean isDOTALL()
DOTALL flag is ticked off.
true if DOTALL is ticked off;
false otherwisepublic boolean isMULTILINE()
MULTILINE flag is ticked off.
true if MULTILINE is ticked off;
false otherwisepublic boolean isUNICODE_CASE()
UNICODE_CASE flag is ticked off.
true if UNICODE_CASE is ticked off;
false otherwisepublic boolean isUNIX_LINES()
UNIX_LINES flag is ticked off.
true if UNIX_LINES is ticked off;
false otherwisepublic void setSearch(String text)
Search field.
text - the content of the Search fieldpublic void setReplace(String text)
Replace by field.
text - the content of the Replace by fieldpublic void setText(String text)
text - the textpublic void setCANON_EQ(boolean b)
CANON_EQ flag.
b - true to tick the flag; false to untick
the flagpublic void setCASE_INSENSITIVE(boolean b)
CASE_INSENSITIVE flag.
b - true to tick the flag; false to untick
the flagpublic void setCOMMENTS(boolean b)
COMMENTS flag.
b - true to tick the flag; false to untick
the flagpublic void setDOTALL(boolean b)
DOTALL flag.
b - true to tick the flag; false to untick
the flagpublic void setMULTILINE(boolean b)
MULTILINE flag.
b - true to tick the flag; false to untick
the flagpublic void setUNICODE_CASE(boolean b)
UNICODE_CASE flag.
b - true to tick the flag; false to untick
the flagpublic void setUNIX_LINES(boolean b)
UNIX_LINES flag.
b - true to tick the flag; false to untick
the flag
public void replace(int start,
int end,
String replacement)
start - the start position of the text that will be replacedend - the end position of the text that will be replacedreplacement - the replacement text
public void replaceAll(String search,
String replace)
search regex by the replacement string. Note that the regular
expressions must be coded in java, for instance the newline character
\n will be written \\n.
search - the pattern to findreplace - the replacement string
public void replaceAllSel(String search,
String replace)
search regex by the replacement string. Note that the regular
expressions must be coded in java, for instance the newline character
\n will be written \\n.
search - the pattern to findreplace - the replacement string
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||