Skip to main content

TextStyle Class

Contains text style settings.

Declaration

public class TextStyle extends OfficeObject

Remarks

The following code snippet creates a text style with custom default paragraph properties and applies it to the title and body text styles of a slide master:

import com.devexpress.docs.office.*;

// Create default paragraph properties for a text style.
TextParagraphProperties paragraphProperties = new TextParagraphProperties();

// Set default alignment for paragraphs (Level 1).
paragraphProperties.setAlignment(TextParagraphAlignment.RIGHT);

// Create a text style based on the paragraph properties.
TextStyle textStyle = new TextStyle(paragraphProperties);

// Apply the same paragraph properties to level 1 text.
textStyle.setLevel1ParagraphProperties(paragraphProperties);

// Access the first slide master in the presentation.
SlideMaster slideMaster = presentation.getSlideMasters().get(0);

// Apply the text style to title placeholders in the slide master.
slideMaster.setTitleTextStyle(textStyle);

// Apply the text style to body placeholders in the slide master.
slideMaster.setBodyTextStyle(textStyle);

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject
OfficeObject
TextStyle

Constructors

TextStyle() Constructor

Initializes a new instance of the TextStyle class.

Declaration

public TextStyle()

TextStyle(TextParagraphProperties paragraphProperties, TextParagraphProperties[] listLevelStyles) Constructor

Initializes a new instance of the TextStyle class with specified settings.

Declaration

public TextStyle(TextParagraphProperties paragraphProperties, TextParagraphProperties[] listLevelStyles)

Parameters

Name Type Description
paragraphProperties TextParagraphProperties

The default paragraph properties.

listLevelStyles TextParagraphProperties[]

Paragraph properties for each list level (1-9).

TextStyle(TextParagraphProperties paragraphProperties) Constructor

Initializes a new instance of the TextStyle class with specified settings.

Declaration

public TextStyle(TextParagraphProperties paragraphProperties)

Parameters

Name Type Description
paragraphProperties TextParagraphProperties

The default paragraph properties.

Methods

deepClone() Method

Returns a deep copy of this TextStyle instance.

Declaration

public TextStyle deepClone()

Returns

Type Description
TextStyle

A deep copy of this TextStyle.

getLevel1ParagraphProperties() Method

Returns the paragraph properties for level 1.

Declaration

public TextParagraphProperties getLevel1ParagraphProperties()

Returns

Type Description
TextParagraphProperties

Paragraph properties for level 1.

Remarks

For more information, refer to the following section: Specify Paragraph Indent Level.

getLevel2ParagraphProperties() Method

Returns the paragraph properties for level 2.

Declaration

public TextParagraphProperties getLevel2ParagraphProperties()

Returns

Type Description
TextParagraphProperties

Paragraph properties for level 2.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

getLevel3ParagraphProperties() Method

Returns the paragraph properties for level 3.

Declaration

public TextParagraphProperties getLevel3ParagraphProperties()

Returns

Type Description
TextParagraphProperties

Paragraph properties for level 3.

Remarks

For more information, refer to the following section: Specify Paragraph Indent Level.

getLevel4ParagraphProperties() Method

Returns the paragraph properties for level 4.

Declaration

public TextParagraphProperties getLevel4ParagraphProperties()

Returns

Type Description
TextParagraphProperties

Paragraph properties for level 4.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

getLevel5ParagraphProperties() Method

Returns the paragraph properties for level 5.

Declaration

public TextParagraphProperties getLevel5ParagraphProperties()

Returns

Type Description
TextParagraphProperties

Paragraph properties for level 5.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

getLevel6ParagraphProperties() Method

Returns the paragraph properties for level 6.

Declaration

public TextParagraphProperties getLevel6ParagraphProperties()

Returns

Type Description
TextParagraphProperties

Paragraph properties for level 6.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

getLevel7ParagraphProperties() Method

Returns the paragraph properties for level 7.

Declaration

public TextParagraphProperties getLevel7ParagraphProperties()

Returns

Type Description
TextParagraphProperties

Paragraph properties for level 7.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

getLevel8ParagraphProperties() Method

Returns the paragraph properties for level 8.

Declaration

public TextParagraphProperties getLevel8ParagraphProperties()

Returns

Type Description
TextParagraphProperties

Paragraph properties for level 8.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

getLevel9ParagraphProperties() Method

Returns the paragraph properties for level 9.

Declaration

public TextParagraphProperties getLevel9ParagraphProperties()

Returns

Type Description
TextParagraphProperties

Paragraph properties for level 9.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

getParagraphProperties() Method

Returns default paragraph properties.

Declaration

public TextParagraphProperties getParagraphProperties()

Returns

Type Description
TextParagraphProperties

Default paragraph properties.

setLevel1ParagraphProperties(TextParagraphProperties value) Method

Sets the paragraph properties for level 1.

Declaration

public void setLevel1ParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

Paragraph properties for level 1.

Remarks

For more information, refer to the following section: Specify Paragraph Indent Level.

setLevel2ParagraphProperties(TextParagraphProperties value) Method

Sets the paragraph properties for level 2.

Declaration

public void setLevel2ParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

The paragraph properties for level 2.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

setLevel3ParagraphProperties(TextParagraphProperties value) Method

Sets the paragraph properties for level 3.

Declaration

public void setLevel3ParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

Paragraph properties for level 3.

Remarks

For more information, refer to the following section: Specify Paragraph Indent Level.

setLevel4ParagraphProperties(TextParagraphProperties value) Method

Sets the paragraph properties for level 4.

Declaration

public void setLevel4ParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

The paragraph properties for level 4.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

setLevel5ParagraphProperties(TextParagraphProperties value) Method

Sets the paragraph properties for level 5.

Declaration

public void setLevel5ParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

Paragraph properties for level 5.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

setLevel6ParagraphProperties(TextParagraphProperties value) Method

Sets the paragraph properties for level 6.

Declaration

public void setLevel6ParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

The paragraph properties for level 6.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

setLevel7ParagraphProperties(TextParagraphProperties value) Method

Sets the paragraph properties for level 7.

Declaration

public void setLevel7ParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

The paragraph properties for level 7.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

setLevel8ParagraphProperties(TextParagraphProperties value) Method

Sets the paragraph properties for level 8.

Declaration

public void setLevel8ParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

The paragraph properties for level 8.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

setLevel9ParagraphProperties(TextParagraphProperties value) Method

Sets the paragraph properties for level 9.

Declaration

public void setLevel9ParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

The paragraph properties for level 9.

Remarks

For additional information, refer to the following section: Specify Paragraph Indent Level.

setParagraphProperties(TextParagraphProperties value) Method

Sets the default paragraph properties.

Declaration

public void setParagraphProperties(TextParagraphProperties value)

Parameters

Name Type Description
value TextParagraphProperties

The default paragraph properties.