org.apache.poi.xslf.usermodel
Class XSLFTableCell

java.lang.Object
  extended by org.apache.poi.xslf.usermodel.XSLFShape
      extended by org.apache.poi.xslf.usermodel.XSLFSimpleShape
          extended by org.apache.poi.xslf.usermodel.XSLFTextShape
              extended by org.apache.poi.xslf.usermodel.XSLFTableCell
All Implemented Interfaces:
java.lang.Iterable<XSLFTextParagraph>, IAdjustableShape, PlaceableShape<XSLFShape,XSLFTextParagraph>, Shape<XSLFShape,XSLFTextParagraph>, SimpleShape<XSLFShape,XSLFTextParagraph>, TableCell<XSLFShape,XSLFTextParagraph>, TextShape<XSLFShape,XSLFTextParagraph>

public class XSLFTableCell
extends XSLFTextShape
implements TableCell<XSLFShape,XSLFTextParagraph>

Represents a cell of a table in a .pptx presentation


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
 
Method Summary
 StrokeStyle.LineCap getBorderCap(TableCell.BorderEdge edge)
           
 java.awt.Color getBorderColor(TableCell.BorderEdge edge)
           
 StrokeStyle.LineCompound getBorderCompound(TableCell.BorderEdge edge)
           
 StrokeStyle.LineDash getBorderDash(TableCell.BorderEdge edge)
           
 StrokeStyle getBorderStyle(TableCell.BorderEdge edge)
          Return line style of given edge or null if border is not defined
 java.lang.Double getBorderWidth(TableCell.BorderEdge edge)
           
protected  org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties getCellProperties(boolean create)
           
 java.awt.Color getFillColor()
          Returns the solid color fill.
protected  org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody getTextBody(boolean create)
           
 VerticalAlignment getVerticalAlignment()
          Returns the type of vertical alignment for the text.
 void removeBorder(TableCell.BorderEdge edge)
          Remove all line attributes of the given border edge
 void setBorderCap(TableCell.BorderEdge edge, StrokeStyle.LineCap cap)
           
 void setBorderColor(TableCell.BorderEdge edge, java.awt.Color color)
          Convenience method for setting the border color.
 void setBorderCompound(TableCell.BorderEdge edge, StrokeStyle.LineCompound compound)
          Convenience method for setting the border line compound.
 void setBorderDash(TableCell.BorderEdge edge, StrokeStyle.LineDash dash)
          Convenience method for setting the border line dash.
 void setBorderStyle(TableCell.BorderEdge edge, StrokeStyle style)
          Sets the StrokeStyle of the given border edge.
 void setBorderWidth(TableCell.BorderEdge edge, double width)
          Convenience method for setting the border width.
 void setBottomInset(double margin)
          Sets the bottom margin.
 void setFillColor(java.awt.Color color)
          Specifies a solid color fill.
 void setLeftInset(double margin)
          Sets the left margin.
 void setRightInset(double margin)
          Sets the right margin.
 void setTopInset(double margin)
          Sets the top margin.
 void setVerticalAlignment(VerticalAlignment anchor)
          Sets the type of vertical alignment for the text.
 
Methods inherited from class org.apache.poi.xslf.usermodel.XSLFTextShape
addNewTextParagraph, appendText, clearText, getBottomInset, getInsets, getLeftInset, getRightInset, getText, getTextAutofit, getTextBodyPr, getTextBodyPr, getTextDirection, getTextHeight, getTextParagraphs, getTextPlaceholder, getTextRotation, getTextType, getTopInset, getWordWrap, isHorizontalCentered, iterator, resizeToFitText, setHorizontalCentered, setInsets, setPlaceholder, setText, setTextAutofit, setTextDirection, setTextPlaceholder, setTextRotation, setWordWrap
 
Methods inherited from class org.apache.poi.xslf.usermodel.XSLFSimpleShape
createHyperlink, getAdjustValue, getAnchor, getFillStyle, getFlipHorizontal, getFlipVertical, getGeometry, getHyperlink, getLineCap, getLineColor, getLineCompound, getLineDash, getLineDecoration, getLineHeadDecoration, getLineHeadLength, getLineHeadWidth, getLinePaint, getLineTailDecoration, getLineTailLength, getLineTailWidth, getLineWidth, getRotation, getSafeXfrm, getShadow, getShapeType, getStrokeStyle, getXfrm, isPlaceholder, setAnchor, setFlipHorizontal, setFlipVertical, setLineCap, setLineColor, setLineCompound, setLineDash, setLineHeadDecoration, setLineHeadLength, setLineHeadWidth, setLineTailDecoration, setLineTailLength, setLineTailWidth, setLineWidth, setRotation, setShapeType, setStrokeStyle
 
