aspose.pdf
Class Table

java.lang.Object
  extended by aspose.pdf.Paragraph
      extended by aspose.pdf.Table
All Implemented Interfaces:
java.lang.Cloneable

public class Table
extends Paragraph
implements java.lang.Cloneable

Represents a table Paragraph in a Pdf document.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Table table1 = new Table(); sec1.getParagraphs().add(table1); table1.setColumnWidths("70 2cm"); Row row1 = table1.getRows().add(); Cell cell1Row1 = row1.getCells().add("ColumnsSpan = 2"); cell1Row1.setColumnsSpan(2); cell1Row1.setBorder(new BorderInfo(BorderSide.All.getValue(),0.5f)); Row row2 = table1.getRows().add(); Cell cell1Row2 = row2.getCells().add("cell1"); cell1Row2.setBorder(new BorderInfo(BorderSide.All.getValue(),0.5f)); Cell cell2Row2 = row2.getCells().add("cell2"); cell2Row2.setBorder(new BorderInfo(BorderSide.All.getValue(),0.5f)); pdf1.save(....); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Table ColumnWidths="70 2cm"> <Row> <Cell ColumnsSpan="2"> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>ColumnsSpan = 2</Segment> </Text> </Cell> </Row> <Row> <Cell> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>cell1</Segment> </Text> </Cell> <Cell> <Border> <All LineWidth="0.5" Color="Red"></All> </Border> <Text> <Segment>cell2</Segment> </Text> </Cell> </Row> </Table> </Section> </Pdf>


Nested Class Summary
 
Nested classes/interfaces inherited from class aspose.pdf.Paragraph
Paragraph.VerticalPositionInfo
 
Field Summary
 boolean HasRowSpan
          A boolean value that indicates whether the table has row span
 boolean IsColIndexProcessed
          Gets a boolean value that indicates whether the column index is processed.
 boolean IsColumnWidthGot
          A boolean value that indicates whether the method getColumnWidths is got.
 boolean[] IsColumnWidthSetByUser
          A boolean array that indicates whether the column width is set by user
 boolean IsFromCanvas
          A boolean value that indicates whether the table is converted from Canvas or not
 boolean IsFromFloatingBox
          Judge that table is converted from a floating box from or not
 TableMatrix[][] tableMatrix
          The table's matrix array
 int TableMatrixLength
          An int value that indicates the table matrix's length
 int TableMatrixOffSet
          An int value that indicates the table matrix's offset
 Cells VerticalTextCells
          A Cells object that the table contains vertical text cells.
 Paragraphs ZIndexParasInTable
          A Paragraphs object that indicates zindex paragraph in table
 
Fields inherited from class aspose.pdf.Paragraph
_realPageNumber, INNER_INDENT, isNeedAddToPage, isPositionProcessed, VerticalPosInfo
 
Constructor Summary
Table()
          Initializes a new instance of the Tableclass.
Table(Cell cell)
          Initializes a new instance of the Table class in the Cell.
Table(Section section)
          Initializes a new instance of the Table class in the Section.
 
