Class HSLFSlide

    • Constructor Detail

      • HSLFSlide

        public HSLFSlide​(Slide slide,
                         HSLFNotes notes,
                         SlideListWithText.SlideAtomsSet atomSet,
                         int slideIdentifier,
                         int slideNumber)
        Constructs a Slide from the Slide record, and the SlideAtomsSet containing the text. Initializes 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
      • HSLFSlide

        public HSLFSlide​(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

      • onCreate

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

        For Slide we need to do the following:

        • set id of the drawing group.
        • set shapeId for the container descriptor and background
        Overrides:
        onCreate in class HSLFSheet
      • addTitle

        public HSLFTextBox addTitle()
        Create a TextBox object that represents the slide's title.
        Returns:
        TextBox object that represents the slide's title.
      • getTitle

        public java.lang.String getTitle()

        The title is a run of text of type TextHeaderAtom.CENTER_TITLE_TYPE or TextHeaderAtom.TITLE_TYPE

        Specified by:
        getTitle in interface Slide<HSLFShape,​HSLFTextParagraph>
        Returns:
        title of this slide or null if title is not set
        See Also:
        TextHeaderAtom
      • getSlideRecord

        public Slide getSlideRecord()
        Returns the underlying slide record
      • getSlideAtomsSet

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

        public void setMasterSheet​(HSLFMasterSheet master)
        Change Master of this slide.
      • setFollowMasterBackground

        public void setFollowMasterBackground​(boolean flag)
        Sets whether this slide follows master background
        Specified by:
        setFollowMasterBackground in interface Slide<HSLFShape,​HSLFTextParagraph>
        Parameters:
        flag - true if the slide follows master, false otherwise
      • getFollowMasterBackground

        public boolean getFollowMasterBackground()
        Whether this slide follows master sheet background
        Specified by:
        getFollowMasterBackground in interface Slide<HSLFShape,​HSLFTextParagraph>
        Returns:
        true if the slide follows master background, false otherwise
      • setFollowMasterObjects

        public void setFollowMasterObjects​(boolean flag)
        Sets whether this slide draws master sheet objects
        Specified by:
        setFollowMasterObjects in interface Slide<HSLFShape,​HSLFTextParagraph>
        Parameters:
        flag - true if the slide draws master sheet objects, false otherwise
      • getFollowMasterScheme

        public boolean getFollowMasterScheme()
        Whether this slide follows master color scheme
        Returns:
        true if the slide follows master color scheme, false otherwise
      • setFollowMasterScheme

        public void setFollowMasterScheme​(boolean flag)
        Sets whether this slide draws master color scheme
        Parameters:
        flag - true if the slide draws master color scheme, false otherwise
      • getFollowMasterObjects

        public boolean getFollowMasterObjects()
        Whether this slide draws master sheet objects
        Specified by:
        getFollowMasterObjects in interface Slide<HSLFShape,​HSLFTextParagraph>
        Returns:
        true if the slide draws master sheet objects, false otherwise
      • getComments

        public java.util.List<HSLFComment> getComments()
        Get the comment(s) for this slide. Note - for now, only works on PPT 2000 and PPT 2003 files. Doesn't work for PPT 97 ones, as they do their comments oddly.
        Specified by:
        getComments in interface Slide<HSLFShape,​HSLFTextParagraph>
        Returns:
        the comment(s) for this slide
      • getHeadersFooters

        public HeadersFooters getHeadersFooters()
        Header / Footer settings for this slide.
        Overrides:
        getHeadersFooters in class HSLFSheet
        Returns:
        Header / Footer settings for this slide
      • getNumberedListInfo

        public StyleTextProp9Atom[] getNumberedListInfo()
        This will return an atom per TextBox, so if the page has two text boxes the method should return two atoms.
      • setHidden

        public void setHidden​(boolean hidden)
        Description copied from interface: Slide
        Sets the slide visibility
        Specified by:
        setHidden in interface Slide<HSLFShape,​HSLFTextParagraph>
        Parameters:
        hidden - slide visibility, if true the slide is hidden, false shows the slide
      • isHidden

        public boolean isHidden()
        Specified by:
        isHidden in interface Slide<HSLFShape,​HSLFTextParagraph>
        Returns:
        the slide visibility, the slide is hidden when true - or shown when false
      • draw

        public void draw​(java.awt.Graphics2D graphics)
        Description copied from interface: Sheet
        Convenience method to draw a sheet to a graphics context
        Specified by:
        draw in interface Sheet<HSLFShape,​HSLFTextParagraph>
        Overrides:
        draw in class HSLFSheet
      • getDisplayPlaceholder

        public boolean getDisplayPlaceholder​(Placeholder placeholder)
        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 interface Slide<HSLFShape,​HSLFTextParagraph>
        Parameters:
        placeholder - the placeholder type
        Returns:
        true if the placeholder should be displayed/rendered
      • getDisplayPlaceholder

        public boolean getDisplayPlaceholder​(SimpleShape<?,​?> placeholderRef)
        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 interface Slide<HSLFShape,​HSLFTextParagraph>
        Parameters:
        placeholderRef - the shape which references to the placeholder
        Returns:
        true if the placeholder should be displayed/rendered