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

NameTypeAccessDescription
nameStringRead/WriteGets or sets the name of the style.
styleIdentifierintReadGets the locale independent style identifier for a built-in style.
aliasesString[]ReadGets the aliases.
headingbooleanReadTrue when the style is one of the built-in Heading styles.
typeintReadGets the type.
documentDocumentBaseReadGets the owner document.
linkedStyleNameStringRead/WriteGets/sets the name of the Style linked to this one.
baseStyleNameStringRead/WriteGets/sets the name of the style this style is based on.
nextParagraphStyleNameStringRead/WriteGets/sets the name of the style to be applied automatically to a new paragraph inserted after a paragraph formatted with the specified style.
builtInbooleanReadTrue if this style is one of the built-in styles in MS Word.
fontFontReadGets the character formatting of the style.
paragraphFormatParagraphFormatReadGets the paragraph formatting of the style.
semiHiddenbooleanRead/WriteGets/sets whether the style hides from the Styles gallery and from the Styles task pane.
unhideWhenUsedbooleanRead/WriteGets/sets whether the style used in the current document unhides from the Styles gallery and from the Styles task pane.
priorityintRead/WriteGets/sets the integer value that represents the priority for sorting the styles in the Styles task pane.
listListReadGets the list that defines formatting of this list style.
listFormatListFormatReadProvides access to the list formatting properties of a paragraph style.
quickStylebooleanRead/WriteSpecifies whether this style is shown in the Quick Style gallery inside MS Word UI.
automaticallyUpdatebooleanRead/WriteSpecifies whether this style is automatically redefined based on the appropriate value.
lockedbooleanRead/WriteSpecifies whether this style is locked.
stylesStyleCollectionReadGets the collection of styles this style belongs to.

Methods

SignatureDescription
getName() → StringGets or sets the name of the style.
setName(value: String)Sets the name value.
getStyleIdentifier() → intGets the locale independent style identifier for a built-in style.
getAliases() → String[]Returns the aliases.
isHeading() → booleanTrue when the style is one of the built-in Heading styles.
getType() → intReturns the type.
getDocument() → DocumentBaseGets the owner document.
getLinkedStyleName() → StringGets/sets the name of the Style linked to this one.
setLinkedStyleName(value: String)Sets the linked style name value.
getBaseStyleName() → StringGets/sets the name of the style this style is based on.
setBaseStyleName(value: String)Sets the base style name value.
getNextParagraphStyleName() → StringGets/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() → booleanTrue if this style is one of the built-in styles in MS Word.
getFont() → FontGets the character formatting of the style.
getParagraphFormat() → ParagraphFormatGets the paragraph formatting of the style.
getSemiHidden() → booleanGets/sets whether the style hides from the Styles gallery and from the Styles task pane.
setSemiHidden(value: boolean)Sets the semi hidden value.
getUnhideWhenUsed() → booleanGets/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() → intGets/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() → ListGets the list that defines formatting of this list style.
getListFormat() → ListFormatProvides access to the list formatting properties of a paragraph style.
isQuickStyle() → booleanSpecifies 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() → booleanSpecifies whether this style is automatically redefined based on the appropriate value.
setAutomaticallyUpdate(value: boolean)Sets the automatically update value.
getLocked() → booleanSpecifies whether this style is locked.
setLocked(value: boolean)Sets the locked value.
getStyles() → StyleCollectionGets the collection of styles this style belongs to.
remove()Removes the specified style from the document.
equals(style: Style) → booleanCompares with the specified style.

See Also