Method Summary
 java.lang.Object clone()
          Clones a new Table object.
 java.lang.Object completeClone()
          Clones a new Table object.
 void formatColumnsWithFormatInfo(TableFormatInfo info, int firstColumn, int maxColumns)
          Format the table in specified columns with given TableFormatInfo
 void formatRowsWithFormatInfo(TableFormatInfo info, int firstRow, int maxRows)
          Format the table in specified rows with given TableFormatInfo
 void formatTableWithFormatInfo(TableFormatInfo info, int firstColumn, int firstRow, int maxRows, int maxColumns)
          Format the table in specified columns and rows with given TableFormatInfo
 WidthArray getAddColWidths()
          Gets a WidthArray object that indicates add column widths.
 WidthArray getAddRight()
           
 AlignmentType getAlignment()
          Gets a AlignmentType that indicates the paragraph alignment type.
 Color getBackgroundColor()
          Gets a Color object that indicates the background color of the table.
 BorderInfo getBorder()
          Gets a BorderInfo object that indicates the table border info.
 Cell getCell(int row, int column, boolean isTableChanged)
          Gets a cell according to it's row and column index.
 ColumnAdjustmentType getColumnAdjustment()
          Gets a ColumnAdjustmentType that indicates how to determine the width of columns.Default is Customized which means the column width are specified by manual.
 int getColumnCount()
          Gets an int value that indicates the total column number.
 java.lang.String getColumnWidths()
          Gets a String that contains the width of each columns in this table.
 WidthArray getColWidths()
          Gets a WidthArray object that indicates the column width array.
 BorderInfo getDefaultCellBorder()
          Gets a BorderInfo object that indicates the default border style for all cells in this table.
 MarginInfo getDefaultCellPadding()
          Gets a MarginInfo object that indicates the default cell padding in the table.
 TextInfo getDefaultCellTextInfo()
          Gets a TextInfo object that indicates the default cell text format info.
 EndNotePositioningType getEndNotePositioning()
          Gets a EndNotePositioningType that contains the positioning types for endnote
 float getFixedWidth()
          Gets a float value that indicates the fixed width of the table.
 FloatingBox getFloatingBox()
          Gets a floatingBox information.
 float getFootNoteHeight()
          Gets a float value of the footnote's height.
 boolean getHasEndNote()
          Gets a boolean value that indicates whether current table has endnote.
 boolean getHasFootNote()
          Gets a boolean value that indicates whether current table has footnote.
 float getHeight(Pdf doc)
          Gets the table height.
 boolean getIsBorderSetbyUser()
          Gets a boolean value that indicates the border is set by user or not.
 boolean getIsBroaken()
          Gets a boolean value that indicates whether the table is broken.
 boolean getIsBroken()
          Gets a bool value that indicates whether the table is allowed to be broken or not when crossing pages.
 boolean getIsBrokenTable()
          Gets a boolean value that indicates whether the table is broken or not
 boolean getIsColumnWidthGot()
          Gets a boolean value that indicates whether the method getColumnWidths is got.
 boolean getIsDefaultBorderSetbyUser()
          Gets a boolean value that indicates the default border style whether is set by user.
 boolean getIsEmptyRowAtBottomShown()
          Gets a boolean value that indicates if the empty row at the bottom of the table be shown in the PDF.
 boolean getIsFirstRowRepeated()
          Gets a boolean value that indicates whether the first row is repeated when its table is broken.
 boolean getIsFromCanvas()
          Gets a boolean value that indicates whether the table is converted from Canvas or not.
 boolean getIsFromFloatingBox()
          Gets a boolean value that indicates whether the table is converted from a floating box from or not.
 boolean getIsKeptWithNextTable()
          Gets a boolean value that indicates whether current row remains in the same table along with next row.
 boolean getIsNeedRepeating()
          Gets a boolean value that indicates whether the paragraph need to be repeated on next page.
 boolean getIsOriginalVerticalBrokenTable()
          Gets a boolean value that indicates whether the table is the original vertical broken table
 boolean getIsRowBroken()
          Gets a bool value that indicates whether the row can be broken or not when its table is broken.
 boolean getIsRowBrokenSetByUser()
          Gets a boolean value that indicates whether the row is set broken by user
 boolean getIsSingleHeaderShown()
          A boolean value that indicates whether table with only a header(IsFirstRowRepeated=true and Rows.Count=1) be shown.
 boolean getIsVerticalBroken()
          Gets or sets a bool value that indicates whether the table is broken vertically as the table is printed out of the right page margin.If The sub-table can be place in the same page,it will be placed after the original table in the same page.
 boolean getIsVerticalBrokenInSamePage()
          Getsa boolean value that indicates whether the vertically broken table is in the same page.
 float getMaxColumnWidth(Pdf pdf, int columnNumber)
          Gets the maximum column width which allows text in all cells in the column be shown in one line.
 float getMinColumnWidth(Pdf pdf, int columnNumber)
          Gets the minimum column width at which no hyphenation needs for all cells in the column.
 Table getNextBrokenTable()
          Gets the next broken table
 HeaderFooter getParentHeaderFooter()
          Gets the parent HeaderFooter that represents a header or footer of a page in a Pdf document
 Section getParentSection()
          Gets the parent Section that represents a section in a Pdf document
 int getRepeatingRows()
          Gets a int value that indicates how many rows from the first row will be repeated when the table is broken across pages.
 Table getRepeatingRowsTable()
          Gets a Table object that contains repeating rows.
 Rows getRows()
          Gets a Rows collection that indicates all rows in the table.
 TableMatrix[][] getTableMatrix()
          Gets a TableMatrix array that contains the table matrix
 int getTableMatrixOffSet()
          Gets an int value that indicates the table matrix's offset.
 java.lang.String getTitle()
          Gets a String value that indicates the title of the table.
 VerticalAlignmentType getVerticalAlignment()
          Gets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in the table.
 Cells getVerticalTextCells()
          Gets a Cells object that the table contains vertical text cells.
 float getWidth()
          Gets a float value that contains the width of each columns in this table
 void importArray(double[] doubleArray, int firstRow, byte firstColumn, boolean isLeftColumnsFilled)
          Imports an array of double number into the table.
 void importArray(int[] intArray, int firstRow, byte firstColumn, boolean isLeftColumnsFilled)
          Imports an array of integer into the table.
 void importArray(java.lang.Object[] objArray, int firstRow, byte firstColumn, boolean isLeftColumnsFilled)
          Imports an array of object(any data type) into the table.
 void importArray(java.lang.String[] stringArray, int firstRow, byte firstColumn, boolean isLeftColumnsFilled)
          Imports an array of string into the table.
 boolean isDecorateLinesOffsets()
          Returns flag indicated border's decorate lines drawing.
 void setAddColWidths(WidthArray value)
          Sets a WidthArray object that indicates add column widths.
 void setAddRight(WidthArray value)
           
 void setAlignment(AlignmentType value)
          Sets a AlignmentType that indicates the paragraph alignment type.
 void setBackgroundColor(Color value)
          Sets a Color object that indicates the background color of the table.
 void setBorder(BorderInfo value)
          Sets or sets a BorderInfo object that indicates the table border info.
 void setCellBorderDecorateLines(boolean value)
          Enables/disables decorate lines offsets for table cells.
 void setColumnAdjustment(ColumnAdjustmentType value)
          Sets a ColumnAdjustmentType that indicates how to determine the width of columns.Default is Customized which means the column width are specified by manual.
 void setColumnCount(int value)
          Sets an int value that indicates the total column number.
 void setColumnTextInfo(int columnNumber, TextInfo textInfo)
          Sets the text format info of specified column.
 void setColumnWidth(int columnNumber, float width)
          Sets the width of specidied column.
 void setColumnWidths(java.lang.String value)
          Sets a String that contains the width of each columns in this table.
 void setColWidths(WidthArray value)
          Sets a WidthArray object that indicates the column width array.
 void setDefaultCellBorder(BorderInfo value)
          Sets a BorderInfo object that indicates the default border style for all cells in this table.
 void setDefaultCellPadding(MarginInfo value)
          Sets a MarginInfo object that indicates the default cell padding in the table.
 void setDefaultCellTextInfo(TextInfo value)
          Sets a TextInfo object that indicates the default cell text format info.
 void setEndNotePositioning(EndNotePositioningType value)
          Sets a EndNotePositioningType that contains the positioning types for endnote
 void setFixedWidth(float value)
          Sets a float value that indicates the fixed width of the table.
 void setFloatingBox(FloatingBox floatingBox)
          Sets a floatingBox information.
 void setFootNoteHeight(float value)
          Sets a float value of the footnote's height.
 void setHasEndNote(boolean value)
          Sets a boolean value that indicates whether current table has endnote.
 void setHasFootNote(boolean value)
          Sets a boolean value that indicates whether current table has footnote.
 void setIsBorderSetbyUser(boolean isBorderSetbyUser)
          Sets a boolean value that indicates the border is set by user or not
 void setIsBroaken(boolean value)
          Sets a boolean value that indicates whether the table is broken.
 void setIsBroken(boolean value)
          Sets a bool value that indicates whether the table is allowed to be broken or not when crossing pages.
 void setIsBrokenTable(boolean value)
          Sets a boolean value that indicates whether the table is broken or not
 void setIsColumnWidthGot(boolean isColumnWidthGot)
          Sets a boolean value that indicates whether the method getColumnWidths is got.
 void setIsEmptyRowAtBottomShown(boolean value)
          Sets a boolean value that indicates if the empty row at the bottom of the table be shown in the PDF.
 void setIsFirstRowRepeated(boolean value)
          Sets a boolean value that indicates whether the first row is repeated when its table is broken.
 void setIsFromCanvas(boolean isFromCanvas)
          Sets a boolean value that indicates whether the table is from Canvas
 void setIsFromFloatingBox(boolean IsFromFloatingBox)
          Sets a boolean value that indicates whether the table is converted from a floating box from or not
 void setIsNeedRepeating(boolean value)
          Sets a boolean value that indicates whether the paragraph need to be repeated on next page.
 void setIsOriginalVerticalBrokenTable(boolean value)
          Sets a boolean value that indicates whether the table is the original vertical broken table
 void setIsRowBroken(boolean value)
          Sets a bool value that indicates whether the row can be broken or not when its table is broken.
 void setIsRowBrokenSetByUser(boolean value)
          Sets a boolean value that indicates whether the row is set broken by user
 void setIsSingleHeaderShown(boolean value)
          A boolean value that indicates whether table with only a header(IsFirstRowRepeated=true and Rows.Count=1) be shown.
 void setIsVerticalBroken(boolean value)
          Sets or sets a bool value that indicates whether the table is broken vertically as the table is printed out of the right page margin.If The sub-table can be place in the same page,it will be placed after the original table in the same page.
 void setIsVerticalBrokenInSamePage(boolean value)
          Sets a boolean value that indicates whether the vertically broken table is in the same page.
 void setNextBrokenTable(Table value)
          Sets the next broken table
 void setParentHeaderFooter(HeaderFooter value)
          Sets the parent HeaderFooter that represents a header or footer of a page in a Pdf document
 void setParentSection(Section value)
          Sets the parent Section that represents a section in a Pdf document
 void setRepeatingRows(int value)
          Sets a int value that indicates how many rows from the first row will be repeated when the table is broken across pages.
 void setRepeatingRowsTable(Table value)
          Sets a Table object that contains repeating rows.
 void setRows(Rows value)
          Sets a Rows collection that indicates all rows in the table.
 void setTableMatrix(TableMatrix[][] TableMatrix)
          Sets a TableMatrix array that contains the table matrix
 void setTitle(java.lang.String value)
          Sets a String value that indicates the title of the table.
 void setVerticalAlignment(VerticalAlignmentType value)
          Sets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in the table.
 void setVerticalTextCells(Cells VerticalTextCells)
          Sets a Cells object that the table contains vertical text cells.
 
