table-ag凯发旗舰厅



com.spire.doc
class table

java.lang.object
  extended by com.spire.doc.ownerholder
      extended by com.spire.doc.documents.xml.documentserializable
          extended by com.spire.doc.documentobject
              extended by com.spire.doc.documentbase
                  extended by com.spire.doc.bodyregion
                      extended by com.spire.doc.table
all implemented interfaces:
ibodyregion, icompositeobject, idocumentobject, itable

public class table
extends bodyregion
implements itable

constructor summary
table(idocument doc)
          initializes a new instance of the table class.
table(idocument doc, boolean showborder)
          initializes a new instance of the table class.
table(idocument doc, boolean showborder, float linewidth)
          initializes a new instance of the table class.
 
method summary
 iparagraph addcaption(java.lang.string name, captionnumberingformat format, captionposition captionposition)
          add caption for current table
 tablerow addrow()
          adds a row to table
 tablerow addrow(boolean iscopyformat)
          adds new row to table.
 tablerow addrow(boolean iscopyformat, boolean autopopulatecells)
          adds a row to table with copy format option
 tablerow addrow(boolean iscopyformat, int columnsnum)
          adds a row to table with copy format option
 tablerow addrow(int columnsnum)
          adds a row to table with copy format from the current last row, and then add columnsnum cells to the new row.
 void applyhorizontalmerge(int rowindex, int startcellindex, int endcellindex)
          applies horizontal merging for cells of table row.
 void applystyle(defaulttablestyle builtintablestyle)
          applies the built-in table style.
 void applytablestyle()
          applies the table style properties to table and cell.
 void applyverticalmerge(int columnindex, int startrowindex, int endrowindex)
          applies the vertical merge for table cells.
 void autofit(autofitbehaviortype behavior)
          determines how microsoft word resizes a table when the autofit feature is used.
 table deepclone()
          clones this instance.
 textselection find(java.util.regex.pattern pattern)
          finds text by specified pattern.
 tablecell get(int row, int column)
          get table cell by row and column indexes.
 documentobjectcollection getchildobjects()
          gets the child entities.
 float[] getcolumnwidth()
          gets the width of each column.
 int getdefaultcolumnsnumber()
          gets the default column count of per row.
 float getdefaultcolumnwidth()
          gets the default width of each column.
 float getdefaultrowheight()
          gets the default row height, the unit of measure is point, 1point = 0.3528 mm
 documentobjecttype getdocumentobjecttype()
          gets the type of the document object.
 tablerow getfirstrow()
          get first row of the table.
 float getindentfromleft()
          gets indent from left for the table.
 tablecell getlastcell()
          get last cell of the table
 tablerow getlastrow()
          get last row of the table.
 preferredwidth getpreferredwidth()
          this property specifies the preferred horizontal width of a table.
 rowcollection getrows()
          get the table rows
 java.lang.string gettabledescription()
          gets the table description.
 rowformat gettableformat()
          gets the table formatting after resetcells call.
 java.lang.string gettablestylename()
          gets table style name.
 java.lang.string gettitle()
          gets the table title.
 float getwidth()
          gets the table width
 void removeabsposition()
          removes the absolute position data.
 int replace(java.util.regex.pattern pattern, java.lang.string replace)
          replaces all entries of matchstring regular expression with newvalue string.
 int replace(java.util.regex.pattern pattern, textselection textselection)
          replaces by specified pattern.
 int replace(java.util.regex.pattern pattern, textselection textselection, boolean saveformatting)
          replaces by specified pattern.
 int replace(java.lang.string given, java.lang.string replace, boolean casesensitive, boolean wholeword)
          replaces by specified matchstring string.
 void resetcells(int rowsnum, int columnsnum)
          resets rows / columns numbers.
 void resetcells(int rowsnum, int columnsnum, rowformat format, float cellwidth)
          resets rows / columns numbers.
 void setcolumnwidth(float[] value)
          sets the width of each column.
 void setdefaultcolumnsnumber(int value)
          sets the default column count of per row.
 void setdefaultcolumnwidth(float value)
          sets the default width of each column.
 void setdefaultrowheight(float value)
          sets the default row height, the unit of measure is point, 1point = 0.3528 mm
 void setindentfromleft(float value)
          sets indent from left for the table.
 void setpreferredwidth(preferredwidth value)
          this property specifies the preferred horizontal width of a table.
 void settabledescription(java.lang.string value)
          sets the table description.
 void settitle(java.lang.string value)
          sets the table title.
 
methods inherited from class com.spire.doc.bodyregion
isdeleterevision, isinsertrevision, ownertextbody
 
