public final class TextReplaceOptions extends TextOptions
Represents text replace options
| Modifier and Type | Class and Description |
|---|---|
static class |
TextReplaceOptions.FontSizeAdjustment
Specifies a policy for how the font size of text should be adjusted to fit within a containing area.
|
static class |
TextReplaceOptions.ReplaceAdjustment
Determines action that will be done after replace of text fragment to more short.
|
static class |
TextReplaceOptions.Scope
Scope where replace text operation is applied REPLACE_FIRST by default This obsolete option
was kept for compatibility.
|
| Constructor and Description |
|---|
TextReplaceOptions()
Initializes new instance of the
TextReplaceOptions object for the default adjustment and scope : ReplaceAdjustment.None and Scope.REPLACE_FIRST |
TextReplaceOptions(int adjustment)
Initializes new instance of the
TextReplaceOptions object for the specified after
replace action. |
TextReplaceOptions(int adjustment,
TextReplaceOptions.Scope scope)
Initializes new instance of the
TextReplaceOptions object for the specified after
replace action. |
TextReplaceOptions(TextReplaceOptions.Scope scope)
Initializes new instance of the
TextReplaceOptions object for the specified scope. |
| Modifier and Type | Method and Description |
|---|---|
double |
getAdjustmentNewLineSpacing()
Gets or sets value of line spacing that used if replace adjustment is forced to create new
line of text.
|
TextReplaceOptions.FontSizeAdjustment |
getFontSizeAdjustmentAction()
Gets or sets the policy for adjusting the font size to fit within the bounds
defined by the
TextReplaceOptions.Rectangle(getRectangle()/setRectangle(Rectangle)). |
double |
getLeftAdjustment()
Gets left position adjustment for replaced text when using TextReplaceOptions:
- ReplaceAdjustmentAction = IsFormFillingMode;
|
Rectangle |
getRectangle()
Gets or sets the rectangle to fit the text after replacement.
|
int |
getReplaceAdjustmentAction()
Gets an action that will be done after replace of text fragment to more short.
|
TextReplaceOptions.Scope |
getReplaceScope()
Gets a scope where replace text operation is applied
|
double |
getRightAdjustment()
Sets or gets right position adjustment for replaced text when using TextReplaceOptions:
- ReplaceAdjustmentAction = WholeWordsHyphenation;
- ReplaceAdjustmentAction = IsFormFillingMode;
|
boolean |
isIgnoreParagraphs()
Gets or sets a value indicating whether to ignore distinct paragraphs when adjusting text on the page after text replacement.
|
void |
setAdjustmentNewLineSpacing(double value)
Gets or sets value of line spacing that used if replace adjustment is forced to create new
line of text.
|
void |
setFontSizeAdjustmentAction(TextReplaceOptions.FontSizeAdjustment value)
Gets or sets the policy for adjusting the font size to fit within the bounds
defined by the
TextReplaceOptions.Rectangle(getRectangle()/setRectangle(Rectangle)). |
void |
setIgnoreParagraphs(boolean value)
Gets or sets a value indicating whether to ignore distinct paragraphs when adjusting text on the page after text replacement.
|
void |
setLeftAdjustment(double value)
Sets or gets left position adjustment for replaced text when using TextReplaceOptions:
- ReplaceAdjustmentAction = IsFormFillingMode;
|
void |
setRectangle(Rectangle value)
Gets or sets the rectangle to fit the text after replacement.
|
void |
setReplaceAdjustmentAction(int value)
Sets an action that will be done after replace of text fragment to more short.
|
void |
setReplaceScope(TextReplaceOptions.Scope value)
Sets a scope where replace text operation is applied
|
void |
setRightAdjustment(double value)
Sets right position adjustment for replaced text when using TextReplaceOptions:
- ReplaceAdjustmentAction = WholeWordsHyphenation;
- ReplaceAdjustmentAction = IsFormFillingMode;
|
public TextReplaceOptions(TextReplaceOptions.Scope scope)
Initializes new instance of the TextReplaceOptions object for the specified scope.
scope - Scope object.TextReplaceOptions.Scopepublic TextReplaceOptions(int adjustment)
Initializes new instance of the TextReplaceOptions object for the specified after
replace action.
adjustment - ReplaceAdjustment object.TextReplaceOptions.ReplaceAdjustmentpublic TextReplaceOptions(int adjustment,
TextReplaceOptions.Scope scope)
Initializes new instance of the TextReplaceOptions object for the specified after
replace action.
adjustment - ReplaceAdjustment object.scope - Scope object.TextReplaceOptions.ReplaceAdjustment,
TextReplaceOptions.Scopepublic TextReplaceOptions()
Initializes new instance of the TextReplaceOptions object for the default adjustment and scope : ReplaceAdjustment.None and Scope.REPLACE_FIRST
public TextReplaceOptions.Scope getReplaceScope()
Gets a scope where replace text operation is applied
TextReplaceOptions.Scopepublic void setReplaceScope(TextReplaceOptions.Scope value)
Sets a scope where replace text operation is applied
value - int valueTextReplaceOptions.Scopepublic int getReplaceAdjustmentAction()
Gets an action that will be done after replace of text fragment to more short.
TextReplaceOptions.ReplaceAdjustmentpublic void setReplaceAdjustmentAction(int value)
Sets an action that will be done after replace of text fragment to more short.
value - ReplaceAdjustment elementTextReplaceOptions.ReplaceAdjustmentpublic double getAdjustmentNewLineSpacing()
Gets or sets value of line spacing that used if replace adjustment is forced to create new line of text. The value expected is multiplier of font size of the replaced text. Default is 1.2.
public void setAdjustmentNewLineSpacing(double value)
Gets or sets value of line spacing that used if replace adjustment is forced to create new line of text. The value expected is multiplier of font size of the replaced text. Default is 1.2.
value - double valuepublic final double getRightAdjustment()
Sets or gets right position adjustment for replaced text when using TextReplaceOptions: - ReplaceAdjustmentAction = WholeWordsHyphenation; - ReplaceAdjustmentAction = IsFormFillingMode;
public final void setRightAdjustment(double value)
Sets right position adjustment for replaced text when using TextReplaceOptions: - ReplaceAdjustmentAction = WholeWordsHyphenation; - ReplaceAdjustmentAction = IsFormFillingMode;
value - double valuepublic final double getLeftAdjustment()
Gets left position adjustment for replaced text when using TextReplaceOptions: - ReplaceAdjustmentAction = IsFormFillingMode;
public final void setLeftAdjustment(double value)
Sets or gets left position adjustment for replaced text when using TextReplaceOptions: - ReplaceAdjustmentAction = IsFormFillingMode;
value - double valuepublic final boolean isIgnoreParagraphs()
Gets or sets a value indicating whether to ignore distinct paragraphs when adjusting text on the page after text replacement.
public final void setIgnoreParagraphs(boolean value)
Gets or sets a value indicating whether to ignore distinct paragraphs when adjusting text on the page after text replacement.
value - boolean valuepublic final Rectangle getRectangle()
Gets or sets the rectangle to fit the text after replacement.
public final void setRectangle(Rectangle value)
Gets or sets the rectangle to fit the text after replacement.
public final TextReplaceOptions.FontSizeAdjustment getFontSizeAdjustmentAction()
Gets or sets the policy for adjusting the font size to fit within the bounds
defined by the TextReplaceOptions.Rectangle(getRectangle()/setRectangle(Rectangle)).
public final void setFontSizeAdjustmentAction(TextReplaceOptions.FontSizeAdjustment value)
Gets or sets the policy for adjusting the font size to fit within the bounds
defined by the TextReplaceOptions.Rectangle(getRectangle()/setRectangle(Rectangle)).
Copyright © 2025 Aspose. All Rights Reserved.