Style
Overview
Style is a class in Aspose.Words FOSS for Java.
Inherits from: IParaAttrSource, IRunAttrSource, Cloneable.
Represents a single built-in or user-defined style.
Edition status of its 53 listed members (a property and its accessor methods are listed separately, overloads once): 53 not yet exercised by a verified example.
This class declares 33 methods for Style objects in Java programs.
Available methods include: equals, getAliases, getAutomaticallyUpdate, getBaseStyleName, getBuiltIn, getDocument, getFont, getLinkedStyleName, getList, getListFormat, getLocked, getName, and 20 additional methods.
Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.
Properties: aliases, automaticallyUpdate, baseStyleName, builtIn, document, font, and 15 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
name | String | Read/Write | Gets or sets the name of the style. |
styleIdentifier | int | Read | Gets the locale independent style identifier for a built-in style. |
aliases | String[] | Read | Gets the aliases. |
heading | boolean | Read | True when the style is one of the built-in Heading styles. |
type | int | Read | Gets the type. |
document | DocumentBase | Read | Gets the owner document. |
linkedStyleName | String | Read/Write | Gets/sets the name of the Style linked to this one. |
baseStyleName | String | Read/Write | Gets/sets the name of the style this style is based on. |
nextParagraphStyleName | String | Read/Write | Gets/sets the name of the style to be applied automatically to a new paragraph inserted after a paragraph formatted with the specified style. |
builtIn | boolean | Read | True if this style is one of the built-in styles in MS Word. |
font | Font | Read | Gets the character formatting of the style. |
paragraphFormat | ParagraphFormat | Read | Gets the paragraph formatting of the style. |
semiHidden | boolean | Read/Write | Gets/sets whether the style hides from the Styles gallery and from the Styles task pane. |
unhideWhenUsed | boolean | Read/Write | Gets/sets whether the style used in the current document unhides from the Styles gallery and from the Styles task pane. |
priority | int | Read/Write | Gets/sets the integer value that represents the priority for sorting the styles in the Styles task pane. |
list | List | Read | Gets the list that defines formatting of this list style. |
listFormat | ListFormat | Read | Provides access to the list formatting properties of a paragraph style. |
quickStyle | boolean | Read/Write | Specifies whether this style is shown in the Quick Style gallery inside MS Word UI. |
automaticallyUpdate | boolean | Read/Write | Specifies whether this style is automatically redefined based on the appropriate value. |
locked | boolean | Read/Write | Specifies whether this style is locked. |
styles | StyleCollection | Read | Gets the collection of styles this style belongs to. |
Methods
| Signature | Description |
|---|---|
getName() → String | Gets or sets the name of the style. |
setName(value: String) | Sets the name value. |
getStyleIdentifier() → int | Gets the locale independent style identifier for a built-in style. |
getAliases() → String[] | Returns the aliases. |
isHeading() → boolean | True when the style is one of the built-in Heading styles. |
getType() → int | Returns the type. |
getDocument() → DocumentBase | Gets the owner document. |
getLinkedStyleName() → String | Gets/sets the name of the Style linked to this one. |
setLinkedStyleName(value: String) | Sets the linked style name value. |
getBaseStyleName() → String | Gets/sets the name of the style this style is based on. |
setBaseStyleName(value: String) | Sets the base style name value. |
getNextParagraphStyleName() → String | Gets/sets the name of the style to be applied automatically to a new paragraph inserted after a paragraph formatted with the specified style. |
setNextParagraphStyleName(value: String) | Sets the next paragraph style name value. |
getBuiltIn() → boolean | True if this style is one of the built-in styles in MS Word. |
getFont() → Font | Gets the character formatting of the style. |
getParagraphFormat() → ParagraphFormat | Gets the paragraph formatting of the style. |
getSemiHidden() → boolean | Gets/sets whether the style hides from the Styles gallery and from the Styles task pane. |
setSemiHidden(value: boolean) | Sets the semi hidden value. |
getUnhideWhenUsed() → boolean | Gets/sets whether the style used in the current document unhides from the Styles gallery and from the Styles task pane. |
setUnhideWhenUsed(value: boolean) | Sets the unhide when used value. |
getPriority() → int | Gets/sets the integer value that represents the priority for sorting the styles in the Styles task pane. |
setPriority(value: int) | Sets the priority value. |
getList() → List | Gets the list that defines formatting of this list style. |
getListFormat() → ListFormat | Provides access to the list formatting properties of a paragraph style. |
isQuickStyle() → boolean | Specifies whether this style is shown in the Quick Style gallery inside MS Word UI. |
isQuickStyle(value: boolean) | Calls isQuickStyle(value) on this Style instance. |
getAutomaticallyUpdate() → boolean | Specifies whether this style is automatically redefined based on the appropriate value. |
setAutomaticallyUpdate(value: boolean) | Sets the automatically update value. |
getLocked() → boolean | Specifies whether this style is locked. |
setLocked(value: boolean) | Sets the locked value. |
getStyles() → StyleCollection | Gets the collection of styles this style belongs to. |
remove() | Removes the specified style from the document. |
equals(style: Style) → boolean | Compares with the specified style. |