Package org.apache.poi.hslf.usermodel
Class HSLFTableCell
- java.lang.Object
-
- org.apache.poi.hslf.usermodel.HSLFShape
-
- org.apache.poi.hslf.usermodel.HSLFSimpleShape
-
- org.apache.poi.hslf.usermodel.HSLFTextShape
-
- org.apache.poi.hslf.usermodel.HSLFTextBox
-
- org.apache.poi.hslf.usermodel.HSLFTableCell
-
- All Implemented Interfaces:
Iterable<HSLFTextParagraph>
,IAdjustableShape
,AutoShape<HSLFShape,HSLFTextParagraph>
,PlaceableShape<HSLFShape,HSLFTextParagraph>
,Shape<HSLFShape,HSLFTextParagraph>
,SimpleShape<HSLFShape,HSLFTextParagraph>
,TableCell<HSLFShape,HSLFTextParagraph>
,TextBox<HSLFShape,HSLFTextParagraph>
,TextShape<HSLFShape,HSLFTextParagraph>
public final class HSLFTableCell extends HSLFTextBox implements TableCell<HSLFShape,HSLFTextParagraph>
Represents a cell in a ppt table
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.poi.sl.usermodel.TableCell
TableCell.BorderEdge
-
Nested classes/interfaces inherited from interface org.apache.poi.sl.usermodel.TextShape
TextShape.TextAutofit, TextShape.TextDirection, TextShape.TextPlaceholder
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
DEFAULT_HEIGHT
protected static int
DEFAULT_WIDTH
-
Fields inherited from class org.apache.poi.hslf.usermodel.HSLFTextShape
WrapByPoints, WrapNone, WrapSquare, WrapThrough, WrapTopBottom
-
Fields inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
_hyperlink, ADJUST_VALUES, DEFAULT_LINE_WIDTH
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HSLFTableCell(EscherContainerRecord escherRecord, HSLFTable parent)
Create a TableCell object and initialize it from the supplied Record container.HSLFTableCell(HSLFTable parent)
Create a new TableCell.
-
Method Summary
-
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFTextBox
setDefaultTextProperties
-
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFTextShape
afterInsert, appendText, getBottomInset, getEscherTextboxWrapper, getHFPlaceholderAtom, getHyperlinks, getInsets, getLeftInset, getMetroShape, getPlaceholderAtom, getRawText, getRightInset, getRunType, getText, getTextDirection, getTextHeight, getTextHeight, getTextId, getTextParagraphs, getTextPlaceholder, getTextRotation, getTopInset, getVerticalAlignment, getWordWrap, getWordWrapEx, isAlignToBaseline, isHorizontalCentered, isPlaceholder, iterator, resizeToFitText, resizeToFitText, setAlignToBaseline, setBottomInset, setHorizontalCentered, setInsets, setLeftInset, setRightInset, setRunType, setSheet, setText, setTextDirection, setTextId, setTextPlaceholder, setTextRotation, setTopInset, setVerticalAlignment, setWordWrap, setWordWrapEx, spliterator, storeText
-
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
createHyperlink, getAdjustValue, getFillColor, getGeometry, getHyperlink, getLineBackgroundColor, getLineCap, getLineColor, getLineCompound, getLineDash, getLineDecoration, getLineHeadDecoration, getLineHeadLength, getLineHeadWidth, getLineTailDecoration, getLineTailLength, getLineTailWidth, getLineWidth, getPlaceholder, getPlaceholderDetails, getShadow, getShadowAngle, getShadowColor, getShadowDistance, getStrokeStyle, setFillColor, setHyperlink, setLineBackgroundColor, setLineCap, setLineColor, setLineCompound, setLineDash, setLineHeadDecoration, setLineHeadLength, setLineHeadWidth, setLineTailDecoration, setLineTailLength, setLineTailWidth, setLineWidth, setPlaceholder, setStrokeStyle
-
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFShape
draw, getAnchor, getClientData, getClientDataRecord, getClientRecords, getEscherChild, getEscherChild, getEscherChild, getEscherChild, getEscherOptRecord, getEscherProperty, getEscherProperty, getEscherProperty, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getFillStyle, getFlipHorizontal, getFlipVertical, getRotation, getShapeId, getShapeName, getShapeType, getSheet, getSpContainer, moveTo, setEscherProperty, setEscherProperty, setEscherProperty, setEscherProperty, setEscherProperty, setFlipHorizontal, setFlipVertical, setRotation, setShapeId, setShapeType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.sl.draw.geom.IAdjustableShape
getAdjustValue
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getAnchor, getFlipHorizontal, getFlipVertical, getRotation, getSheet, setFlipHorizontal, setFlipVertical, setRotation
-
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
draw, getAnchor, getShapeId, getShapeName, getSheet
-
Methods inherited from interface org.apache.poi.sl.usermodel.SimpleShape
createHyperlink, getFillColor, getFillStyle, getGeometry, getHyperlink, getLineDecoration, getPlaceholder, getPlaceholderDetails, getShadow, getShapeType, getStrokeStyle, isPlaceholder, setFillColor, setPlaceholder, setShapeType, setStrokeStyle
-
Methods inherited from interface org.apache.poi.sl.usermodel.TextShape
appendText, getInsets, getText, getTextDirection, getTextHeight, getTextHeight, getTextParagraphs, getTextPlaceholder, getTextRotation, getVerticalAlignment, getWordWrap, isHorizontalCentered, resizeToFitText, resizeToFitText, setHorizontalCentered, setInsets, setText, setTextDirection, setTextPlaceholder, setTextRotation, setVerticalAlignment, setWordWrap
-
-
-
-
Field Detail
-
DEFAULT_WIDTH
protected static final int DEFAULT_WIDTH
- See Also:
- Constant Field Values
-
DEFAULT_HEIGHT
protected static final int DEFAULT_HEIGHT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HSLFTableCell
protected HSLFTableCell(EscherContainerRecord escherRecord, HSLFTable parent)
Create a TableCell object and initialize it from the supplied Record container.- Parameters:
escherRecord
- EscherSpContainer which holds information about this shapeparent
- the parent of the shape
-
HSLFTableCell
public HSLFTableCell(HSLFTable parent)
Create a new TableCell. This constructor is used when a new shape is created.- Parameters:
parent
- the parent of this Shape. For example, if this text box is a cell in a table then the parent is Table.
-
-
Method Detail
-
createSpContainer
protected EscherContainerRecord createSpContainer(boolean isChild)
Description copied from class:HSLFTextBox
Create a new TextBox and initialize its internal structures- Overrides:
createSpContainer
in classHSLFTextBox
- Parameters:
isChild
-true
if the Line is inside a group,false
otherwise- Returns:
- the created
EscherContainerRecord
which holds shape data
-
setAnchor
public void setAnchor(Rectangle2D anchor)
Description copied from class:HSLFShape
Sets the anchor (the bounding box rectangle) of this shape. All coordinates should be expressed in points (72 dpi).- Specified by:
setAnchor
in interfacePlaceableShape<HSLFShape,HSLFTextParagraph>
- Overrides:
setAnchor
in classHSLFShape
- Parameters:
anchor
- new anchor
-
getBorderStyle
public StrokeStyle getBorderStyle(TableCell.BorderEdge edge)
- Specified by:
getBorderStyle
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
setBorderStyle
public void setBorderStyle(TableCell.BorderEdge edge, StrokeStyle style)
- Specified by:
setBorderStyle
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
getBorderWidth
public Double getBorderWidth(TableCell.BorderEdge edge)
-
setBorderWidth
public void setBorderWidth(TableCell.BorderEdge edge, double width)
- Specified by:
setBorderWidth
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
getBorderColor
public Color getBorderColor(TableCell.BorderEdge edge)
-
setBorderColor
public void setBorderColor(TableCell.BorderEdge edge, Color color)
- Specified by:
setBorderColor
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
getBorderDash
public StrokeStyle.LineDash getBorderDash(TableCell.BorderEdge edge)
-
setBorderDash
public void setBorderDash(TableCell.BorderEdge edge, StrokeStyle.LineDash dash)
- Specified by:
setBorderDash
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
getBorderCompound
public StrokeStyle.LineCompound getBorderCompound(TableCell.BorderEdge edge)
-
setBorderCompound
public void setBorderCompound(TableCell.BorderEdge edge, StrokeStyle.LineCompound compound)
- Specified by:
setBorderCompound
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
addLine
protected HSLFLine addLine(TableCell.BorderEdge edge)
-
removeBorder
public void removeBorder(TableCell.BorderEdge edge)
- Specified by:
removeBorder
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
getSiblingCell
protected HSLFTableCell getSiblingCell(int row, int col)
-
applyLineProperties
protected void applyLineProperties(TableCell.BorderEdge edge, HSLFLine other)
-
getParent
public HSLFTable getParent()
- Specified by:
getParent
in interfacePlaceableShape<HSLFShape,HSLFTextParagraph>
- Specified by:
getParent
in interfaceShape<HSLFShape,HSLFTextParagraph>
- Overrides:
getParent
in classHSLFShape
- Returns:
- the parent of this shape
-
setGridSpan
protected void setGridSpan(int gridSpan)
Set the gridSpan (aka col-span)- Parameters:
gridSpan
- the number of columns to be spanned/merged- Since:
- POI 3.15-beta2
-
setRowSpan
protected void setRowSpan(int rowSpan)
Set the rowSpan- Parameters:
rowSpan
- the number of rows to be spanned/merged- Since:
- POI 3.15-beta2
-
getGridSpan
public int getGridSpan()
- Specified by:
getGridSpan
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
getRowSpan
public int getRowSpan()
- Specified by:
getRowSpan
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
isMerged
public boolean isMerged()
- Specified by:
isMerged
in interfaceTableCell<HSLFShape,HSLFTextParagraph>
-
-