Package org.apache.poi.xslf.usermodel
Class XSLFSlide
java.lang.Object
org.apache.poi.ooxml.POIXMLDocumentPart
org.apache.poi.xslf.usermodel.XSLFSheet
org.apache.poi.xslf.usermodel.XSLFSlide
- All Implemented Interfaces:
Iterable<XSLFShape>
,ShapeContainer<XSLFShape,
,XSLFTextParagraph> Sheet<XSLFShape,
,XSLFTextParagraph> Slide<XSLFShape,
,XSLFTextParagraph> XSLFShapeContainer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
POIXMLDocumentPart.RelationPart
-
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D graphics) Render this sheet into the supplied graphics objectboolean
getDisplayPlaceholder
(Placeholder placeholder) In XSLF, slidenumber and date shapes aren't marked as placeholders whereas in HSLF they are activated via a HeadersFooter configuration.boolean
boolean
boolean
boolean
getNotes()
protected String
int
getTheme()
getTitle()
org.openxmlformats.schemas.presentationml.x2006.main.CTSlide
importContent
(XSLFSheet src) Set the contents of this sheet to be a copy of the source sheet.boolean
isHidden()
protected void
removeChartRelation
(XSLFChart chart) protected void
removeLayoutRelation
(XSLFSlideLayout layout) void
setFollowMasterBackground
(boolean follow) void
setFollowMasterColourScheme
(boolean follow) void
setFollowMasterGraphics
(boolean value) void
setFollowMasterObjects
(boolean follow) void
setHidden
(boolean hidden) Sets the slide visibilityvoid
setNotes
(Notes<XSLFShape, XSLFTextParagraph> notes) Methods inherited from class org.apache.poi.xslf.usermodel.XSLFSheet
addShape, allocateShapeId, appendContent, buildShapes, clear, commit, createAutoShape, createConnector, createFreeform, createGroup, createOleShape, createPicture, createTable, createTable, createTextBox, deregisterShapeId, getPlaceholder, getPlaceholder, getPlaceholderDetails, getPlaceholders, getShapes, getSlideShow, getSpTree, getTextShapeByType, iterator, registerShapeId, removeShape
Methods inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommited, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, removeRelation, setCommited, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.apache.poi.sl.usermodel.ShapeContainer
addShape, createOleShape, createTable, getShapes, removeShape
Methods inherited from interface org.apache.poi.sl.usermodel.Sheet
getPlaceholderDetails, getSlideShow
-
Method Details
-
getXmlObject
public org.openxmlformats.schemas.presentationml.x2006.main.CTSlide getXmlObject()- Specified by:
getXmlObject
in classXSLFSheet
- Returns:
- top-level Xml bean representing this sheet
-
getRootElementName
- Specified by:
getRootElementName
in classXSLFSheet
-
removeChartRelation
-
removeLayoutRelation
-
getMasterSheet
- Specified by:
getMasterSheet
in interfaceSheet<XSLFShape,
XSLFTextParagraph>
-
getSlideLayout
- Specified by:
getSlideLayout
in interfaceSlide<XSLFShape,
XSLFTextParagraph> - Returns:
- the assigned slide layout
-
getSlideMaster
-
getCommentsPart
- Returns:
- the comments part or
null
if there weren't any comments - Since:
- POI 4.0.0
-
getCommentAuthorsPart
- Returns:
- the comment authors part or
null
if there weren't any comments - Since:
- POI 4.0.0
-
getComments
- Specified by:
getComments
in interfaceSlide<XSLFShape,
XSLFTextParagraph> - Returns:
- the comment(s) for this slide
-
getNotes
- Specified by:
getNotes
in interfaceSlide<XSLFShape,
XSLFTextParagraph>
-
getTitle
- Specified by:
getTitle
in interfaceSlide<XSLFShape,
XSLFTextParagraph> - Returns:
- title of this slide or null if title is not set
-
getTheme
- Overrides:
getTheme
in classXSLFSheet
- Returns:
- theme (shared styles) associated with this theme.
By default returns
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.
-
getBackground
- Specified by:
getBackground
in interfaceSheet<XSLFShape,
XSLFTextParagraph> - Overrides:
getBackground
in classXSLFSheet
- Returns:
- the information about background appearance of this slide
-
getFollowMasterGraphics
public boolean getFollowMasterGraphics()- Specified by:
getFollowMasterGraphics
in interfaceSheet<XSLFShape,
XSLFTextParagraph> - Overrides:
getFollowMasterGraphics
in classXSLFSheet
- Returns:
- whether shapes on the master sheet should be shown. By default master graphics is turned off. Sheets that support the notion of master (slide, slideLayout) should override it and check this setting in the sheet XML
-
setFollowMasterGraphics
public void setFollowMasterGraphics(boolean value) - Parameters:
value
- whether shapes on the master slide should be shown or not.
-
getFollowMasterObjects
public boolean getFollowMasterObjects()- Specified by:
getFollowMasterObjects
in interfaceSlide<XSLFShape,
XSLFTextParagraph>
-
setFollowMasterObjects
public void setFollowMasterObjects(boolean follow) - Specified by:
setFollowMasterObjects
in interfaceSlide<XSLFShape,
XSLFTextParagraph>
-
importContent
Description copied from class:XSLFSheet
Set the contents of this sheet to be a copy of the source sheet. This method erases any existing shapes and replaces them with object from the source sheet.- Overrides:
importContent
in classXSLFSheet
- Parameters:
src
- the source sheet to copy data from- Returns:
- modified 'this'
-
getFollowMasterBackground
public boolean getFollowMasterBackground()- Specified by:
getFollowMasterBackground
in interfaceSlide<XSLFShape,
XSLFTextParagraph>
-
setFollowMasterBackground
- Specified by:
setFollowMasterBackground
in interfaceSlide<XSLFShape,
XSLFTextParagraph>
-
getFollowMasterColourScheme
public boolean getFollowMasterColourScheme()- Specified by:
getFollowMasterColourScheme
in interfaceSlide<XSLFShape,
XSLFTextParagraph>
-
setFollowMasterColourScheme
- Specified by:
setFollowMasterColourScheme
in interfaceSlide<XSLFShape,
XSLFTextParagraph>
-
setNotes
- Specified by:
setNotes
in interfaceSlide<XSLFShape,
XSLFTextParagraph>
-
getSlideNumber
public int getSlideNumber()- Specified by:
getSlideNumber
in interfaceSlide<XSLFShape,
XSLFTextParagraph> - Returns:
- the 1-based slide no.
-
draw
Render this sheet into the supplied graphics object -
getDisplayPlaceholder
Description copied from interface:Slide
In XSLF, slidenumber and date shapes aren't marked as placeholders whereas in HSLF they are activated via a HeadersFooter configuration. This method is used to generalize that handling.- Specified by:
getDisplayPlaceholder
in interfaceSlide<XSLFShape,
XSLFTextParagraph> - Parameters:
placeholder
- the placeholder type- Returns:
true
if the placeholder should be displayed/rendered
-
setHidden
public void setHidden(boolean hidden) Description copied from interface:Slide
Sets the slide visibility- Specified by:
setHidden
in interfaceSlide<XSLFShape,
XSLFTextParagraph> - Parameters:
hidden
- slide visibility, iftrue
the slide is hidden,false
shows the slide
-
isHidden
public boolean isHidden()- Specified by:
isHidden
in interfaceSlide<XSLFShape,
XSLFTextParagraph> - Returns:
- the slide visibility, the slide is hidden when
true
- or shown whenfalse
-
getSlideName
- Specified by:
getSlideName
in interfaceSlide<XSLFShape,
XSLFTextParagraph> - Returns:
- the slide name, defaults to "Slide[slideNumber]"
-