public class XSLFTable extends XSLFGraphicFrame implements java.lang.Iterable<XSLFTableRow>, TableShape<XSLFShape,XSLFTextParagraph>
Modifier and Type | Method and Description |
---|---|
XSLFTableRow |
addRow() |
XSLFTableCell |
getCell(int row,
int col)
Gets a cell
|
double |
getColumnWidth(int idx)
Gets the width (in points) of the n-th column
|
org.openxmlformats.schemas.drawingml.x2006.main.CTTable |
getCTTable() |
int |
getNumberOfColumns()
Return the maximum number of columns.
|
int |
getNumberOfRows()
Return the number of rows
|
double |
getRowHeight(int row)
Gets the row height
|
java.util.List<XSLFTableRow> |
getRows() |
protected XSLFTableStyle |
getTableStyle()
Get assigned TableStyle
|
java.util.Iterator<XSLFTableRow> |
iterator() |
void |
mergeCells(int firstRow,
int lastRow,
int firstCol,
int lastCol)
Merge cells of a table
|
void |
setColumnWidth(int idx,
double width)
Sets the width (in points) of the n-th column
|
void |
setRowHeight(int row,
double height)
Sets the row height.
|
getAnchor, getFallbackPicture, getFlipHorizontal, getFlipVertical, getRotation, getShapeType, setAnchor, setFlipHorizontal, setFlipVertical, setRotation
draw, fetchShapeProperty, getBgPr, getBgRef, getChild, getCNvPr, getCTPlaceholder, getFillPaint, getGrpSpPr, getParent, getPlaceholder, getShapeId, getShapeName, getShapeProperties, getSheet, getSpStyle, getXmlObject, selectPaint, selectPaint, selectPaint, selectPaint, selectPaint, selectProperty, setParent, setPlaceholder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
draw, getAnchor, getParent, getSheet
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotation
public XSLFTableCell getCell(int row, int col)
TableShape
getCell
in interface TableShape<XSLFShape,XSLFTextParagraph>
row
- the row index (0-based)col
- the column index (0-based)@Internal public org.openxmlformats.schemas.drawingml.x2006.main.CTTable getCTTable()
public int getNumberOfColumns()
TableShape
getNumberOfColumns
in interface TableShape<XSLFShape,XSLFTextParagraph>
public int getNumberOfRows()
TableShape
getNumberOfRows
in interface TableShape<XSLFShape,XSLFTextParagraph>
public double getColumnWidth(int idx)
TableShape
getColumnWidth
in interface TableShape<XSLFShape,XSLFTextParagraph>
idx
- the column index (0-based)public void setColumnWidth(int idx, double width)
TableShape
setColumnWidth
in interface TableShape<XSLFShape,XSLFTextParagraph>
idx
- the column index (0-based)width
- the width (in points)public double getRowHeight(int row)
TableShape
getRowHeight
in interface TableShape<XSLFShape,XSLFTextParagraph>
row
- the row index (0-based)public void setRowHeight(int row, double height)
TableShape
setRowHeight
in interface TableShape<XSLFShape,XSLFTextParagraph>
row
- the row index (0-based)height
- the height to set (in points)public java.util.Iterator<XSLFTableRow> iterator()
iterator
in interface java.lang.Iterable<XSLFTableRow>
public java.util.List<XSLFTableRow> getRows()
public XSLFTableRow addRow()
public void mergeCells(int firstRow, int lastRow, int firstCol, int lastCol)
protected XSLFTableStyle getTableStyle()
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.