Methods inherited from class aspose.pdf.Paragraph
copyTo, getHeight, getID, getIsNeedAddToPage, getIsPositionGot, getIsPositionProcessed, getLeft, getMargin, getMayNeedReprocess, getNeedReprocess, getNextParagraphInHeading, getPageNumber, getParentCell, getPositioningType, getPosX, getPosY, getRealPageNumber, getReferenceParagraphID, getRefPara, getSection, getTop, getVerticalPosInfo, isDisabled, isEndNote, isFirstParagraph, isFirstParagraphInColumn, isFootNote, isFootNoteProcessed, isInHeaderFooter, isInList, isKeptTogether, isKeptWithNext, isOnOddPage, setEndNote, setFootNoteProcessed, setHeight, setID, setIsDisabled, setIsFirstParagraph, setIsFirstParagraphInColumn, setIsFootNote, setIsInHeaderFooter, setIsInList, setIsKeptTogether, setIsKeptWithNext, setIsNeedAddToPage, setIsOnOddPage, setIsPositionGot, setIsPositionProcessed, setLeft, setMargin, setMayNeedReprocess, setNeedReprocess, setNextParagraphInHeading, setPageNumber, setParentCell, setParentIsTable, setPositioningType, setPosX, setPosY, setRealPageNumber, setReferenceParagraphID, setRefPara, setSection, setTop, setVerticalPosInfo, setWidth
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableMatrix

