TextParagraphProperties Class
Contains paragraph formatting settings.
Declaration
public class TextParagraphProperties extends OfficeObject
Remarks
The following code snippet create a text paragraph, configures its alignment and indentation, and adds the paragraph to a shape’s text area:
import com.devexpress.docs.office.*;
//...
// Create a paragraph that contains text.
TextParagraph textParagraph = new TextParagraph("Hello World.");
// Access paragraph properties.
TextParagraphProperties properties = textParagraph.getProperties();
// Center-align the paragraph.
properties.setAlignment(TextParagraphAlignment.CENTER);
// Set the paragraph's left indent (in points).
properties.setLeftIndent(200.0f);
// Add the paragraph to the shape's text area.
ITextParagraphCollection paragraphs = shape.getTextArea().getParagraphs();
paragraphs.add(textParagraph);
Inherited Members
Inheritance
Constructors
TextParagraphProperties() Constructor
Initializes a new instance of the TextParagraphProperties class.
Declaration
public TextParagraphProperties()
TextParagraphProperties(TextProperties textProperties) Constructor
Initializes a new instance of the TextParagraphProperties class with specified settings.
Declaration
public TextParagraphProperties(TextProperties textProperties)
Parameters
| Name | Type | Description |
|---|---|---|
| textProperties | TextProperties | Specifies default text properties for the paragraph. |
Methods
deepClone() Method
Returns a deep copy of this TextParagraphProperties instance.
Declaration
public TextParagraphProperties deepClone()
Returns
| Type | Description |
|---|---|
TextParagraphProperties |
A deep copy of this |
getAlignment() Method
Returns the paragraph alignment.
Declaration
public @Nullable TextParagraphAlignment getAlignment()
Returns
| Type | Description |
|---|---|
| TextParagraphAlignment | The paragraph alignment. |
getDefaultTabSize() Method
Returns the default tab stop distance for the paragraph (in the Document measurement units. 1 Document unit equals 1/300 of an inch).
Declaration
public @Nullable Float getDefaultTabSize()
Returns
| Type | Description |
|---|---|
The default tab size. |
getEnableEastAsianLineBreaks() Method
Enables or disables East Asian line breaks for the paragraph.
Declaration
public @Nullable Boolean getEnableEastAsianLineBreaks()
Returns
| Type | Description |
|---|---|
Indicates whether East Asian line breaks are enabled. |
getEnableHangingPunctuation() Method
Enables or disables hanging punctuation for the paragraph.
Declaration
public @Nullable Boolean getEnableHangingPunctuation()
Returns
| Type | Description |
|---|---|
Indicates whether hanging punctuation is enabled. |
getEnableLatinLineBreaks() Method
Enables or disables Latin line breaks for the paragraph.
Declaration
public @Nullable Boolean getEnableLatinLineBreaks()
Returns
| Type | Description |
|---|---|
|
getFontAlignment() Method
Returns vertical text alignment within the line (for example, baseline or center).
Declaration
public @Nullable FontAlignmentType getFontAlignment()
Returns
| Type | Description |
|---|---|
| FontAlignmentType | The font alignment. |
getLeftIndent() Method
Returns the left indent of the paragraph (in the Document measurement units. 1 Document unit equals 1/300 of an inch).
Declaration
public @Nullable Float getLeftIndent()
Returns
| Type | Description |
|---|---|
The left indent. |
getLineSpacing() Method
Returns the line spacing for the paragraph (in the Document measurement units. 1 Document unit equals 1/300 of an inch).
Declaration
public TextSpacing getLineSpacing()
Returns
| Type | Description |
|---|---|
| TextSpacing | The line spacing for the paragraph. |
getListBullet() Method
Returns the bullet formatting for the paragraph.
Declaration
public ListBullet getListBullet()
Returns
| Type | Description |
|---|---|
| ListBullet | The bullet formatting for the paragraph. |
getListBulletColor() Method
Returns the bullet color for the paragraph.
Declaration
public TextBulletColor getListBulletColor()
Returns
| Type | Description |
|---|---|
| TextBulletColor | The bullet color for the paragraph. |
getListBulletFont() Method
Returns the font used to display bullets for the paragraph.
Declaration
public TextBulletFont getListBulletFont()
Returns
| Type | Description |
|---|---|
| TextBulletFont | The bullet font for the paragraph. |
getListBulletSize() Method
Returns the bullet size for the paragraph.
Declaration
public TextBulletSize getListBulletSize()
Returns
| Type | Description |
|---|---|
| TextBulletSize | The bullet size for the paragraph. |
getListIndentLevel() Method
Returns the indent level for the paragraph in a list.
Declaration
public @Nullable Integer getListIndentLevel()
Returns
| Type | Description |
|---|---|
The list indent level. |
getRightIndent() Method
Returns the right indent for the paragraph.
Declaration
public @Nullable Float getRightIndent()
Returns
| Type | Description |
|---|---|
The right indent. |
getRightToLeft() Method
Indicates whether the paragraph is displayed from right to left.
Declaration
public @Nullable Boolean getRightToLeft()
Returns
| Type | Description |
|---|---|
|
getSpacingAfter() Method
Returns the spacing after the paragraph.
Declaration
public TextSpacing getSpacingAfter()
Returns
| Type | Description |
|---|---|
| TextSpacing | The spacing after the paragraph. |
getSpacingBefore() Method
Returns the spacing before the paragraph.
Declaration
public TextSpacing getSpacingBefore()
Returns
| Type | Description |
|---|---|
| TextSpacing | The spacing before the paragraph. |
getSpecialIndent() Method
Returns the first-line indent for the paragraph.
Declaration
public @Nullable Float getSpecialIndent()
Returns
| Type | Description |
|---|---|
The special indent. |
getTabStops() Method
Returns a collection of tab stops for the paragraph.
Declaration
public ITextTabStopCollection getTabStops()
Returns
| Type | Description |
|---|---|
| com.devexpress.docs.office.ITextTabStopCollection | The collection of tab stops for the paragraph. |
getTextProperties() Method
Returns the text properties for the paragraph.
Declaration
public TextProperties getTextProperties()
Returns
| Type | Description |
|---|---|
| TextProperties | The text properties for the paragraph. |
setAlignment(@Nullable TextParagraphAlignment value) Method
Sets the paragraph alignment.
Declaration
public void setAlignment(@Nullable TextParagraphAlignment value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextParagraphAlignment | The paragraph alignment. |
setDefaultTabSize(@Nullable Float value) Method
Sets the default tab size.
Declaration
public void setDefaultTabSize(@Nullable Float value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | The default tab size. |
setEnableEastAsianLineBreaks(@Nullable Boolean value) Method
Sets whether East Asian line breaks are enabled.
Declaration
public void setEnableEastAsianLineBreaks(@Nullable Boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value |
|
setEnableHangingPunctuation(@Nullable Boolean value) Method
Sets whether hanging punctuation is enabled.
Declaration
public void setEnableHangingPunctuation(@Nullable Boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value |
|
setEnableLatinLineBreaks(@Nullable Boolean value) Method
Sets whether Latin line breaks are enabled.
Declaration
public void setEnableLatinLineBreaks(@Nullable Boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value |
|
setFontAlignment(@Nullable FontAlignmentType value) Method
Sets the font alignment.
Declaration
public void setFontAlignment(@Nullable FontAlignmentType value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | FontAlignmentType | The font alignment. |
setLeftIndent(@Nullable Float value) Method
Sets the left indent.
Declaration
public void setLeftIndent(@Nullable Float value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | The left indent. |
setLineSpacing(TextSpacing value) Method
Sets the line spacing for the paragraph (in the Document measurement units. 1 Document unit equals 1/300 of an inch).
Declaration
public void setLineSpacing(TextSpacing value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextSpacing | The line spacing for the paragraph. |
setListBullet(ListBullet value) Method
Sets the bullet formatting for the paragraph.
Declaration
public void setListBullet(ListBullet value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | ListBullet | The bullet formatting for the paragraph. |
setListBulletColor(TextBulletColor value) Method
Sets the bullet color for the paragraph.
Declaration
public void setListBulletColor(TextBulletColor value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextBulletColor | The bullet color for the paragraph. |
setListBulletFont(TextBulletFont value) Method
Sets the font used to display bullets for the paragraph.
Declaration
public void setListBulletFont(TextBulletFont value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextBulletFont | The bullet font for the paragraph. |
setListBulletSize(TextBulletSize value) Method
Sets the bullet size for the paragraph.
Declaration
public void setListBulletSize(TextBulletSize value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextBulletSize | The bullet size for the paragraph. |
setListIndentLevel(@Nullable Integer value) Method
Sets the list indent level.
Declaration
public void setListIndentLevel(@Nullable Integer value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | The list indent level. |
setRightIndent(@Nullable Float value) Method
Sets the right indent.
Declaration
public void setRightIndent(@Nullable Float value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | The right indent. |
setRightToLeft(@Nullable Boolean value) Method
Sets whether right-to-left paragraph layout is enabled.
Declaration
public void setRightToLeft(@Nullable Boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value |
|
setSpacingAfter(TextSpacing value) Method
Sets the spacing after the paragraph.
Declaration
public void setSpacingAfter(TextSpacing value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextSpacing | The spacing after the paragraph. |
setSpacingBefore(TextSpacing value) Method
Sets the spacing before the paragraph.
Declaration
public void setSpacingBefore(TextSpacing value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextSpacing | The spacing before the paragraph. |
setSpecialIndent(@Nullable Float value) Method
Sets the special indent.
Declaration
public void setSpecialIndent(@Nullable Float value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | The special indent. |
setTextProperties(TextProperties value) Method
Sets the text properties for the paragraph.
Declaration
public void setTextProperties(TextProperties value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextProperties | The text properties for the paragraph. |