public final class ReplaceTextStrategy extends Object
This class contains parameters which define PdfContentEditor behavior when ReplaceText operation is performed.
Modifier and Type | Class and Description |
---|---|
static class |
ReplaceTextStrategy.NoCharacterAction
Action to perform if font does not contain required character
|
static class |
ReplaceTextStrategy.Scope
Scope where replace text operation is applied REPLACE_FIRST by default
|
Constructor and Description |
---|
ReplaceTextStrategy() |
Modifier and Type | Method and Description |
---|---|
int |
getNoCharacterBehavior()
Action which is performed when no approppriate font found for changed text (Throw exception /
Substitute other font / Replace anyway).
|
int |
getReplaceScope()
Scope of the replacement operation (replace first occurence or replace all occurences).
|
boolean |
isRegularExpressionUsed()
If false, string to find is a simple text.
|
void |
setNoCharacterBehavior(int value)
Action which is performed when no approppriate font found for changed text (Throw exception /
Substitute other font / Replace anyway).
|
void |
setRegularExpressionUsed(boolean value)
If false, string to find is a simple text.
|
void |
setReplaceScope(int value)
Scope of the replacement operation (replace first occurence or replace all occurences).
|
public boolean isRegularExpressionUsed()
If false, string to find is a simple text. If true, string to find is regular expression.
public void setRegularExpressionUsed(boolean value)
If false, string to find is a simple text. If true, string to find is regular expression.
value
- boolean valuepublic int getNoCharacterBehavior()
Action which is performed when no approppriate font found for changed text (Throw exception / Substitute other font / Replace anyway).
ReplaceTextStrategy.NoCharacterAction
public void setNoCharacterBehavior(int value)
Action which is performed when no approppriate font found for changed text (Throw exception / Substitute other font / Replace anyway).
value
- NoCharacterAction value.ReplaceTextStrategy.NoCharacterAction
public int getReplaceScope()
Scope of the replacement operation (replace first occurence or replace all occurences).
ReplaceTextStrategy.Scope
public void setReplaceScope(int value)
Scope of the replacement operation (replace first occurence or replace all occurences).
value
- int value
Example:
ReplaceTextStrategy replaceTxt = new ReplaceTextStrategy();
replaceTxt.setReplaceScope(ReplaceTextStrategy.Scope.REPLACE_ALL);