|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.POIXMLDocumentPart
org.apache.poi.xslf.usermodel.XSLFSheet
@Beta public abstract class XSLFSheet
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.poi.POIXMLDocumentPart |
|---|
POIXMLDocumentPart.RelationPart |
| Constructor Summary | |
|---|---|
XSLFSheet()
|
|
XSLFSheet(PackagePart part)
|
|
| Method Summary | |
|---|---|
void |
addShape(XSLFShape shape)
|
XSLFSheet |
appendContent(XSLFSheet src)
Append content to this sheet. |
protected static java.util.List<XSLFShape> |
buildShapes(org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape spTree,
XSLFSheet sheet)
|
protected boolean |
canDraw(XSLFShape shape)
Checks if this sheet displays the specified shape. |
void |
clear()
Removes all of the elements from this container (optional operation). |
protected void |
commit()
Save the content in the underlying package part. |
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 |
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(java.awt.Graphics2D graphics)
Render this sheet into the supplied graphics object |
XSLFBackground |
getBackground()
|
XSLFCommonSlideData |
getCommonSlideData()
|
boolean |
getFollowMasterGraphics()
|
XSLFTextShape |
getPlaceholder(int idx)
|
XSLFTextShape[] |
getPlaceholders()
|
protected abstract java.lang.String |
getRootElementName()
|
java.util.List<XSLFShape> |
getShapes()
Returns an array containing all of the shapes in this sheet |
XMLSlideShow |
getSlideShow()
|
protected org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape |
getSpTree()
|
protected XSLFTextShape |
getTextShapeByType(Placeholder type)
|
abstract org.apache.xmlbeans.XmlObject |
getXmlObject()
|
XSLFSheet |
importContent(XSLFSheet src)
Set the contents of this sheet to be a copy of the source sheet. |
java.util.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). |
protected void |
setCommonSlideData(org.openxmlformats.schemas.presentationml.x2006.main.CTCommonSlideData data)
|
| Methods inherited from class org.apache.poi.POIXMLDocumentPart |
|---|
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationParts, getRelations, getTargetPart, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.poi.sl.usermodel.Sheet |
|---|
getMasterSheet |
| Constructor Detail |
|---|
public XSLFSheet()
public XSLFSheet(PackagePart part)
| Method Detail |
|---|
public XMLSlideShow getSlideShow()
getSlideShow in interface Sheet<XSLFShape,XSLFTextParagraph>
protected static java.util.List<XSLFShape> buildShapes(org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape spTree,
XSLFSheet sheet)
public abstract org.apache.xmlbeans.XmlObject getXmlObject()
@Removal(version="3.18") @Internal public XSLFCommonSlideData getCommonSlideData()
@Removal(version="3.18") protected void setCommonSlideData(org.openxmlformats.schemas.presentationml.x2006.main.CTCommonSlideData data)
public java.util.List<XSLFShape> getShapes()
getShapes in interface ShapeContainer<XSLFShape,XSLFTextParagraph>public XSLFAutoShape createAutoShape()
ShapeContainer
createAutoShape in interface ShapeContainer<XSLFShape,XSLFTextParagraph>createAutoShape in interface XSLFShapeContainerpublic XSLFFreeformShape createFreeform()
ShapeContainer
createFreeform in interface ShapeContainer<XSLFShape,XSLFTextParagraph>createFreeform in interface XSLFShapeContainerpublic XSLFTextBox createTextBox()
ShapeContainer
createTextBox in interface ShapeContainer<XSLFShape,XSLFTextParagraph>createTextBox in interface XSLFShapeContainerpublic XSLFConnectorShape createConnector()
ShapeContainer
createConnector in interface ShapeContainer<XSLFShape,XSLFTextParagraph>createConnector in interface XSLFShapeContainerpublic XSLFGroupShape createGroup()
ShapeContainer
createGroup in interface ShapeContainer<XSLFShape,XSLFTextParagraph>createGroup in interface XSLFShapeContainerpublic XSLFPictureShape createPicture(PictureData pictureData)
ShapeContainer
createPicture in interface ShapeContainer<XSLFShape,XSLFTextParagraph>createPicture in interface XSLFShapeContainerpublic 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 java.util.Iterator<XSLFShape> iterator()
iterator in interface java.lang.Iterable<XSLFShape>public 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 present
java.lang.IllegalArgumentException - if the type of the specified shape
is incompatible with this sheet (optional)public void clear()
clear in interface XSLFShapeContainerprotected abstract java.lang.String getRootElementName()
protected org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape getSpTree()
protected final void commit()
throws java.io.IOException
POIXMLDocumentPart
protected void commit() throws IOException {
PackagePart part = getPackagePart();
OutputStream out = part.getOutputStream();
XmlObject bean = getXmlBean(); //the "model" which holds changes in memory
bean.save(out, DEFAULT_XML_OPTIONS);
out.close();
}
commit in class POIXMLDocumentPartjava.io.IOException - a subclass may throw an IOException if the changes can't be committedpublic XSLFSheet importContent(XSLFSheet src)
src - the source sheet to copy data from
public XSLFSheet appendContent(XSLFSheet src)
src - the source sheet
this.protected XSLFTextShape getTextShapeByType(Placeholder type)
public XSLFTextShape getPlaceholder(int idx)
idx - 0-based index of a placeholder in the sheet
public XSLFTextShape[] getPlaceholders()
protected boolean canDraw(XSLFShape shape)
sheet displays the specified shape.
Subclasses can override it and skip certain shapes from drawings,
for instance, slide masters and layouts don't display placeholders
public boolean getFollowMasterGraphics()
getFollowMasterGraphics in interface Sheet<XSLFShape,XSLFTextParagraph>public XSLFBackground getBackground()
getBackground in interface Sheet<XSLFShape,XSLFTextParagraph>public void draw(java.awt.Graphics2D graphics)
draw in interface Sheet<XSLFShape,XSLFTextParagraph>graphics -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||