ReplacementOptions
Leave feedback
On this page
Inheritance: java.lang.Object
public class ReplacementOptions
Represents options for matched text replacement.
Learn more
- More details about document text redactions: Text redactions
- More details about redaction filters: Use PDF redaction filters
| 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. |
| 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) |
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 |
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 |
public final ReplacementType getActionType()
Gets the replacement action: draw box or replace text.
Returns: ReplacementType - The replacement action: draw box or replace text.
public final String getReplacement()
Gets the textual replacement value.
Returns: java.lang.String - The textual replacement value.
public final void setReplacement(String value)
Sets the textual replacement value.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The textual replacement value. |
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).
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). |
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.
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. |
public static ReplacementOptions fromFilters(RedactionFilter[] filters)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filters | RedactionFilter[] |
Returns: ReplacementOptions
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.