Class OdfSlide
- java.lang.Object
-
- org.odftoolkit.odfdom.doc.presentation.OdfSlide
-
public class OdfSlide extends Object
OdfSlide
represents the presentation slide feature of the ODF document.OdfSlide
provides methods to get the slide index,get the content of the current slide, etc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OdfSlide.SlideLayout
A slide layout is a slide with some predefine placeholder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OdfSlide
getInstance(DrawPageElement pageElement)
Get a presentation slide instance by an instance ofDrawPageElement
.OdfPresentationNotes
getNotesPage()
Get the Notes page of this slideDrawPageElement
getOdfElement()
Return an instance ofDrawPageElement
which represents presentation slide feature.int
getSlideIndex()
Get the current slide index in the owner document.String
getSlideName()
Get the current slide name.void
setSlideName(String name)
Set the current slide name.
-
-
-
Method Detail
-
getInstance
public static OdfSlide getInstance(DrawPageElement pageElement)
Get a presentation slide instance by an instance ofDrawPageElement
.- Parameters:
pageElement
- an instance ofDrawPageElement
- Returns:
- an instance of
OdfSlide
that can representpageElement
-
getOdfElement
public DrawPageElement getOdfElement()
Return an instance ofDrawPageElement
which represents presentation slide feature.- Returns:
- an instance of
DrawPageElement
-
getSlideIndex
public int getSlideIndex()
Get the current slide index in the owner document.- Returns:
- the slide index in the owner document
-1, if the odf element which can represent this slide is not in the document DOM tree
-
getSlideName
public String getSlideName()
Get the current slide name.If the "draw:name" attribute is not present there, create an unique name for this slide
- Returns:
- the name of the current slide
-
setSlideName
public void setSlideName(String name)
Set the current slide name.It must be unique slide name in the current presentation. If not, an IllegalArgumentException will be thrown. If the given name is null, an IllegalArgumentException will also be thrown.
- Parameters:
name
- the new name of the current slide- Throws:
IllegalArgumentException
- if the given name is null or it is not unique in the current presentation.
-
getNotesPage
public OdfPresentationNotes getNotesPage()
Get the Notes page of this slide- Returns:
- the instance of
OdfPresentationNotes
which represent the notes page of the current slide
-
-