Package org.apache.poi.hslf.usermodel
Class HSLFTable
- java.lang.Object
-
- org.apache.poi.hslf.usermodel.HSLFShape
-
- org.apache.poi.hslf.usermodel.HSLFGroupShape
-
- org.apache.poi.hslf.usermodel.HSLFTable
-
- All Implemented Interfaces:
java.lang.Iterable<HSLFShape>
,HSLFShapeContainer
,GroupShape<HSLFShape,HSLFTextParagraph>
,PlaceableShape<HSLFShape,HSLFTextParagraph>
,Shape<HSLFShape,HSLFTextParagraph>
,ShapeContainer<HSLFShape,HSLFTextParagraph>
,TableShape<HSLFShape,HSLFTextParagraph>
public final class HSLFTable extends HSLFGroupShape implements HSLFShapeContainer, TableShape<HSLFShape,HSLFTextParagraph>
Represents a table in a PowerPoint presentation
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HSLFTableCell
getCell(int row, int col)
Gets a celldouble
getColumnWidth(int col)
Gets the width (in points) of the n-th columnint
getNumberOfColumns()
Return the maximum number of columns.int
getNumberOfRows()
Return the number of rowsdouble
getRowHeight(int row)
Gets the row heightvoid
setColumnWidth(int col, double width)
Sets the width (in points) of the n-th columnvoid
setRowHeight(int row, double height)
Sets the row height.void
setSheet(HSLFSheet sheet)
Assign theSlideShow
this shape belongs to-
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFGroupShape
addShape, createAutoShape, createConnector, createFreeform, createGroup, createOleShape, createPicture, createTable, createTextBox, getAnchor, getEscherChild, getHyperlink, getInteriorAnchor, getShapes, getShapeType, iterator, removeShape, setAnchor, setInteriorAnchor
-
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFShape
draw, getClientDataRecord, getEscherChild, getEscherChild, getEscherChild, getEscherOptRecord, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getFillStyle, getFlipHorizontal, getFlipVertical, getParent, getRotation, getShapeId, getShapeName, getSheet, getSpContainer, isPlaceholder, moveTo, setEscherProperty, setEscherProperty, setFlipHorizontal, setFlipVertical, setRotation, setShapeId, setShapeType
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.hslf.usermodel.HSLFShapeContainer
createAutoShape, createConnector, createFreeform, createGroup, createOleShape, createPicture, createTextBox
-
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotation
-
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
draw, getAnchor, getParent, getShapeId, getShapeName, getSheet
-
Methods inherited from interface org.apache.poi.sl.usermodel.ShapeContainer
addShape, createTable, getShapes, removeShape
-
-
-
-
Method Detail
-
getCell
public HSLFTableCell getCell(int row, int col)
Description copied from interface:TableShape
Gets a cell- Specified by:
getCell
in interfaceTableShape<HSLFShape,HSLFTextParagraph>
- Parameters:
row
- the row index (0-based)col
- the column index (0-based)- Returns:
- the cell or null if the cell doesn't exists, e.g. when accessing a merged cell or if the index is out of bounds
-
getNumberOfColumns
public int getNumberOfColumns()
Description copied from interface:TableShape
Return the maximum number of columns. If the table contains merged cells, the number of columns might be less than the maximum.- Specified by:
getNumberOfColumns
in interfaceTableShape<HSLFShape,HSLFTextParagraph>
- Returns:
- the maximum number of column
-
getNumberOfRows
public int getNumberOfRows()
Description copied from interface:TableShape
Return the number of rows- Specified by:
getNumberOfRows
in interfaceTableShape<HSLFShape,HSLFTextParagraph>
- Returns:
- the row count
-
setSheet
public void setSheet(HSLFSheet sheet)
Assign theSlideShow
this shape belongs to
-
getRowHeight
public double getRowHeight(int row)
Description copied from interface:TableShape
Gets the row height- Specified by:
getRowHeight
in interfaceTableShape<HSLFShape,HSLFTextParagraph>
- Parameters:
row
- the row index (0-based)- Returns:
- the height (in points)
-
setRowHeight
public void setRowHeight(int row, double height)
Description copied from interface:TableShape
Sets the row height.- Specified by:
setRowHeight
in interfaceTableShape<HSLFShape,HSLFTextParagraph>
- Parameters:
row
- the row index (0-based)height
- the height to set (in points)
-
getColumnWidth
public double getColumnWidth(int col)
Description copied from interface:TableShape
Gets the width (in points) of the n-th column- Specified by:
getColumnWidth
in interfaceTableShape<HSLFShape,HSLFTextParagraph>
- Parameters:
col
- the column index (0-based)- Returns:
- the width (in points)
-
setColumnWidth
public void setColumnWidth(int col, double width)
Description copied from interface:TableShape
Sets the width (in points) of the n-th column- Specified by:
setColumnWidth
in interfaceTableShape<HSLFShape,HSLFTextParagraph>
- Parameters:
col
- the column index (0-based)width
- the width (in points)
-
-