public TableMatrix[][] tableMatrix
The table's matrix array


TableMatrixOffSet

public int TableMatrixOffSet
An int value that indicates the table matrix's offset


TableMatrixLength

public int TableMatrixLength
An int value that indicates the table matrix's length


ZIndexParasInTable

public Paragraphs ZIndexParasInTable
A Paragraphs object that indicates zindex paragraph in table


HasRowSpan

public boolean HasRowSpan
A boolean value that indicates whether the table has row span


VerticalTextCells

public Cells VerticalTextCells
A Cells object that the table contains vertical text cells.


IsColumnWidthSetByUser

public boolean[] IsColumnWidthSetByUser
A boolean array that indicates whether the column width is set by user


IsFromFloatingBox

public boolean IsFromFloatingBox
Judge that table is converted from a floating box from or not


IsFromCanvas

public boolean IsFromCanvas
A boolean value that indicates whether the table is converted from Canvas or not


IsColumnWidthGot

public boolean IsColumnWidthGot
A boolean value that indicates whether the method getColumnWidths is got.


IsColIndexProcessed

public boolean IsColIndexProcessed
Gets a boolean value that indicates whether the column index is processed.

Constructor Detail

Table

public Table()
Initializes a new instance of the Tableclass.


Table

public Table(Section section)
Initializes a new instance of the Table class in the Section.

Parameters:
section - The section object where the table is in.

Table

public Table(Cell cell)
Initializes a new instance of the Table class in the Cell.

Parameters:
cell - The cell object where the table is in
Method Detail

getColWidths

public WidthArray getColWidths()
Gets a WidthArray object that indicates the column width array.


setColWidths

public void setColWidths(WidthArray value)
Sets a WidthArray object that indicates the column width array.


getIsNeedRepeating

public boolean getIsNeedRepeating()
Gets a boolean value that indicates whether the paragraph need to be repeated on next page. Default value is false.The attribute is only valid when the paragraph itself and the object its ReferenceParagraphID referred to both are included in RepeatingRows.


setIsNeedRepeating

public void setIsNeedRepeating(boolean value)
Sets a boolean value that indicates whether the paragraph need to be repeated on next page. Default value is false.The attribute is only valid when the paragraph itself and the object its ReferenceParagraphID referred to both are included in RepeatingRows.

Parameters:
value -

getIsKeptWithNextTable

public boolean getIsKeptWithNextTable()
Gets a boolean value that indicates whether current row remains in the same table along with next row.


getColumnWidths

public java.lang.String getColumnWidths()
Gets a String that contains the width of each columns in this table. The value of each column should be separated by blank.The default unit is point, but cm,inch and percentage of available width are also supported.For example,"120 2.5cm 1.5inch", or "60% 40%", The max column number is 1024, If this property is set, the FitWidth property of the object needs not set.

Remarks: If this property is set, the FitWidth property of the Cell object needs not set.


setColumnWidths

public void setColumnWidths(java.lang.String value)
Sets a String that contains the width of each columns in this table. The value of each column should be separated by blank.The default unit is point, but cm,inch and percentage of available width are also supported.For example,"120 2.5cm 1.5inch", or "60% 40%", The max column number is 1024, If this property is set, the FitWidth property of the object needs not set.

Parameters:
value -

getWidth

public float getWidth()
Gets a float value that contains the width of each columns in this table

Overrides:
getWidth in class Paragraph

getAddColWidths

public WidthArray getAddColWidths()
Gets a WidthArray object that indicates add column widths.


setAddColWidths

public void setAddColWidths(WidthArray value)
Sets a WidthArray object that indicates add column widths.

Parameters:
value -

getAddRight

public WidthArray getAddRight()

setAddRight

public void setAddRight(WidthArray value)

getHasFootNote

public boolean getHasFootNote()
Gets a boolean value that indicates whether current table has footnote.


setHasFootNote

public void setHasFootNote(boolean value)
Sets a boolean value that indicates whether current table has footnote.

Parameters:
value -

