irunattrsource-ag凯发旗舰厅



com.spire.doc.documents
interface irunattrsource

all known implementing classes:
bookmarkend, bookmarkstart, break, checkboxformfield, comment, commentmark, controlfield, docoleobject, docpicture, dropdownformfield, field, fieldmark, footnote, formfield, iffield, liststyle, mergefield, officemath, paragraph, paragraphbase, paragraphstyle, permissionend, permissionstart, picturewatermark, sequencefield, shapebase, shapegroup, shapeobject, structuredocumenttaginline, style, symbol, tableofcontent, textbox, textformfield, textrange, textwatermark, watermarkbase

public interface irunattrsource

the description here applies to all ixxxattrsource interfaces. in our model, different objects, for example style and paragraph, can both have paragraph formatting and it is exposed as paragraphformat to the public. the problem is that paragraph formatting on style and paragraph is resolved differently. for example, when getting an attribute from a style, it needs to look in the attributes of the style and then navigate through the based-on styles. when getting and attribute from a paragraph, need to look for direct formatting, then get the style of the paragraph and look for the attribute in the style. it is the purpose of ixxxattrsource interfaces to solve this problem and allow single paragraphformat to expose paragraph attributes to the public, yet allow variation in attribute resolution depending on what object paragraphformat is obtained from.


method summary
 void clearrunattrs()
          clears run attributes.
 java.lang.object fetchinheritedrunattr(int key)
          gets the attribute from one of the parents or from global defaults.
 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.
 void setrunattr(int key, java.lang.object value)
          sets run attribute.
 
method detail

getdirectrunattr

java.lang.object getdirectrunattr(int key)
gets the attribute specified directly on the source or null by the key.
parameters:
key - key
returns:
object

getdirectrunattrscount

int getdirectrunattrscount()
count of attribute records in direct formatting.
returns:
int

getdirectrunattrbyindex

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

fetchinheritedrunattr

java.lang.object fetchinheritedrunattr(int key)
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.
parameters:
key - key
returns:
object

setrunattr

void setrunattr(int key,
                java.lang.object value)
sets run attribute.
parameters:
key - key
value - object

clearrunattrs

void clearrunattrs()
clears run attributes.


网站地图