@Beta public abstract class XSLFSheet extends org.apache.poi.ooxml.POIXMLDocumentPart implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph>
Modifier and Type | Method and Description |
---|---|
void |
addShape(XSLFShape shape) |
XSLFSheet |
appendContent(XSLFSheet src)
Append content to this sheet.
|
void |
clear()
Removes all of the elements from this container (optional operation).
|
XSLFAutoShape |
createAutoShape()
create a new shape with a predefined geometry and add it to this shape container
|
XSLFConnectorShape |
createConnector()
create a connector
|
XSLFFreeformShape |
createFreeform()
create a new shape with a custom geometry
|
XSLFGroupShape |
createGroup()
create a group of shapes belonging to this container
|
XSLFObjectShape |
createOleShape(PictureData pictureData)
Create a new OLE object shape with the given pictureData as preview image
|
XSLFPictureShape |
createPicture(PictureData pictureData)
create a picture belonging to this container
|
XSLFTable |
createTable() |
XSLFTable |
createTable(int numRows,
int numCols)
Create a new Table of the given number of rows and columns
|
XSLFTextBox |
createTextBox()
create a text box
|
void |
draw(Graphics2D graphics)
Render this sheet into the supplied graphics object
|
XSLFBackground |
getBackground() |
boolean |
getFollowMasterGraphics() |
XSLFTextShape |
getPlaceholder(int idx) |
XSLFSimpleShape |
getPlaceholder(Placeholder ph) |
XSLFPlaceholderDetails |
getPlaceholderDetails(Placeholder placeholder)
Get the placeholder details for the given placeholder type.
|
XSLFTextShape[] |
getPlaceholders() |
List<XSLFShape> |
getShapes()
Returns an array containing all of the shapes in this sheet
|
XMLSlideShow |
getSlideShow() |
XSLFTheme |
getTheme() |
abstract XmlObject |
getXmlObject() |
XSLFSheet |
importContent(XSLFSheet src)
Set the contents of this sheet to be a copy of the source sheet.
|
Iterator<XSLFShape> |
iterator()
Returns an iterator over the shapes in this sheet
|
boolean |
removeShape(XSLFShape xShape)
Removes the specified shape from this sheet, if it is present
(optional operation).
|
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, isCommited, isCommitted, setCommited, setCommitted, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMasterSheet
forEach, spliterator
public XMLSlideShow getSlideShow()
getSlideShow
in interface Sheet<XSLFShape,XSLFTextParagraph>
public abstract XmlObject getXmlObject()
public List<XSLFShape> getShapes()
getShapes
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
public XSLFAutoShape createAutoShape()
ShapeContainer
createAutoShape
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
createAutoShape
in interface XSLFShapeContainer
public XSLFFreeformShape createFreeform()
ShapeContainer
createFreeform
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
createFreeform
in interface XSLFShapeContainer
public XSLFTextBox createTextBox()
ShapeContainer
createTextBox
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
createTextBox
in interface XSLFShapeContainer
public XSLFConnectorShape createConnector()
ShapeContainer
createConnector
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
createConnector
in interface XSLFShapeContainer
public XSLFGroupShape createGroup()
ShapeContainer
createGroup
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
createGroup
in interface XSLFShapeContainer
public XSLFPictureShape createPicture(PictureData pictureData)
ShapeContainer
createPicture
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
createPicture
in interface XSLFShapeContainer
public XSLFTable createTable()
public XSLFTable createTable(int numRows, int numCols)
ShapeContainer
createTable
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
numRows
- the number of rowsnumCols
- the number of columnspublic XSLFObjectShape createOleShape(PictureData pictureData)
ShapeContainer
createOleShape
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
pictureData
- the preview imagepublic void addShape(XSLFShape shape)
addShape
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
public boolean removeShape(XSLFShape xShape)
removeShape
in interface ShapeContainer<XSLFShape,XSLFTextParagraph>
xShape
- shape to be removed from this sheet, if presentIllegalArgumentException
- if the type of the specified shape
is incompatible with this sheet (optional)public void clear()
clear
in interface XSLFShapeContainer
public XSLFSheet importContent(XSLFSheet src)
src
- the source sheet to copy data frompublic XSLFSheet appendContent(XSLFSheet src)
src
- the source sheetthis
.public XSLFTheme getTheme()
null
which means that this sheet is theme-less.
Sheets that support the notion of themes (slides, masters, layouts, etc.) should override this
method and return the corresponding package part.public XSLFSimpleShape getPlaceholder(Placeholder ph)
public XSLFTextShape getPlaceholder(int idx)
idx
- 0-based index of a placeholder in the sheetpublic XSLFTextShape[] getPlaceholders()
public boolean getFollowMasterGraphics()
getFollowMasterGraphics
in interface Sheet<XSLFShape,XSLFTextParagraph>
public XSLFBackground getBackground()
getBackground
in interface Sheet<XSLFShape,XSLFTextParagraph>
public void draw(Graphics2D graphics)
draw
in interface Sheet<XSLFShape,XSLFTextParagraph>
graphics
- the graphics context to draw topublic XSLFPlaceholderDetails getPlaceholderDetails(Placeholder placeholder)
Sheet
getPlaceholderDetails
in interface Sheet<XSLFShape,XSLFTextParagraph>
placeholder
- the placeholder typenull
, if the placeholder isn't contained in the sheetCopyright © 2010 - 2020 Adobe. All Rights Reserved