com.acesoft.aceoffix.wordwriter
Class Table

java.lang.Object
  extended by com.acesoft.aceoffix.wordwriter.Table

public class Table
extends java.lang.Object

Table class represents the table object defined in Word.

You can only call the DataRegion.openTable method to get the Table object.

Version:
5.0
Author:
Acesoft Corporation

Method Summary
 Border getBorder()
          Gets the border object.
 int getIndex()
          Gets the index of the table.
 void insertRowAfter(Cell cell)
          Inserts new rows below the row with the specified cell.
 Cell openCellRC(int row, int col)
          Opens the specified cell and returns a Cell object.
 Column openColumn(int index)
          Opens the specified column and returns a column object.
 Row openRow(int index)
          Opens the specified row and returns a row object.
 void removeRowAt(Cell cell)
          Removes the row with the specified cell.
 void setPreferredWidth(float value)
          Sets the width of the table.
 void setPreferredWidthType(WdPreferredWidthType value)
          The preferred width type used to set width.
 void setRowsHeight(float rowHeight)
          Sets the height of all rows in the Table.
 void setRowsHeight(float rowHeight, WdRowHeightRule heightRule)
          Sets the height of all rows in the Table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIndex

public int getIndex()
Gets the index of the table.

The Index is the index of the table defined in Microsoft Word. The index number indicates position of the table in the Word document.

The Index is a 1-based index.


getBorder

public Border getBorder()
                 throws java.io.IOException
Gets the border object.

Throws:
java.io.IOException

setPreferredWidthType

public void setPreferredWidthType(WdPreferredWidthType value)
The preferred width type used to set width.


setPreferredWidth

public void setPreferredWidth(float value)
Sets the width of the table. Whether the table width is in points or in percent depends on the value of PreferredWidthType.


openCellRC

public Cell openCellRC(int row,
                       int col)
Opens the specified cell and returns a Cell object.

Parameters:
row - The row number. Starting from "1".
col - The column number. Starting from "1".
Returns:
Returns a Cell object.
See Also:
DataRegion.openTable() to learn how to use the OpenCellRC method.

insertRowAfter

public void insertRowAfter(Cell cell)
                    throws java.lang.Exception
Inserts new rows below the row with the specified cell.

Parameters:
cell - Once the cell object goes out of the scope of the Table, insertion will fail silently.
Throws:
java.lang.Exception

openColumn

public Column openColumn(int index)
Opens the specified column and returns a column object.

Parameters:
index - The index of the column is the same with the index defined in Microsoft Word. Both of them start form "1".
Returns:
Returns a Column object.

openRow

public Row openRow(int index)
Opens the specified row and returns a row object.

Parameters:
index - The index of the row is the same with the index defined in Microsoft Word. Both of them start form "1".
Returns:
Returns a Row object.

setRowsHeight

public void setRowsHeight(float rowHeight,
                          WdRowHeightRule heightRule)
Sets the height of all rows in the Table.

Parameters:
rowHeight - The row height, in points.
heightRule - Height rule used to determine the height of the specified rows.

setRowsHeight

public void setRowsHeight(float rowHeight)
Sets the height of all rows in the Table.

Parameters:
rowHeight - The row height, in points.

removeRowAt

public void removeRowAt(Cell cell)
                 throws java.lang.Exception
Removes the row with the specified cell.

Parameters:
cell - Once the cell object goes out of the scope of the Table, insertion will fail silently.
Throws:
java.lang.Exception