| 
 | ||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.zhuozhengsoft.pageoffice.wordwriter.Table
public class Table
Table 类,代表Word中定义的表格对象。
您只能通过调用 DataRegion.openTable 方法获取 Table 对象。
| 方法摘要 | |
|---|---|
|  Border | getBorder()获取边框对象。 | 
|  int | getIndex()获取表格的索引。 | 
|  void | insertRowAfter(Cell cell)在指定单元格所在行之后插入新行。 | 
|  Cell | openCellRC(int row,
           int col)打开指定的单元格,并返回 Cell 对象。 | 
|  Column | openColumn(int index)打开指定索引的列。 | 
|  Row | openRow(int index)打开指定索引的行。 | 
|  void | setPreferredWidth(float value)设置表格的宽度(以磅为单位或以窗口宽度的百分比表示,取决于属性PreferredWidthType的值。)。 | 
|  void | setPreferredWidthType(WdPreferredWidthType value)设置宽度时使用的首选度量单位。 | 
|  void | setRowsHeight(float rowHeight)设置表格所有行的高度。 | 
|  void | setRowsHeight(float rowHeight,
              WdRowHeightRule heightRule)设置表格所有行的高度。 | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| 方法详细信息 | 
|---|
public int getIndex()
这里的 Index 是Word中定义的表格索引概念。Index值的意思是指当前表格在 DataRegion 中包含的所有表格中的排序位置。
Index的值从"1"开始。
public Border getBorder()
                 throws java.io.IOException
java.io.IOExceptionpublic void setPreferredWidthType(WdPreferredWidthType value)
public void setPreferredWidth(float value)
public Cell openCellRC(int row,
                       int col)
row - 行号。从"1"开始。col - 列号。从"1"开始。
DataRegion.openTable()方法中完整的示例代码,学习如何调用 OpenCellRC 方法。
public void insertRowAfter(Cell cell)
                    throws java.lang.Exception
cell - 单元格对象,如果超出 Table 的实际范围,会插入失败,不会有提示。
java.lang.Exceptionpublic Column openColumn(int index)
index - 列的索引,和Word中定义的概念完全一致。从"1"开始。
public Row openRow(int index)
index - 行的索引,和Word中定义的概念完全一致。从"1"开始。
public void setRowsHeight(float rowHeight,
                          WdRowHeightRule heightRule)
rowHeight - 行的高度,以磅为单位。heightRule - 用于确定指定行的高度的规则。public void setRowsHeight(float rowHeight)
rowHeight - 行的高度,以磅为单位。| 
 | ||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||