|
|||||||||
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.DocumentObject
com.spire.doc.DocumentBase
com.spire.doc.BodyRegion
com.spire.doc.Table
public class Table
Constructor Summary | |
---|---|
Table(IDocument doc)
Initializes a new instance of the |
|
Table(IDocument doc,
boolean showBorder)
Initializes a new instance of the |
|
Table(IDocument doc,
boolean showBorder,
float lineWidth)
|
Method Summary | |
---|---|
IParagraph |
addCaption(java.lang.String name,
CaptionNumberingFormat format,
CaptionPosition captionPosition)
|
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 or sets the width of each column. |
int |
getDefaultColumnsNumber()
Gets or sets the default column count of per row. |
float |
getDefaultColumnWidth()
Gets or sets the default width of each column. |
float |
getDefaultRowHeight()
Gets or sets 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 or sets 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 or sets 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 or sets 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)
Gets or sets the width of each column. |
void |
setColumnWidth(int columnIndex,
float columnWidth,
CellWidthType columnWidthType)
Sets the width of all cells in the current column of the table. |
void |
setDefaultColumnsNumber(int value)
Gets or sets the default column count of per row. |
void |
setDefaultColumnWidth(float value)
Gets or sets the default width of each column. |
void |
setDefaultRowHeight(float value)
Gets or sets the default row height, the unit of measure is point, 1point = 0.3528 mm |
void |
setIndentFromLeft(float value)
Gets or 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)
|
void |
setTitle(java.lang.String value)
Gets or sets the table title. |
Methods inherited from class com.spire.doc.BodyRegion |
---|
getDeleteRevision, getInsertRevision, getOwnerTextBody, isDeleteRevision, isInsertRevision |
Methods inherited from class com.spire.doc.DocumentObject |
---|
getFirstChild, getLastChild, getNextSibling, getNextWidgetSibling, getOwner, getPreviousSibling, getPreviousWidgetSibling, isComposite, prependChild, 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 |
---|
public Table(IDocument doc)
doc
- The doc.public Table(IDocument doc, boolean showBorder)
doc
- The doc.showBorder
- if it specifies to show the table border, set to public Table(IDocument doc, boolean showBorder, float lineWidth)
Method Detail |
---|
public float getDefaultRowHeight()
public void setDefaultRowHeight(float value)
public int getDefaultColumnsNumber()
public void setDefaultColumnsNumber(int value)
public float getDefaultColumnWidth()
public void setDefaultColumnWidth(float value)
public float[] getColumnWidth()
public void setColumnWidth(float[] value)
public DocumentObjectType getDocumentObjectType()
getDocumentObjectType
in interface IDocumentObject
getDocumentObjectType
in class DocumentObject
public RowCollection getRows()
getRows
in interface ITable
public RowFormat getTableFormat()
getTableFormat
in interface ITable
public PreferredWidth getPreferredWidth()
public void setPreferredWidth(PreferredWidth value)
public java.lang.String getTableStyleName()
public TableCell getLastCell()
getLastCell
in interface ITable
public TableRow getFirstRow()
getFirstRow
in interface ITable
public TableRow getLastRow()
getLastRow
in interface ITable
public TableCell get(int row, int column)
get
in interface ITable
row
- column
-
public float getWidth()
getWidth
in interface ITable
public DocumentObjectCollection getChildObjects()
getChildObjects
in interface ICompositeObject
getChildObjects
in class DocumentObject
public float getIndentFromLeft()
getIndentFromLeft
in interface ITable
public void setIndentFromLeft(float value)
setIndentFromLeft
in interface ITable
value
- The indentpublic java.lang.String getTitle()
public void setTitle(java.lang.String value)
public java.lang.String getTableDescription()
public void setTableDescription(java.lang.String value)
public IParagraph addCaption(java.lang.String name, CaptionNumberingFormat format, CaptionPosition captionPosition)
captionPosition
- name
- format
-
public Table deepClone()
deepClone
in interface IDocumentObject
deepClone
in class DocumentObject
public void resetCells(int rowsNum, int columnsNum)
resetCells
in interface ITable
rowsNum
- The rows number.columnsNum
- The columns number.public void resetCells(int rowsNum, int columnsNum, RowFormat format, float cellWidth)
resetCells
in interface ITable
rowsNum
- The rows num.columnsNum
- The columns num.format
- cellWidth
- Width of the cell.public void applyStyle(DefaultTableStyle builtinTableStyle)
builtinStyle
- The built-in table style.public void applyTableStyle()
public TableRow addRow()
addRow
in interface ITable
public TableRow addRow(int columnsNum)
columnsNum
- The number of the count of the new row, it's must be -1 < columnsNum < 64.
public TableRow addRow(boolean isCopyFormat)
addRow
in interface ITable
isCopyFormat
-
public TableRow addRow(boolean isCopyFormat, boolean autoPopulateCells)
addRow
in interface ITable
isCopyFormat
- Indicates whether copy format from previous row or notautoPopulateCells
- if specifies to populate cells automatically, set to public TableRow addRow(boolean isCopyFormat, int columnsNum)
isCopyFormat
- Indicates whether copy format from previous row or notcolumnsNum
- The number of the count of the new row, it's must be -1 < columnsNum < 64.
public int replace(java.util.regex.Pattern pattern, java.lang.String replace)
replace
in interface IBodyRegion
replace
in class BodyRegion
pattern
- Patternreplace
- Replace text
public int replace(java.lang.String given, java.lang.String replace, boolean caseSensitive, boolean wholeWord)
replace
in class BodyRegion
matchString
- The matchString text.newValue
- The newValue text.caseSensitive
- if it specifies case sensitive, set to wholeWord
- if it specifies to search a whole word, set to public int replace(java.util.regex.Pattern pattern, TextSelection textSelection)
replace
in interface IBodyRegion
replace
in class BodyRegion
pattern
- The pattern.textSelection
- The text selection.
public int replace(java.util.regex.Pattern pattern, TextSelection textSelection, boolean saveFormatting)
replace
in class BodyRegion
pattern
- The pattern.textSelection
- The text selection.saveFormatting
- if save source formatting, set to true
public TextSelection find(java.util.regex.Pattern pattern)
find
in class BodyRegion
pattern
- The pattern.
public void applyVerticalMerge(int columnIndex, int startRowIndex, int endRowIndex)
applyVerticalMerge
in interface ITable
columnIndex
- Index of the column.startRowIndex
- Start index of the row.endRowIndex
- End index of the row.public void applyHorizontalMerge(int rowIndex, int startCellIndex, int endCellIndex)
applyHorizontalMerge
in interface ITable
rowIndex
- Index of the row.startCellIndex
- Start index of the cell.endCellIndex
- End index of the cell.public void removeAbsPosition()
removeAbsPosition
in interface ITable
public void setColumnWidth(int columnIndex, float columnWidth, CellWidthType columnWidthType)
columnIndex
- Index of the column.columnWidth
- The column width.columnWidthType
- The column width type.public void autoFit(AutoFitBehaviorType behavior)
behavior
- How Word resizes the specified table with the AutoFit feature is used.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |