org.apache.poi.hslf.model
Class Slide

java.lang.Object
  extended by org.apache.poi.hslf.model.Sheet
      extended by org.apache.poi.hslf.model.Slide

public class Slide
extends Sheet

This class represents a slide in a PowerPoint Document. It allows access to the text within, and the layout. For now, it only does the text side of things though

Author:
Nick Burch

Constructor Summary
Slide(int sheetNumber, int sheetRefId, int slideNumber)
          Create a new Slide instance
Slide(Slide slide, Notes notes, SlideListWithText.SlideAtomsSet atomSet, int slideIdentifier, int slideNumber)
          Constructs a Slide from the Slide record, and the SlideAtomsSet containing the text.
 
Method Summary
 int _getSheetNumber()
          Returns the (internal, SlideIdentifier based) sheet number
 int _getSheetRefId()
          Returns the (internal, RefID based) sheet number, as used to in PersistPtr stuff.
 TextBox addTitle()
          Create a TextBox object that represents the slide's title.
 Notes getNotesSheet()
          Returns the Notes Sheet for this slide, or null if there isn't one
protected  PPDrawing getPPDrawing()
          Returns the PPDrawing associated with this slide, or null if there isn't one
protected  SlideListWithText.SlideAtomsSet getSlideAtomsSet()
           
 int getSlideNumber()
          Returns the (public facing) page number of this slide
 Slide getSlideRecord()
          Returns the underlying slide record
 TextRun[] getTextRuns()
          Returns an array of all the TextRuns found
 void setNotes(Notes notes)
          Sets the Notes that are associated with this.
 
Methods inherited from class org.apache.poi.hslf.model.Sheet
addShape, findTextRuns, findTextRuns, getShapes, getSlideShow, setSlideShow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Slide

public Slide(Slide slide,
             Notes notes,
             SlideListWithText.SlideAtomsSet atomSet,
             int slideIdentifier,
             int slideNumber)
Constructs a Slide from the Slide record, and the SlideAtomsSet containing the text. Initialises TextRuns, to provide easier access to the text

Parameters:
slide - the Slide record we're based on
notes - the Notes sheet attached to us
atomSet - the SlideAtomsSet to get the text from

Slide

public Slide(int sheetNumber,
             int sheetRefId,
             int slideNumber)
Create a new Slide instance

Parameters:
sheetNumber - The internal number of the sheet, as used by PersistPtrHolder
slideNumber - The user facing number of the sheet
Method Detail

setNotes

public void setNotes(Notes notes)
Sets the Notes that are associated with this. Updates the references in the records to point to the new ID


addTitle

public TextBox addTitle()
Create a TextBox object that represents the slide's title.

Returns:
TextBox object that represents the slide's title.

getTextRuns

public TextRun[] getTextRuns()
Returns an array of all the TextRuns found

Specified by:
getTextRuns in class Sheet

_getSheetRefId

public int _getSheetRefId()
Returns the (internal, RefID based) sheet number, as used to in PersistPtr stuff.

Specified by:
_getSheetRefId in class Sheet

_getSheetNumber

public int _getSheetNumber()
Returns the (internal, SlideIdentifier based) sheet number

Specified by:
_getSheetNumber in class Sheet
See Also:
getSlideNumber()

getSlideNumber

public int getSlideNumber()
Returns the (public facing) page number of this slide


getSlideRecord

public Slide getSlideRecord()
Returns the underlying slide record


getNotesSheet

public Notes getNotesSheet()
Returns the Notes Sheet for this slide, or null if there isn't one


getPPDrawing

protected PPDrawing getPPDrawing()
Returns the PPDrawing associated with this slide, or null if there isn't one

Specified by:
getPPDrawing in class Sheet

getSlideAtomsSet

protected SlideListWithText.SlideAtomsSet getSlideAtomsSet()
Returns:
set of records inside SlideListWithtext container which hold text data for this slide (typically for placeholders).


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