methods inherited from class com.spire.doc.documentobject
getfirstchild, getlastchild, getnextsibling, getowner, getprevioussibling, iscomposite, tostring
 
methods inherited from class com.spire.doc.ownerholder
getdocument
 
methods inherited from interface com.spire.doc.interfaces.idocumentobject
getdocument, getnextsibling, getowner, getprevioussibling, iscomposite
 
constructor detail

table

public table(idocument doc)
initializes a new instance of the table class.
parameters:
doc - the doc.

table

public table(idocument doc,
             boolean showborder)
initializes a new instance of the table class.
parameters:
doc - the doc.
showborder - if it specifies to show the table border,set to true

table

public table(idocument doc,
             boolean showborder,
             float linewidth)
initializes a new instance of the table class.
parameters:
doc - the doc
showborder - the showborder
linewidth - the linewidth
method detail

getdefaultrowheight

public float getdefaultrowheight()
gets the default row height, the unit of measure is point, 1point = 0.3528 mm
returns:
float

setdefaultrowheight

public void setdefaultrowheight(float value)
sets the default row height, the unit of measure is point, 1point = 0.3528 mm
parameters:
value - float

getdefaultcolumnsnumber

public int getdefaultcolumnsnumber()
gets the default column count of per row.
returns:
the count of columns

setdefaultcolumnsnumber

public void setdefaultcolumnsnumber(int value)
sets the default column count of per row.

getdefaultcolumnwidth

public float getdefaultcolumnwidth()
gets the default width of each column.
returns:
the width of column

setdefaultcolumnwidth

public void setdefaultcolumnwidth(float value)
sets the default width of each column.
parameters:
value - float

autofit

public void autofit(autofitbehaviortype behavior)
determines how microsoft word resizes a table when the autofit feature is used.
parameters:
behavior - how word resizes the specified table with the autofit feature is used.

getcolumnwidth

public float[] getcolumnwidth()
gets the width of each column.
returns:
float[]

setcolumnwidth

public void setcolumnwidth(float[] value)
sets the width of each column.
parameters:
value - float[]

getdocumentobjecttype

public documentobjecttype getdocumentobjecttype()
gets the type of the document object.
specified by:
getdocumentobjecttype in interface idocumentobject
specified by:
getdocumentobjecttype in class documentobject
returns:
documentobjecttype

getrows

public rowcollection getrows()
get the table rows
specified by:
getrows in interface itable
returns:
rowcollection

gettableformat

public rowformat gettableformat()
gets the table formatting after resetcells call.
specified by:
gettableformat in interface itable
returns:
the table format.

getpreferredwidth

public preferredwidth getpreferredwidth()
this property specifies the preferred horizontal width of a table.
returns:
this property specifies the preferred horizontal width of a table.

setpreferredwidth

public void setpreferredwidth(preferredwidth value)
this property specifies the preferred horizontal width of a table.
parameters:
value - this property specifies the preferred horizontal width of a table.

gettablestylename

public java.lang.string gettablestylename()
gets table style name.
returns:
string

getlastcell

public tablecell getlastcell()
get last cell of the table
specified by:
getlastcell in interface itable
returns:
last cell of the table

getfirstrow

public tablerow getfirstrow()
get first row of the table.
specified by:
getfirstrow in interface itable
returns:
tablerow

getlastrow

public tablerow getlastrow()
get last row of the table.
specified by:
getlastrow in interface itable
returns:
tablerow

get

public tablecell get(int row,
                     int column)
get table cell by row and column indexes.
specified by:
get in interface itable
parameters:
row - row
column - column
returns:
tablecell

getwidth

public float getwidth()
gets the table width
specified by:
getwidth in interface itable
returns:
the width of the table

getchildobjects

public documentobjectcollection getchildobjects()
gets the child entities.
specified by:
getchildobjects in interface icompositeobject
specified by:
getchildobjects in class documentobject
returns:
the child entities.

getindentfromleft

public float getindentfromleft()
gets indent from left for the table.
specified by:
getindentfromleft in interface itable
returns:
indent from left for the table.

setindentfromleft

public void setindentfromleft(float value)
sets indent from left for the table.
specified by:
setindentfromleft in interface itable
parameters:
value - indent from left for the table.

gettitle

public java.lang.string gettitle()
gets the table title.
returns:
the title.

settitle

public void settitle(java.lang.string value)
sets the table title.
parameters:
value - the title.

gettabledescription

public java.lang.string gettabledescription()
gets the table description.
returns:
string

settabledescription

public void settabledescription(java.lang.string value)
sets the table description.
parameters:
value - string