Methods inherited from class org.apache.poi.xslf.usermodel.XSLFShape
draw, fetchShapeProperty, getBgPr, getBgRef, getCNvPr, getCTPlaceholder, getFillPaint, getGrpSpPr, getPaint, getParent, getPlaceholder, getShapeId, getShapeName, getSheet, getSpPr, getSpStyle, getXmlObject, selectPaint, selectPaint, selectPaint, selectPaint, selectPaint, selectProperty, setParent
 
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
appendText, getInsets, getText, getTextDirection, getTextHeight, getTextParagraphs, getTextPlaceholder, getTextRotation, getWordWrap, isHorizontalCentered, setHorizontalCentered, setInsets, setText, setTextDirection, setTextPlaceholder, setTextRotation, setWordWrap
 
Methods inherited from interface org.apache.poi.sl.usermodel.SimpleShape
createHyperlink, getFillStyle, getGeometry, getHyperlink, getLineDecoration, getPlaceholder, getShadow, getShapeType, getStrokeStyle, setPlaceholder, setShapeType, setStrokeStyle
 
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
draw, 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, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotation
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getTextBody

protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody getTextBody(boolean create)
Specified by:
getTextBody in class XSLFTextShape

getCellProperties

protected org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties getCellProperties(boolean create)

setLeftInset

public void setLeftInset(double margin)
Description copied from class: XSLFTextShape
Sets the left margin.

Overrides:
setLeftInset in class XSLFTextShape
Parameters:
margin - the left margin
See Also:
XSLFTextShape.getLeftInset()

setRightInset

public void setRightInset(double margin)
Description copied from class: XSLFTextShape
Sets the right margin.

Overrides:
setRightInset in class XSLFTextShape
Parameters:
margin - the right margin
See Also:
XSLFTextShape.getRightInset()

setTopInset

public void setTopInset(double margin)
Description copied from class: XSLFTextShape
Sets the top margin.

Overrides:
setTopInset in class XSLFTextShape
Parameters:
margin - the top margin
See Also:
XSLFTextShape.getTopInset()

setBottomInset

public void setBottomInset(double margin)
Description copied from class: XSLFTextShape
Sets the bottom margin.

Overrides:
setBottomInset in class XSLFTextShape
Parameters:
margin - the bottom margin
See Also:
XSLFTextShape.getBottomInset()

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<XSLFShape,XSLFTextParagraph>
Parameters:
edge - the border edge to be cleared

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<XSLFShape,XSLFTextParagraph>
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<XSLFShape,XSLFTextParagraph>
Parameters:
edge - border edge
style - 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<XSLFShape,XSLFTextParagraph>
Parameters:
edge - border edge
width - the new border width

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<XSLFShape,XSLFTextParagraph>
Parameters:
edge - border edge
color - the new border color

getBorderColor

public java.awt.Color getBorderColor(TableCell.BorderEdge edge)

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<XSLFShape,XSLFTextParagraph>
Parameters:
edge - border edge
compound - the new border line compound

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<XSLFShape,XSLFTextParagraph>
Parameters:
edge - border edge
dash - the new border line dash

getBorderCap

public StrokeStyle.LineCap getBorderCap(TableCell.BorderEdge edge)

setBorderCap

public void setBorderCap(TableCell.BorderEdge edge,
                         StrokeStyle.LineCap cap)

setFillColor

public void setFillColor(java.awt.Color color)
Specifies a solid color fill. The shape is filled entirely with the specified color.

Specified by:
setFillColor in interface SimpleShape<XSLFShape,XSLFTextParagraph>
Overrides:
setFillColor in class XSLFSimpleShape
Parameters:
color - the solid color fill. The value of null unsets the solidFIll attribute from the underlying xml

getFillColor

public java.awt.Color getFillColor()
Description copied from interface: SimpleShape
Returns the solid color fill.

Specified by:
getFillColor in interface SimpleShape<XSLFShape,XSLFTextParagraph>
Overrides:
getFillColor in class XSLFSimpleShape
Returns:
solid fill color of null if not set

setVerticalAlignment

public void setVerticalAlignment(VerticalAlignment anchor)
Description copied from interface: TextShape
Sets the type of vertical alignment for the text.

Specified by:
setVerticalAlignment in interface TextShape<XSLFShape,XSLFTextParagraph>
Overrides:
setVerticalAlignment in class XSLFTextShape
Parameters:
anchor - - the type of alignment. A null values unsets this property.

getVerticalAlignment

public VerticalAlignment getVerticalAlignment()
Description copied from interface: TextShape
Returns the type of vertical alignment for the text.

Specified by:
getVerticalAlignment in interface TextShape<XSLFShape,XSLFTextParagraph>
Overrides:
getVerticalAlignment in class XSLFTextShape
Returns:
the type of vertical alignment


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