getFootNoteHeight

public float getFootNoteHeight()
Gets a float value of the footnote's height.


setFootNoteHeight

public void setFootNoteHeight(float value)
Sets a float value of the footnote's height.

Parameters:
value -

getHasEndNote

public boolean getHasEndNote()
Gets a boolean value that indicates whether current table has endnote.


setHasEndNote

public void setHasEndNote(boolean value)
Sets a boolean value that indicates whether current table has endnote.

Parameters:
value -

getEndNotePositioning

public EndNotePositioningType getEndNotePositioning()
Gets a EndNotePositioningType that contains the positioning types for endnote


setEndNotePositioning

public void setEndNotePositioning(EndNotePositioningType value)
Sets a EndNotePositioningType that contains the positioning types for endnote

Parameters:
value -

getIsRowBroken

public boolean getIsRowBroken()
Gets a bool value that indicates whether the row can be broken or not when its table is broken. Default value is true.


setIsRowBroken

public void setIsRowBroken(boolean value)
Sets a bool value that indicates whether the row can be broken or not when its table is broken. Default value is true.

Parameters:
value -

getIsRowBrokenSetByUser

public boolean getIsRowBrokenSetByUser()
Gets a boolean value that indicates whether the row is set broken by user


setIsRowBrokenSetByUser

public void setIsRowBrokenSetByUser(boolean value)
Sets a boolean value that indicates whether the row is set broken by user

Parameters:
value -

getIsBroken

public boolean getIsBroken()
Gets a bool value that indicates whether the table is allowed to be broken or not when crossing pages.


setIsBroken

public void setIsBroken(boolean value)
Sets a bool value that indicates whether the table is allowed to be broken or not when crossing pages.


getIsVerticalBroken

public boolean getIsVerticalBroken()
Gets or sets a bool value that indicates whether the table is broken vertically as the table is printed out of the right page margin.If The sub-table can be place in the same page,it will be placed after the original table in the same page. If The sub-table can't be place in the same page,it will be placed after the original table in the next page. The default value is false.


setIsVerticalBroken

public void setIsVerticalBroken(boolean value)
Sets or sets a bool value that indicates whether the table is broken vertically as the table is printed out of the right page margin.If The sub-table can be place in the same page,it will be placed after the original table in the same page. If The sub-table can't be place in the same page,it will be placed after the original table in the next page. The default value is false.

Parameters:
value -

getIsOriginalVerticalBrokenTable

public boolean getIsOriginalVerticalBrokenTable()
Gets a boolean value that indicates whether the table is the original vertical broken table


setIsOriginalVerticalBrokenTable

public void setIsOriginalVerticalBrokenTable(boolean value)
Sets a boolean value that indicates whether the table is the original vertical broken table

Parameters:
value -

getIsVerticalBrokenInSamePage

public boolean getIsVerticalBrokenInSamePage()
Getsa boolean value that indicates whether the vertically broken table is in the same page.


setIsVerticalBrokenInSamePage

public void setIsVerticalBrokenInSamePage(boolean value)
Sets a boolean value that indicates whether the vertically broken table is in the same page.

Parameters:
value -

getIsFirstRowRepeated

public boolean getIsFirstRowRepeated()
Gets a boolean value that indicates whether the first row is repeated when its table is broken.


setIsFirstRowRepeated

public void setIsFirstRowRepeated(boolean value)
Sets a boolean value that indicates whether the first row is repeated when its table is broken.

Parameters:
value -

getTableMatrix

public TableMatrix[][] getTableMatrix()
Gets a TableMatrix array that contains the table matrix


setTableMatrix

public void setTableMatrix(TableMatrix[][] TableMatrix)
Sets a TableMatrix array that contains the table matrix

Parameters:
TableMatrix -

getTableMatrixOffSet

public int getTableMatrixOffSet()
Gets an int value that indicates the table matrix's offset.


getRepeatingRows

public int getRepeatingRows()
Gets a int value that indicates how many rows from the first row will be repeated when the table is broken across pages.


setRepeatingRows

public void setRepeatingRows(int value)
Sets a int value that indicates how many rows from the first row will be repeated when the table is broken across pages.

Parameters:
value -

getIsBorderSetbyUser

public boolean getIsBorderSetbyUser()
Gets a boolean value that indicates the border is set by user or not.


setIsBorderSetbyUser

public void setIsBorderSetbyUser(boolean isBorderSetbyUser)
Sets a boolean value that indicates the border is set by user or not

Parameters:
isBorderSetbyUser -

getBorder

public BorderInfo getBorder()
Gets a BorderInfo object that indicates the table border info.


setBorder

public void setBorder(BorderInfo value)
Sets or sets a BorderInfo object that indicates the table border info.

Parameters:
value -

getTitle

public java.lang.String getTitle()
Gets a String value that indicates the title of the table.


setTitle

public void setTitle(java.lang.String value)
Sets a String value that indicates the title of the table.

Parameters:
value -

getColumnCount

public int getColumnCount()
Gets an int value that indicates the total column number.


setColumnCount

public void setColumnCount(int value)
Sets an int value that indicates the total column number.

Parameters:
value -

