|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.spire.doc.OwnerHolder
com.spire.doc.documents.xml.DocumentSerializable
com.spire.doc.documents.Style
public abstract class Style
Base class for paragraph and character styles.
Constructor Summary | |
---|---|
protected |
Style(Document doc)
Initializes a new instance of the Style class. |
Method Summary | |
---|---|
void |
applyBaseStyle(BuiltinStyle bStyle)
Applies the base style |
void |
applyBaseStyle(java.lang.String styleName)
Apply base style for current style. |
void |
clearRunAttrs()
Clears run attributes. |
static Style |
createBuiltinStyle(BuiltinStyle bStyle,
Document doc)
Creates the built-in paragraph style. |
static IStyle |
createBuiltinStyle(BuiltinStyle bStyle,
StyleType type,
Document doc)
Creates the built-in style. |
abstract IStyle |
deepClone()
Clones itself |
java.lang.Object |
fetchInheritedRunAttr(int key)
Gets the attribute from one of the parents or from global defaults. |
CharacterFormat |
getCharacterFormat()
Gets the character format. |
BuiltinStyle |
getDefaultStyleType()
Built-in Word style. |
java.lang.Object |
getDirectRunAttr(int key)
Gets the attribute specified directly on the source or null by the key. |
void |
getDirectRunAttrByIndex(int index,
int[] key,
java.lang.Object[] value)
Gets the attribute specified directly on the source by the index. |
int |
getDirectRunAttrsCount()
Count of attribute records in direct formatting. |
java.lang.String |
getName()
Returns or setsstyle name. |
java.lang.String |
getStyleId()
Gets the style id. |
abstract StyleType |
getStyleType()
Gets the type of the style. |
boolean |
isCustomStyle()
Gets a value indicating whether this instance is custom style. |
void |
isCustomStyle(boolean value)
Sets a value indicating whether this instance is custom style. |
static BuiltinStyle |
nameToBuiltIn(java.lang.String styleName)
Converts string style names to BuiltinStyle. |
void |
setName(java.lang.String value)
Sets the style name. |
void |
setRunAttr(int key,
java.lang.Object value)
Sets run attribute. |
Methods inherited from class com.spire.doc.OwnerHolder |
---|
getDocument |
Constructor Detail |
---|
protected Style(Document doc)
Style
class.
doc
- The doc.Method Detail |
---|
public CharacterFormat getCharacterFormat()
public java.lang.String getName()
getName
in interface IStyle
public void setName(java.lang.String value)
IStyle
setName
in interface IStyle
value
- Stringpublic java.lang.String getStyleId()
getStyleId
in interface IStyle
public abstract StyleType getStyleType()
getStyleType
in interface IStyle
public BuiltinStyle getDefaultStyleType()
public boolean isCustomStyle()
public void isCustomStyle(boolean value)
value
- if this instance is custom, set to truepublic void applyBaseStyle(java.lang.String styleName)
styleName
- styleNamepublic void applyBaseStyle(BuiltinStyle bStyle)
bStyle
- The built-in style.public abstract IStyle deepClone()
deepClone
in interface IStyle
public static Style createBuiltinStyle(BuiltinStyle bStyle, Document doc)
bStyle
- The built in styledoc
- The document.
public static IStyle createBuiltinStyle(BuiltinStyle bStyle, StyleType type, Document doc)
bStyle
- The built-in styletype
- The typedoc
- The document
public static BuiltinStyle nameToBuiltIn(java.lang.String styleName)
styleName
- Name of the style.
public java.lang.Object getDirectRunAttr(int key)
IRunAttrSource
getDirectRunAttr
in interface IRunAttrSource
key
- key
public int getDirectRunAttrsCount()
IRunAttrSource
getDirectRunAttrsCount
in interface IRunAttrSource
public void getDirectRunAttrByIndex(int index, int[] key, java.lang.Object[] value)
IRunAttrSource
getDirectRunAttrByIndex
in interface IRunAttrSource
index
- intkey
- leysvalue
- objectspublic java.lang.Object fetchInheritedRunAttr(int key)
IRunAttrSource
fetchInheritedRunAttr
in interface IRunAttrSource
key
- key
public void setRunAttr(int key, java.lang.Object value)
IRunAttrSource
setRunAttr
in interface IRunAttrSource
key
- keyvalue
- objectpublic void clearRunAttrs()
IRunAttrSource
clearRunAttrs
in interface IRunAttrSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |