org.apache.poi.hslf.model
Class Sheet

java.lang.Object
  extended by org.apache.poi.hslf.model.Sheet
Direct Known Subclasses:
MasterSheet, Notes, Slide

public abstract class Sheet
extends java.lang.Object

This class defines the common format of "Sheets" in a powerpoint document. Such sheets could be Slides, Notes, Master etc

Author:
Nick Burch, Yegor Kozlov

Constructor Summary
Sheet(SheetContainer container, int sheetNo)
           
 
Method Summary
 int _getSheetNumber()
          Returns the (internal, SlideIdentifier based) sheet number, as used to reference this sheet from other records.
 int _getSheetRefId()
          Returns the (internal, RefID based) sheet number, as used to in PersistPtr stuff.
 void addShape(Shape shape)
          Add a new Shape to this Slide
 int allocateShapeId()
          Allocates new shape id for the new drawing group id.
 void draw(java.awt.Graphics2D graphics)
           
static TextRun[] findTextRuns(PPDrawing ppdrawing)
          For a given PPDrawing, grab all the TextRuns
 Background getBackground()
          Returns the background shape for this sheet.
 ColorSchemeAtom getColorScheme()
          Color scheme for this sheet.
abstract  MasterSheet getMasterSheet()
          Return the master sheet .
 TextShape getPlaceholder(int type)
          Search text placeholer by its type
 TextShape getPlaceholderByTextType(int type)
          Return placeholder by text type
 java.lang.String getProgrammableTag()
          Return programmable tag associated with this sheet, e.g.
 Shape[] getShapes()
          Returns all shapes contained in this Sheet
 SheetContainer getSheetContainer()
          Return record container for this sheet
 SlideShow getSlideShow()
          Fetch the SlideShow we're attached to
abstract  TextRun[] getTextRuns()
          Returns an array of all the TextRuns in the sheet.
 void onCreate()
          Called by SlideShow ater a new sheet is created
 boolean removeShape(Shape shape)
          Removes the specified shape from this sheet.
 void setSlideShow(SlideShow ss)
          Set the SlideShow we're attached to.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sheet

public Sheet(SheetContainer container,
             int sheetNo)
Method Detail

getTextRuns

public abstract TextRun[] getTextRuns()
Returns an array of all the TextRuns in the sheet.


_getSheetRefId

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


_getSheetNumber

public int _getSheetNumber()
Returns the (internal, SlideIdentifier based) sheet number, as used to reference this sheet from other records.


getSlideShow

public SlideShow getSlideShow()
Fetch the SlideShow we're attached to


getSheetContainer

public SheetContainer getSheetContainer()
Return record container for this sheet


setSlideShow

public void setSlideShow(SlideShow ss)
Set the SlideShow we're attached to. Also passes it on to our child RichTextRuns


findTextRuns

public static TextRun[] findTextRuns(PPDrawing ppdrawing)
For a given PPDrawing, grab all the TextRuns


getShapes

public Shape[] getShapes()
Returns all shapes contained in this Sheet

Returns:
all shapes contained in this Sheet (Slide or Notes)

addShape

public void addShape(Shape shape)
Add a new Shape to this Slide

Parameters:
shape - - the Shape to add

allocateShapeId

public int allocateShapeId()
Allocates new shape id for the new drawing group id.

Returns:
a new shape id.

removeShape

public boolean removeShape(Shape shape)
Removes the specified shape from this sheet.

Parameters:
shape - shape to be removed from this sheet, if present.
Returns:
true if the shape was deleted.

onCreate

public void onCreate()
Called by SlideShow ater a new sheet is created


getMasterSheet

public abstract MasterSheet getMasterSheet()
Return the master sheet .


getColorScheme

public ColorSchemeAtom getColorScheme()
Color scheme for this sheet.


getBackground

public Background getBackground()
Returns the background shape for this sheet.

Returns:
the background shape for this sheet.

draw

public void draw(java.awt.Graphics2D graphics)

getPlaceholderByTextType

public TextShape getPlaceholderByTextType(int type)
Return placeholder by text type

Parameters:
type - type of text, See TextHeaderAtom
Returns:
TextShape or null

getPlaceholder

public TextShape getPlaceholder(int type)
Search text placeholer by its type

Parameters:
type - type of placeholder to search. See OEPlaceholderAtom
Returns:
TextShape or null

getProgrammableTag

public java.lang.String getProgrammableTag()
Return programmable tag associated with this sheet, e.g. ___PPT12.

Returns:
programmable tag associated with this sheet.