getRows

public Rows getRows()
Gets a Rows collection that indicates all rows in the table.


setRows

public void setRows(Rows value)
Sets a Rows collection that indicates all rows in the table.

Parameters:
value -

getRepeatingRowsTable

public Table getRepeatingRowsTable()
Gets a Table object that contains repeating rows.


setRepeatingRowsTable

public void setRepeatingRowsTable(Table value)
Sets a Table object that contains repeating rows.

Parameters:
value -

getIsBroaken

public boolean getIsBroaken()
Gets a boolean value that indicates whether the table is broken.


setIsBroaken

public void setIsBroaken(boolean value)
Sets a boolean value that indicates whether the table is broken.

Parameters:
value -

getFixedWidth

public float getFixedWidth()
Gets a float value that indicates the fixed width of the table.
NOTE: This member is now obsolete.
You should use setColumnWidths(String) to set the column width of the table. It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for any inconvenience you may have experienced.


setFixedWidth

public void setFixedWidth(float value)
Sets a float value that indicates the fixed width of the table.
NOTE: This member is now obsolete.
You should use setColumnWidths(String) to set the column width of the table. It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for any inconvenience you may have experienced.

Parameters:
value -

getAlignment

public AlignmentType getAlignment()
Gets a AlignmentType that indicates the paragraph alignment type.


setAlignment

public void setAlignment(AlignmentType value)
Sets a AlignmentType that indicates the paragraph alignment type.

Parameters:
value -

getColumnAdjustment

public ColumnAdjustmentType getColumnAdjustment()
Gets a ColumnAdjustmentType that indicates how to determine the width of columns.Default is Customized which means the column width are specified by manual.


setColumnAdjustment

public void setColumnAdjustment(ColumnAdjustmentType value)
Sets a ColumnAdjustmentType that indicates how to determine the width of columns.Default is Customized which means the column width are specified by manual.

Parameters:
value -

getIsBrokenTable

public boolean getIsBrokenTable()
Gets a boolean value that indicates whether the table is broken or not


setIsBrokenTable

public void setIsBrokenTable(boolean value)
Sets a boolean value that indicates whether the table is broken or not

Parameters:
value -

getParentSection

public Section getParentSection()
Gets the parent Section that represents a section in a Pdf document


setParentSection

public void setParentSection(Section value)
Sets the parent Section that represents a section in a Pdf document

Parameters:
value -

getParentHeaderFooter

public HeaderFooter getParentHeaderFooter()
Gets the parent HeaderFooter that represents a header or footer of a page in a Pdf document


setParentHeaderFooter

public void setParentHeaderFooter(HeaderFooter value)
Sets the parent HeaderFooter that represents a header or footer of a page in a Pdf document

Parameters:
value -

getNextBrokenTable

public Table getNextBrokenTable()
Gets the next broken table


setNextBrokenTable

public void setNextBrokenTable(Table value)
Sets the next broken table

Parameters:
value -

getIsDefaultBorderSetbyUser

public boolean getIsDefaultBorderSetbyUser()
Gets a boolean value that indicates the default border style whether is set by user.


getDefaultCellBorder

public BorderInfo getDefaultCellBorder()
Gets a BorderInfo object that indicates the default border style for all cells in this table.


setDefaultCellBorder

public void setDefaultCellBorder(BorderInfo value)
Sets a BorderInfo object that indicates the default border style for all cells in this table.

Parameters:
value -

getDefaultCellTextInfo

public TextInfo getDefaultCellTextInfo()
Gets a TextInfo object that indicates the default cell text format info.


setDefaultCellTextInfo

public void setDefaultCellTextInfo(TextInfo value)
Sets a TextInfo object that indicates the default cell text format info.

Parameters:
value -

getVerticalAlignment

public VerticalAlignmentType getVerticalAlignment()
Gets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in the table.


setVerticalAlignment

public void setVerticalAlignment(VerticalAlignmentType value)
Sets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in the table.

Parameters:
value -

getDefaultCellPadding

public MarginInfo getDefaultCellPadding()
Gets a MarginInfo object that indicates the default cell padding in the table.


setDefaultCellPadding

public void setDefaultCellPadding(MarginInfo value)
Sets a MarginInfo object that indicates the default cell padding in the table.

Parameters:
value -

importArray

public void importArray(java.lang.String[] stringArray,
                        int firstRow,
                        byte firstColumn,
                        boolean isLeftColumnsFilled)
Imports an array of string into the table.

Parameters:
stringArray - The string array.
firstRow - The zero oriented row number of the first cell to import in.
firstColumn - The zero oriented column number of the first cell to import in.
isLeftColumnsFilled - If the value of this parameter is true,in the below rows of the first import row, columns will be filled at the first column of the table. Otherwise, columns in the below rows will be filled at the first import column specified by the firstColumn parameter.

importArray

public void importArray(int[] intArray,
                        int firstRow,
                        byte firstColumn,
                        boolean isLeftColumnsFilled)
Imports an array of integer into the table.

