style-ag凯发旗舰厅



com.spire.doc.documents
class style

java.lang.object
  extended by com.spire.doc.ownerholder
      extended by com.spire.doc.documents.xml.documentserializable
          extended by com.spire.doc.documents.style
all implemented interfaces:
irunattrsource, istyle
direct known subclasses:
liststyle, paragraphstyle

public abstract class style
extends documentserializable
implements istyle, irunattrsource

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

style

protected style(document doc)
initializes a new instance of the style class.
parameters:
doc - the doc.
method detail

getcharacterformat

public characterformat getcharacterformat()
gets the character format.
returns:
the character format.

getname

public java.lang.string getname()
returns or setsstyle name.
specified by:
getname in interface istyle
returns:
string

setname

public void setname(java.lang.string value)
description copied from interface: istyle
sets the style name.
specified by:
setname in interface istyle
parameters:
value - string

getstyleid

public java.lang.string getstyleid()
gets the style id.
specified by:
getstyleid in interface istyle
returns:
string

getstyletype

public abstract styletype getstyletype()
gets the type of the style.
specified by:
getstyletype in interface istyle
returns:
the type of the style.

getdefaultstyletype

public builtinstyle getdefaultstyletype()
built-in word style.
returns:
the built in style identifier

iscustomstyle

public boolean iscustomstyle()
gets a value indicating whether this instance is custom style.
returns:
boolean

iscustomstyle

public void iscustomstyle(boolean value)
sets a value indicating whether this instance is custom style.
parameters:
value - if this instance is custom, set to true

applybasestyle

public void applybasestyle(java.lang.string stylename)
apply base style for current style.
parameters:
stylename - stylename

applybasestyle

public void applybasestyle(builtinstyle bstyle)
applies the base style
parameters:
bstyle - the built-in style.

deepclone

public abstract istyle deepclone()
clones itself
specified by:
deepclone in interface istyle
returns:
istyle

createbuiltinstyle

public static style createbuiltinstyle(builtinstyle bstyle,
                                       document doc)
creates the built-in paragraph style.
parameters:
bstyle - the built in style
doc - the document.
returns:
style

createbuiltinstyle

public static istyle createbuiltinstyle(builtinstyle bstyle,
                                        styletype type,
                                        document doc)
creates the built-in style.
parameters:
bstyle - the built-in style
type - the type
doc - the document
returns:
istyle

nametobuiltin

public static builtinstyle nametobuiltin(java.lang.string stylename)
converts string style names to builtinstyle.
parameters:
stylename - name of the style.
returns:
builtinstyle

getdirectrunattr

public java.lang.object getdirectrunattr(int key)
description copied from interface: irunattrsource
gets the attribute specified directly on the source or null by the key.
specified by:
getdirectrunattr in interface irunattrsource
parameters:
key - key
returns:
object

getdirectrunattrscount

public int getdirectrunattrscount()
description copied from interface: irunattrsource
count of attribute records in direct formatting.
specified by:
getdirectrunattrscount in interface irunattrsource
returns:
int

getdirectrunattrbyindex

public void getdirectrunattrbyindex(int index,
                                    int[] key,
                                    java.lang.object[] value)
description copied from interface: irunattrsource
gets the attribute specified directly on the source by the index. index should be in range [0 .. directrunattrscount - 1]
specified by:
getdirectrunattrbyindex in interface irunattrsource
parameters:
index - int
key - leys
value - objects

fetchinheritedrunattr

public java.lang.object fetchinheritedrunattr(int key)
description copied from interface: irunattrsource
gets the attribute from one of the parents or from global defaults. throws if the attribute is not defined anywhere. if the attribute needs resolution, it is returned resolved.
specified by:
fetchinheritedrunattr in interface irunattrsource
parameters:
key - key
returns:
object

setrunattr

public void setrunattr(int key,
                       java.lang.object value)
description copied from interface: irunattrsource
sets run attribute.
specified by:
setrunattr in interface irunattrsource
parameters:
key - key
value - object

clearrunattrs

public void clearrunattrs()
description copied from interface: irunattrsource
clears run attributes.
specified by:
clearrunattrs in interface irunattrsource


网站地图