ReplacementOptions

Inheritance: java.lang.Object

public class ReplacementOptions

Represents options for matched text replacement.


Learn more

Constructors

Constructor Description
ReplacementOptions(String replacement) Initializes a new instance of ReplacementOptions class with replacement text as an option.
ReplacementOptions(Color color) Initializes a new instance of ReplacementOptions class with colored rectangle as an option.

Methods

Method Description
getActionType() Gets the replacement action: draw box or replace text.
getReplacement() Gets the textual replacement value.
setReplacement(String value) Sets the textual replacement value.
getBoxColor() Gets the color for a ReplacementType.DrawBox option (ignored otherwise).
setBoxColor(Color value) Sets the color for a ReplacementType.DrawBox option (ignored otherwise).
getFilters() Gets an array of filters to apply with this redaction.
setFilters(RedactionFilter[] value) Sets an array of filters to apply with this redaction.
fromFilters(RedactionFilter[] filters)

ReplacementOptions(String replacement)

public ReplacementOptions(String replacement)

Initializes a new instance of ReplacementOptions class with replacement text as an option.

Parameters:

Parameter Type Description
replacement java.lang.String Textual replacement

ReplacementOptions(Color color)

public ReplacementOptions(Color color)

Initializes a new instance of ReplacementOptions class with colored rectangle as an option.

Parameters:

Parameter Type Description
color java.awt.Color Rectangle color

getActionType()

public final ReplacementType getActionType()

Gets the replacement action: draw box or replace text.

Returns: ReplacementType - The replacement action: draw box or replace text.

getReplacement()

public final String getReplacement()

Gets the textual replacement value.

Returns: java.lang.String - The textual replacement value.

setReplacement(String value)

public final void setReplacement(String value)

Sets the textual replacement value.

Parameters:

Parameter Type Description
value java.lang.String The textual replacement value.

getBoxColor()

public final Color getBoxColor()

Gets the color for a ReplacementType.DrawBox option (ignored otherwise).

Returns: java.awt.Color - The color for a ReplacementType.DrawBox option (ignored otherwise).

setBoxColor(Color value)

public final void setBoxColor(Color value)

Sets the color for a ReplacementType.DrawBox option (ignored otherwise).

Parameters:

Parameter Type Description
value java.awt.Color The color for a ReplacementType.DrawBox option (ignored otherwise).

getFilters()

public final RedactionFilter[] getFilters()

Gets an array of filters to apply with this redaction.

Returns: com.groupdocs.redaction.redactions.RedactionFilter[] - An array of filters to apply with this redaction.

setFilters(RedactionFilter[] value)

public final void setFilters(RedactionFilter[] value)

Sets an array of filters to apply with this redaction.

Parameters:

Parameter Type Description
value RedactionFilter[] An array of filters to apply with this redaction.

fromFilters(RedactionFilter[] filters)

public static ReplacementOptions fromFilters(RedactionFilter[] filters)

Parameters:

Parameter Type Description
filters RedactionFilter[]

Returns: ReplacementOptions