Parameters:
intArray - The integer array.
firstRow - The zero oriented row number of the first cell to import in.
firstColumn - The zero oriented column number of the first cell to import in.
isLeftColumnsFilled - If the value of this parameter is true,in the below rows of the first import row, columns will be filled at the first column of the table. Otherwise, columns in the below rows will be filled at the first import column specified by the firstColumn parameter.

importArray

public void importArray(double[] doubleArray,
                        int firstRow,
                        byte firstColumn,
                        boolean isLeftColumnsFilled)
Imports an array of double number into the table.

Parameters:
doubleArray - The double number array.
firstRow - The zero oriented row number of the first cell to import in.
firstColumn - The zero oriented column number of the first cell to import in.
isLeftColumnsFilled - If the value of this parameter is true,in the below rows of the first import row, columns will be filled at the first column of the table. Otherwise, columns in the below rows will be filled at the first import column specified by the firstColumn parameter.

importArray

public void importArray(java.lang.Object[] objArray,
                        int firstRow,
                        byte firstColumn,
                        boolean isLeftColumnsFilled)
Imports an array of object(any data type) into the table.

Parameters:
objArray - The object array.
firstRow - The zero oriented row number of the first cell to import in.
firstColumn - The zero oriented column number of the first cell to import in.
isLeftColumnsFilled - If the value of this parameter is true,in the below rows of the first import row, columns will be filled at the first column of the table. Otherwise, columns in the below rows will be filled at the first import column specified by the firstColumn parameter.

Typical usages are the following:

[Java] Pdf pdf = new Pdf(); Section sec = pdf.getSections().add(); Table tab1 = new Table(); sec.getParagraphs().add(tab1); tab1.setColumnWidths("60 100 100"); tab1.setDefaultCellBorder(new BorderInfo(BorderSide.All.getValue(),0.1f)); tab1.getDefaultCellTextInfo().setColor(new Color("Red")); double[] darr = new double[] { 1.5, 3.1415926, 100000, 20, 4000, 30.4512, 45.67, 890, 23.45 }; tab1.importArray(darr, 1, (byte)1, false); Table tab2 = new Table(); sec.getParagraphs().add(tab2); tab2.setColumnWidths("60 60 60 2cm 100"); tab2.setDefaultCellBorder(new BorderInfo(BorderSide.All.getValue(),0.1f)); tab2.getDefaultCellTextInfo().setFontSize(8); Row row1 = tab2.getRows().add(); for(int i = 1;i<=5;i++) { row1.getCells().add(Integer.toString(i)); for(int j =2;j<5;j++) { row1 = tab2.getRows().add(); row1.getCells().add(Integer.toString(j)); } } tab2.importArray(darr, 1, (byte)2, false); pdf.save(....);

getIsSingleHeaderShown

public boolean getIsSingleHeaderShown()
A boolean value that indicates whether table with only a header(IsFirstRowRepeated=true and Rows.Count=1) be shown. The default value is true.


setIsSingleHeaderShown

public void setIsSingleHeaderShown(boolean value)
A boolean value that indicates whether table with only a header(IsFirstRowRepeated=true and Rows.Count=1) be shown. The default value is true.

Parameters:
value -

getBackgroundColor

public Color getBackgroundColor()
Gets a Color object that indicates the background color of the table.


setBackgroundColor

public void setBackgroundColor(Color value)
Sets a Color object that indicates the background color of the table.

Parameters:
value -

getVerticalTextCells

public Cells getVerticalTextCells()
Gets a Cells object that the table contains vertical text cells.


setVerticalTextCells

public void setVerticalTextCells(Cells VerticalTextCells)
Sets a Cells object that the table contains vertical text cells.

Parameters:
VerticalTextCells -

clone

public java.lang.Object clone()
Clones a new Table object. Table properties are cloned but rows in table is not cloned.

Overrides:
clone in class java.lang.Object
Returns:
The new table

completeClone

public java.lang.Object completeClone()
Clones a new Table object. All members in the table are cloned.

Specified by:
completeClone in class Paragraph
Returns:
The new Table object.

setColumnTextInfo

public void setColumnTextInfo(int columnNumber,
                              TextInfo textInfo)
Sets the text format info of specified column.

Parameters:
columnNumber - The number of the column to be set.
textInfo - The text info object to set.

getMinColumnWidth

public float getMinColumnWidth(Pdf pdf,
                               int columnNumber)
Gets the minimum column width at which no hyphenation needs for all cells in the column. Note that you can only use this method to get the minimum width for text paragraphs in the column. Other paragraph such as image will be ignored.

Parameters:
pdf - The Pdf object that indicates the PDF document.
columnNumber - The column number which begins at 0.
Returns:
The minimum with for the column. [Java] tab1.ImportArray(darr,0,(byte)0,true); tab1.SetColumnWidth(2,tab1.GetMinColumnWidth(2));

getMaxColumnWidth

public float getMaxColumnWidth(Pdf pdf,
                               int columnNumber)
Gets the maximum column width which allows text in all cells in the column be shown in one line. For example,if the text is "Thank you for considering Aspose", will return the width of "considering",and this method will return the width of "Thank you for considering Aspose". Note that you can only use this method to get the maximum width for text paragraphs in the column. Other paragraph such as image will be ignored.
NOTE: This member is now obsolete.
You should use GetMinColumnWidth(Pdf pdf,int columnNumber) which has better performance. It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for any inconvenience you may have experienced.

