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:
- java.lang.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
- Author:
- Yegor Kozlov
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFTextShape |
afterInsert, appendText, getBottomInset, getEscherTextboxWrapper, getHyperlinks, getInsets, getLeftInset, getMetroShape, getPlaceholderAtom, getRawText, getRightInset, getRunType, getText, getTextDirection, getTextHeight, getTextId, getTextParagraphs, getTextPlaceholder, getTextRotation, getTopInset, getVerticalAlignment, getWordWrap, getWordWrapEx, isAlignToBaseline, isHorizontalCentered, isPlaceholder, iterator, resizeToFitText, setAlignToBaseline, setBottomInset, setHorizontalCentered, setHyperlink, setInsets, setLeftInset, setRightInset, setRunType, setSheet, setText, setTextDirection, setTextId, setTextPlaceholder, setTextRotation, setTopInset, setVerticalAlignment, setWordWrap, setWordWrapEx, storeText |
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape |
getAdjustValue, getClientDataRecord, getClientRecords, getFillColor, getGeometry, getLineCap, getLineColor, getLineCompound, getLineDash, getLineDecoration, getLineHeadDecoration, getLineHeadLength, getLineHeadWidth, getLineTailDecoration, getLineTailLength, getLineTailWidth, getLineWidth, getShadow, getShadowAngle, getShadowColor, getShadowDistance, getStrokeStyle, setFillColor, setHyperlink, setLineCap, setLineColor, setLineCompound, setLineDash, setLineHeadDecoration, setLineHeadLength, setLineHeadWidth, setLineTailDecoration, setLineTailLength, setLineTailWidth, setLineWidth, setPlaceholder, setStrokeStyle, updateClientData |
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFShape |
draw, getAnchor, getEscherChild, getEscherChild, getEscherOptRecord, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getFillStyle, getFlipHorizontal, getFlipVertical, getHyperlink, getRotation, getShapeId, getShapeName, getShapeType, getSheet, getSpContainer, moveTo, 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.usermodel.TextShape |
getInsets, getTextDirection, getTextHeight, getTextParagraphs, getTextPlaceholder, getTextRotation, getVerticalAlignment, getWordWrap, isHorizontalCentered, setHorizontalCentered, setInsets, setText, setTextDirection, setTextPlaceholder, setTextRotation, setVerticalAlignment, setWordWrap |
Methods inherited from interface org.apache.poi.sl.usermodel.SimpleShape |
getFillColor, getFillStyle, getGeometry, getLineDecoration, getShadow, getShapeType, getStrokeStyle, isPlaceholder, setFillColor, setShapeType, setStrokeStyle |
Methods inherited from interface java.lang.Iterable |
iterator |
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
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.
createSpContainer
protected EscherContainerRecord createSpContainer(boolean isChild)
- Description copied from class:
HSLFTextBox
- Create a new TextBox and initialize its internal structures
- Overrides:
createSpContainer
in class HSLFTextBox
- Parameters:
isChild
- true
if the Line is inside a group, false
otherwise
- Returns:
- the created
EscherContainerRecord
which holds shape data
setAnchor
public void setAnchor(java.awt.geom.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 interface PlaceableShape<HSLFShape,HSLFTextParagraph>
- Overrides:
setAnchor
in class HSLFShape
- Parameters:
anchor
- new anchor
getBorderStyle
public StrokeStyle getBorderStyle(TableCell.BorderEdge edge)
- Description copied from interface:
TableCell
- Return line style of given edge or
null
if border is not defined
- Specified by:
getBorderStyle
in interface TableCell<HSLFShape,HSLFTextParagraph>
- Parameters:
edge
- the border edge
- Returns:
- line style of given edge or
null
if border is not defined
setBorderStyle
public void setBorderStyle(TableCell.BorderEdge edge,
StrokeStyle style)
- Description copied from interface:
TableCell
- Sets the
StrokeStyle
of the given border edge.
A null
property of the style is ignored.
- Specified by:
setBorderStyle
in interface TableCell<HSLFShape,HSLFTextParagraph>
- Parameters:
edge
- border edgestyle
- the new stroke style
getBorderWidth
public java.lang.Double getBorderWidth(TableCell.BorderEdge edge)
setBorderWidth
public void setBorderWidth(TableCell.BorderEdge edge,
double width)
- Description copied from interface:
TableCell
- Convenience method for setting the border width.
- Specified by:
setBorderWidth
in interface TableCell<HSLFShape,HSLFTextParagraph>
- Parameters:
edge
- border edgewidth
- the new border width
getBorderColor
public java.awt.Color getBorderColor(TableCell.BorderEdge edge)
setBorderColor
public void setBorderColor(TableCell.BorderEdge edge,
java.awt.Color color)
- Description copied from interface:
TableCell
- Convenience method for setting the border color.
- Specified by:
setBorderColor
in interface TableCell<HSLFShape,HSLFTextParagraph>
- Parameters:
edge
- border edgecolor
- the new border color
getBorderDash
public StrokeStyle.LineDash getBorderDash(TableCell.BorderEdge edge)
setBorderDash
public void setBorderDash(TableCell.BorderEdge edge,
StrokeStyle.LineDash dash)
- Description copied from interface:
TableCell
- Convenience method for setting the border line dash.
- Specified by:
setBorderDash
in interface TableCell<HSLFShape,HSLFTextParagraph>
- Parameters:
edge
- border edgedash
- the new border line dash
getBorderCompound
public StrokeStyle.LineCompound getBorderCompound(TableCell.BorderEdge edge)
setBorderCompound
public void setBorderCompound(TableCell.BorderEdge edge,
StrokeStyle.LineCompound compound)
- Description copied from interface:
TableCell
- Convenience method for setting the border line compound.
- Specified by:
setBorderCompound
in interface TableCell<HSLFShape,HSLFTextParagraph>
- Parameters:
edge
- border edgecompound
- the new border line compound
addLine
protected HSLFLine addLine(TableCell.BorderEdge edge)
removeBorder
public void removeBorder(TableCell.BorderEdge edge)
- Description copied from interface:
TableCell
- Remove all line attributes of the given border edge
- Specified by:
removeBorder
in interface TableCell<HSLFShape,HSLFTextParagraph>
- Parameters:
edge
- the border edge to be cleared
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 interface PlaceableShape<HSLFShape,HSLFTextParagraph>
- Specified by:
getParent
in interface Shape<HSLFShape,HSLFTextParagraph>
- Overrides:
getParent
in class HSLFShape
- Returns:
- the parent of this shape
Copyright 2015 The Apache Software Foundation or
its licensors, as applicable.