addcaption

public iparagraph addcaption(java.lang.string name,
                             captionnumberingformat format,
                             captionposition captionposition)
add caption for current table
parameters:
name - captionposition
format - name
captionposition - format
returns:
iparagraph

deepclone

public table deepclone()
clones this instance.
specified by:
deepclone in interface idocumentobject
overrides:
deepclone in class documentobject
returns:
table

resetcells

public void resetcells(int rowsnum,
                       int columnsnum)
resets rows / columns numbers.
specified by:
resetcells in interface itable
parameters:
rowsnum - the rows number.
columnsnum - the columns number.

resetcells

public void resetcells(int rowsnum,
                       int columnsnum,
                       rowformat format,
                       float cellwidth)
resets rows / columns numbers.
specified by:
resetcells in interface itable
parameters:
rowsnum - the rows num.
columnsnum - the columns num.
format - the format.
cellwidth - width of the cell.

applystyle

public void applystyle(defaulttablestyle builtintablestyle)
applies the built-in table style.
parameters:
builtintablestyle - the built-in table style.

applytablestyle

public void applytablestyle()
applies the table style properties to table and cell.

addrow

public tablerow addrow()
adds a row to table
specified by:
addrow in interface itable
returns:
tablerow

addrow

public tablerow addrow(int columnsnum)
adds a row to table with copy format from the current last row, and then add columnsnum cells to the new row.
parameters:
columnsnum - the number of the count of the new row, it's must be -1 < columnsnum < 64.
returns:
tablerow

addrow

public tablerow addrow(boolean iscopyformat)
adds new row to table.
specified by:
addrow in interface itable
parameters:
iscopyformat - boolean
returns:
tablerow

addrow

public tablerow addrow(boolean iscopyformat,
                       boolean autopopulatecells)
adds a row to table with copy format option
specified by:
addrow in interface itable
parameters:
iscopyformat - indicates whether copy format from previous row or not
autopopulatecells - if it specifies auto populate cells, set to true.
returns:
tablerow

addrow

public tablerow addrow(boolean iscopyformat,
                       int columnsnum)
adds a row to table with copy format option
parameters:
iscopyformat - indicates whether copy format from previous row or not
columnsnum - the number of the count of the new row, it's must be -1 < columnsnum < 64.
returns:
the row

replace

public int replace(java.util.regex.pattern pattern,
                   java.lang.string replace)
replaces all entries of matchstring regular expression with newvalue string.
specified by:
replace in interface ibodyregion
specified by:
replace in class bodyregion
parameters:
pattern - pattern
replace - replace text
returns:
int

replace

public int replace(java.lang.string given,
                   java.lang.string replace,
                   boolean casesensitive,
                   boolean wholeword)
replaces by specified matchstring string.
specified by:
replace in interface ibodyregion
specified by:
replace in class bodyregion
parameters:
given - the matchstring.
replace - the newvalue.
casesensitive - if it specifies case sensitive, set to true
wholeword - if it specifies to search a whole word,set to true
returns:
int

replace

public int replace(java.util.regex.pattern pattern,
                   textselection textselection)
replaces by specified pattern.
specified by:
replace in interface ibodyregion
specified by:
replace in class bodyregion
parameters:
pattern - the pattern.
textselection - the text selection.
returns:
int

replace

public int replace(java.util.regex.pattern pattern,
                   textselection textselection,
                   boolean saveformatting)
replaces by specified pattern.
specified by:
replace in class bodyregion
parameters:
pattern - the pattern.
textselection - the text selection.
saveformatting - if save source formatting, set to true
returns:
int

find

public textselection find(java.util.regex.pattern pattern)
finds text by specified pattern.
specified by:
find in class bodyregion
parameters:
pattern - the pattern.
returns:
textselection

applyverticalmerge

public void applyverticalmerge(int columnindex,
                               int startrowindex,
                               int endrowindex)
applies the vertical merge for table cells.
specified by:
applyverticalmerge in interface itable
parameters:
columnindex - index of the column.
startrowindex - start index of the row.
endrowindex - end index of the row.

applyhorizontalmerge

public void applyhorizontalmerge(int rowindex,
                                 int startcellindex,
                                 int endcellindex)
applies horizontal merging for cells of table row.
specified by:
applyhorizontalmerge in interface itable
parameters:
rowindex - index of the row.
startcellindex - start index of the cell.
endcellindex - end index of the cell.

removeabsposition

public void removeabsposition()
removes the absolute position data. if table has absolute position in the document, all position data will be erased.
specified by:
removeabsposition in interface itable


网站地图