Parameters:
pdf -
columnNumber - The column number which begins at 0.
Returns:
The maximum with for the column. [Java] tab1.ImportArray(darr,0,(byte)0,true); tab1.SetColumnWidth(2,tab1.GetMaxColumnWidth(2));

setColumnWidth

public void setColumnWidth(int columnNumber,
                           float width)
Sets the width of specidied column. This method is used to adjust column width after all cells have been added to table. Please see example of #getMinColumnWidth(int).

Parameters:
columnNumber - The column number which begins at 0.
width - The width to be set.

getCell

public Cell getCell(int row,
                    int column,
                    boolean isTableChanged)
Gets a cell according to it's row and column index. In the object model of table, rows and cells are represented by collections. When row span or column span is used, it is difficult to get cell from the collections according to it's row and column index. This method is used to get the cell when row span or column span is used.

Parameters:
row - The 0-based row index.
column - The 0-based column index.
isTableChanged - If the table is changed after the last calling of this method on the same table.
Returns:
The cell at specified row and column.

getFloatingBox

public FloatingBox getFloatingBox()
Gets a floatingBox information. If this property is not empty, indicating the table is converted from FloatingBox need to locate in accordance with the requirements of FloatingBox


setFloatingBox

public void setFloatingBox(FloatingBox floatingBox)
Sets a floatingBox information. If this property is not empty, indicating the table is converted from FloatingBox need to locate in accordance with the requirements of FloatingBox

Parameters:
floatingBox -

getIsFromFloatingBox

public boolean getIsFromFloatingBox()
Gets a boolean value that indicates whether the table is converted from a floating box from or not.


setIsFromFloatingBox

public void setIsFromFloatingBox(boolean IsFromFloatingBox)
Sets a boolean value that indicates whether the table is converted from a floating box from or not

Parameters:
IsFromFloatingBox -

getIsFromCanvas

public boolean getIsFromCanvas()
Gets a boolean value that indicates whether the table is converted from Canvas or not.


setIsFromCanvas

public void setIsFromCanvas(boolean isFromCanvas)
Sets a boolean value that indicates whether the table is from Canvas

Parameters:
isFromCanvas -

getIsEmptyRowAtBottomShown

public boolean getIsEmptyRowAtBottomShown()
Gets a boolean value that indicates if the empty row at the bottom of the table be shown in the PDF. When a table is larger and can't be display in one page, the table will be splited into more tables. Sometimes the broken table has a empty row at the bottom. This property is used to control the displaying of the empty row. The default value is false.


setIsEmptyRowAtBottomShown

public void setIsEmptyRowAtBottomShown(boolean value)
Sets a boolean value that indicates if the empty row at the bottom of the table be shown in the PDF. When a table is larger and can't be display in one page, the table will be splited into more tables. Sometimes the broken table has a empty row at the bottom. This property is used to control the displaying of the empty row. The default value is false.

Parameters:
value -

getIsColumnWidthGot

public boolean getIsColumnWidthGot()
Gets a boolean value that indicates whether the method getColumnWidths is got.


setIsColumnWidthGot

public void setIsColumnWidthGot(boolean isColumnWidthGot)
Sets a boolean value that indicates whether the method getColumnWidths is got.

Parameters:
isColumnWidthGot -

getHeight

public float getHeight(Pdf doc)
Gets the table height.

Parameters:
doc - The Pdf object.
Returns:
The row height in points.

formatTableWithFormatInfo

public void formatTableWithFormatInfo(TableFormatInfo info,
                                      int firstColumn,
                                      int firstRow,
                                      int maxRows,
                                      int maxColumns)
Format the table in specified columns and rows with given TableFormatInfo

Parameters:
info - The TableFormatInfo Object.
firstColumn - The first column index
firstRow - The first Row index.
maxRows - Maximum rows to be imported.
maxColumns - Maximum columns to be imported,no more than 128.

formatRowsWithFormatInfo

public void formatRowsWithFormatInfo(TableFormatInfo info,
                                     int firstRow,
                                     int maxRows)
Format the table in specified rows with given TableFormatInfo

Parameters:
info - The TableFormatInfo Object.
firstRow - The first Row index.
maxRows - Maximum rows to be imported.

formatColumnsWithFormatInfo

public void formatColumnsWithFormatInfo(TableFormatInfo info,
                                        int firstColumn,
                                        int maxColumns)
Format the table in specified columns with given TableFormatInfo

Parameters:
info - The TableFormatInfo Object.
firstColumn - The first column index.
maxColumns - Maximum columns to be imported,no more than 128.

setCellBorderDecorateLines

public void setCellBorderDecorateLines(boolean value)
Enables/disables decorate lines offsets for table cells.

This method invoking have sense only for color cells or color row.

Parameters:
value - the boolean value for flag setting

isDecorateLinesOffsets

public boolean isDecorateLinesOffsets()
Returns flag indicated border's decorate lines drawing.

Returns:
true if decorate lines should be drawn; false - otherwise