ReplaceTextStrategy

Inheritance: java.lang.Object

public final class ReplaceTextStrategy

This class contains parameters which define PdfContentEditor behavior when ReplaceText operation is performed.

Constructors

ConstructorDescription
ReplaceTextStrategy()

Methods

MethodDescription
isRegularExpressionUsed()If false, string to find is a simple text.
setRegularExpressionUsed(boolean value)If false, string to find is a simple text.
getNoCharacterBehavior()Action which is performed when no approppriate font found for changed text (Throw exception / Substitute other font / Replace anyway).
setNoCharacterBehavior(ReplaceTextStrategy.NoCharacterAction value)Action which is performed when no approppriate font found for changed text (Throw exception / Substitute other font / Replace anyway).
getReplaceScope()Scope of the replacement operation (replace first occurence or replace all occurences).
setReplaceScope(ReplaceTextStrategy.Scope value)Scope of the replacement operation (replace first occurence or replace all occurences).

ReplaceTextStrategy()

public ReplaceTextStrategy()

isRegularExpressionUsed()

public boolean isRegularExpressionUsed()

If false, string to find is a simple text. If true, string to find is regular expression.

Returns: boolean - boolean value

setRegularExpressionUsed(boolean value)

public void setRegularExpressionUsed(boolean value)

If false, string to find is a simple text. If true, string to find is regular expression.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getNoCharacterBehavior()

public ReplaceTextStrategy.NoCharacterAction getNoCharacterBehavior()

Action which is performed when no approppriate font found for changed text (Throw exception / Substitute other font / Replace anyway).

Returns: NoCharacterAction - NoCharacterAction value.

setNoCharacterBehavior(ReplaceTextStrategy.NoCharacterAction value)

public void setNoCharacterBehavior(ReplaceTextStrategy.NoCharacterAction value)

Action which is performed when no approppriate font found for changed text (Throw exception / Substitute other font / Replace anyway).

Parameters:

ParameterTypeDescription
valueNoCharacterActionNoCharacterAction value.

getReplaceScope()

public ReplaceTextStrategy.Scope getReplaceScope()

Scope of the replacement operation (replace first occurence or replace all occurences).

Returns: Scope - Scope element

setReplaceScope(ReplaceTextStrategy.Scope value)

public void setReplaceScope(ReplaceTextStrategy.Scope value)

Scope of the replacement operation (replace first occurence or replace all occurences).

Parameters:

ParameterTypeDescription
valueScopeint value