org.apache.poi.hslf.usermodel
Class HSLFTableCell

java.lang.Object
  extended by org.apache.poi.hslf.usermodel.HSLFShape
      extended by org.apache.poi.hslf.usermodel.HSLFSimpleShape
          extended by org.apache.poi.hslf.usermodel.HSLFTextShape
              extended by org.apache.poi.hslf.usermodel.HSLFTextBox
                  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.poi.sl.usermodel.TextShape
TextShape.TextAutofit, TextShape.TextDirection
 
Field Summary
protected static int DEFAULT_HEIGHT
           
protected static int DEFAULT_WIDTH
           
 
Fields inherited from class org.apache.poi.hslf.usermodel.HSLFTextShape
_frc, _paragraphs, _txtbox, WrapByPoints, WrapNone, WrapSquare, WrapThrough, WrapTopBottom
 
Fields inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
_clientData, _clientRecords, DEFAULT_LINE_WIDTH
 
Fields inherited from class org.apache.poi.hslf.usermodel.HSLFShape
_escherContainer, _fill, _parent, _sheet, logger
 
Constructor Summary
protected HSLFTableCell(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
          Create a TableCell object and initialize it from the supplied Record container.
  HSLFTableCell(ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
          Create a new TableCell.
 
Method Summary
protected  void anchorBorder(int type, HSLFLine line)
           
protected  EscherContainerRecord createSpContainer(boolean isChild)
          Create a new TextBox and initialize its internal structures
 HSLFLine getBorderBottom()
           
 HSLFLine getBorderLeft()
           
 HSLFLine getBorderRight()
           
 HSLFLine getBorderTop()
           
 void setAnchor(java.awt.Rectangle anchor)
          Sets the anchor (the bounding box rectangle) of this shape.
 void setBorderBottom(HSLFLine line)
           
 void setBorderLeft(HSLFLine line)
           
 void setBorderRight(HSLFLine line)
           
 void setBorderTop(HSLFLine line)
           
 
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, getHyperlinks, getInsets, getLeftInset, getPlaceholderAtom, getRawText, getRightInset, getRunType, getText, getTextDirection, getTextHeight, getTextId, getTextParagraphs, getTopInset, getVerticalAlignment, getWordWrap, getWordWrapEx, isAlignToBaseline, isHorizontalCentered, isPlaceholder, iterator, resizeToFitText, setAlignToBaseline, setBottomInset, setHorizontalCentered, setHyperlink, setLeftInset, setRightInset, setRunType, setSheet, setText, setTextId, setTopInset, setVerticalAlignment, setWordWrap, storeText
 
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
getAdjustValue, getClientDataRecord, getClientRecords, getFillColor, getGeometry, getLineColor, getLineCompound, getLineDashing, getLineDecoration, getLineWidth, getShadow, getShadowAngle, getShadowColor, getShadowDistance, getStrokeStyle, setFillColor, setHyperlink, setLineColor, setLineCompound, setLineDashing, setLineWidth, updateClientData
 
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFShape
draw, getAnchor, getEscherChild, getEscherChild, getEscherOptRecord, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getFillStyle, getFlipHorizontal, getFlipVertical, getHyperlink, getParent, 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, getVerticalAlignment, getWordWrap, isHorizontalCentered
 
Methods inherited from interface org.apache.poi.sl.usermodel.SimpleShape
getFillStyle, getGeometry, getLineDecoration, getShadow, getShapeType, getStrokeStyle, isPlaceholder
 
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
getAnchor, getParent, getSheet
 
Methods inherited from interface org.apache.poi.sl.draw.geom.IAdjustableShape
getAdjustValue
 
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, setFlipHorizontal, setFlipVertical, setRotation
 
Methods inherited from interface java.lang.Iterable
iterator
 

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,
                        ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
Create a TableCell object and initialize it from the supplied Record container.

Parameters:
escherRecord - EscherSpContainer which holds information about this shape
parent - the parent of the shape

HSLFTableCell

public HSLFTableCell(ShapeContainer<HSLFShape,HSLFTextParagraph> 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 class HSLFTextBox
Parameters:
isChild - true if the Line is inside a group, false otherwise
Returns:
the created EscherContainerRecord which holds shape data

anchorBorder

protected void anchorBorder(int type,
                            HSLFLine line)

getBorderLeft

public HSLFLine getBorderLeft()

setBorderLeft

public void setBorderLeft(HSLFLine line)

getBorderRight

public HSLFLine getBorderRight()

setBorderRight

public void setBorderRight(HSLFLine line)

getBorderTop

public HSLFLine getBorderTop()

setBorderTop

public void setBorderTop(HSLFLine line)

getBorderBottom

public HSLFLine getBorderBottom()

setBorderBottom

public void setBorderBottom(HSLFLine line)

setAnchor

public void setAnchor(java.awt.Rectangle 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


Copyright 2015 The Apache Software Foundation or its licensors, as applicable.