public final class HSLFTable extends HSLFGroupShape implements HSLFShapeContainer, TableShape<HSLFShape,HSLFTextParagraph>
Modifier and Type | Field and Description |
---|---|
protected static int |
BORDERS_ALL |
protected static int |
BORDERS_INSIDE |
protected static int |
BORDERS_NONE |
protected static int |
BORDERS_OUTSIDE |
protected HSLFTableCell[][] |
cells |
Modifier | Constructor and Description |
---|---|
protected |
HSLFTable(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
Create a Table object and initialize it from the supplied Record container.
(创建一个 Table 对象并从提供的 Record 容器中初始化它。)
|
protected |
HSLFTable(int numRows, int numCols)
Create a new Table of the given number of rows and columns
(创建给定行数和列数的新表)
|
protected |
HSLFTable(int numRows, int numCols, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
Create a new Table of the given number of rows and columns
(创建给定行数和列数的新表)
|
Modifier and Type | Method and Description |
---|---|
protected void |
afterInsert(HSLFSheet sh)
Event which fires when a shape is inserted in the sheet.
(将形状插入工作表时触发的事件。)
|
HSLFTableCell |
getCell(int row, int col)
Gets a cell
(获取一个单元格)
|
double |
getColumnWidth(int col)
Gets the width (in points) of the n-th column
(获取第 n 列的宽度(以磅为单位))
|
int |
getNumberOfColumns()
Return the maximum number of columns.
(返回最大列数。)
|
int |
getNumberOfRows()
Return the number of rows
(返回行数)
|
protected HSLFTableCell |
getRelativeCell(HSLFTableCell origin, int row, int col) |
double |
getRowHeight(int row)
Gets the row height
(获取行高)
|
protected void |
initTable() |
protected void |
moveAndScale(java.awt.geom.Rectangle2D anchorDest)
Moves and scales this
ShapeGroup to the specified anchor.
(将此 ShapeGroup 移动并缩放到指定的锚点。)
|
void |
setColumnWidth(int col, double width)
Sets the width (in points) of the n-th column
(设置第 n 列的宽度(以磅为单位))
|
void |
setRowHeight(int row, double height)
Sets the row height.
(设置行高。)
|
void |
setSheet(HSLFSheet sheet)
Assign the
SlideShow this shape belongs to
(分配此形状所属的幻灯片)
|
addShape, createAutoShape, createConnector, createFreeform, createGroup, createOleShape, createPicture, createSpContainer, createTable, createTextBox, getAnchor, getEscherChild, getHyperlink, getInteriorAnchor, getShapes, getShapeType, iterator, removeShape, setAnchor, setExteriorAnchor, setInteriorAnchor
draw, getClientData, getClientDataRecord, getClientRecords, getEscherChild, getEscherChild, getEscherChild, getEscherOptRecord, getEscherProperty, getEscherProperty, getEscherProperty, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getFillStyle, getFlipHorizontal, getFlipVertical, getParent, getRotation, getShapeId, getShapeName, getSheet, getSpContainer, isPlaceholder, moveTo, setEscherProperty, setEscherProperty, setEscherProperty, setEscherProperty, setEscherProperty, setFlipHorizontal, setFlipVertical, setRotation, setShapeId, setShapeType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createAutoShape, createConnector, createFreeform, createGroup, createOleShape, createPicture, createTextBox
addShape, createTable, getShapes, removeShape
draw, getAnchor, getParent, getShapeId, getShapeName, getSheet
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotation
protected static final int BORDERS_ALL
protected static final int BORDERS_OUTSIDE
protected static final int BORDERS_INSIDE
protected static final int BORDERS_NONE
protected HSLFTableCell[][] cells
protected HSLFTable(int numRows, int numCols)
numRows
- the number of rows
(numRows - 行数)
numCols
- the number of columns
(numCols - 列数)
protected HSLFTable(int numRows, int numCols, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
numRows
- the number of rows
(numRows - 行数)
numCols
- the number of columns
(numCols - 列数)
parent
- the parent shape, or null if table is added to sheet
(parent - 父形状,如果将表格添加到工作表,则为 null)
protected HSLFTable(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
escherRecord
-
EscherSpContainer
container which holds information about this shape
(escherRecord - 包含此形状信息的 EscherSpContainer 容器)
parent
- the parent of the shape
(parent - 形状的父级)
public HSLFTableCell getCell(int row, int col)
TableShape
getCell
in interface
TableShape<HSLFShape,HSLFTextParagraph>
(接口 TableShape 中的 getCell
row
- the row index (0-based)
(row - 行索引(从 0 开始))
col
- the column index (0-based)
(col - 列索引(从 0 开始))
public int getNumberOfColumns()
TableShape
getNumberOfColumns
in interface
TableShape<HSLFShape,HSLFTextParagraph>
(接口 TableShape 中的 getNumberOfColumns
public int getNumberOfRows()
TableShape
getNumberOfRows
in interface
TableShape<HSLFShape,HSLFTextParagraph>
(接口 TableShape 中的 getNumberOfRows
protected void afterInsert(HSLFSheet sh)
HSLFShape
afterInsert
in class
HSLFShape
sh
- - owning shape
(sh - - 拥有形状)
protected void initTable()
public void setSheet(HSLFSheet sheet)
SlideShow
this shape belongs to
(分配此形状所属的幻灯片)
public double getRowHeight(int row)
TableShape
getRowHeight
in interface
TableShape<HSLFShape,HSLFTextParagraph>
(接口 TableShape 中的 getRowHeight
row
- the row index (0-based)
(row - 行索引(从 0 开始))
public void setRowHeight(int row, double height)
TableShape
setRowHeight
in interface
TableShape<HSLFShape,HSLFTextParagraph>
(接口 TableShape 中的 setRowHeight
row
- the row index (0-based)
(row - 行索引(从 0 开始))
height
- the height to set (in points)
(height - 要设置的高度(以磅为单位))
public double getColumnWidth(int col)
TableShape
getColumnWidth
in interface
TableShape<HSLFShape,HSLFTextParagraph>
(接口 TableShape 中的 getColumnWidth
col
- the column index (0-based)
(col - 列索引(从 0 开始))
public void setColumnWidth(int col, double width)
TableShape
setColumnWidth
in interface
TableShape<HSLFShape,HSLFTextParagraph>
(接口 TableShape 中的 setColumnWidth
col
- the column index (0-based)
(col - 列索引(从 0 开始))
width
- the width (in points)
(width - 宽度(以磅为单位))
protected HSLFTableCell getRelativeCell(HSLFTableCell origin, int row, int col)
protected void moveAndScale(java.awt.geom.Rectangle2D anchorDest)
HSLFGroupShape
ShapeGroup
to the specified anchor.
(将此 ShapeGroup 移动并缩放到指定的锚点。)
moveAndScale
in class
HSLFGroupShape
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.