Class HSLFTextRun

  • All Implemented Interfaces:
    TextRun

    public final class HSLFTextRun
    extends Object
    implements TextRun
    Represents a run of text, all with the same style
    • Constructor Detail

      • HSLFTextRun

        public HSLFTextRun​(HSLFTextParagraph parentParagraph)
        Create a new wrapper around a rich text string
        Parameters:
        parentParagraph - the parent paragraph
    • Method Detail

      • setCharacterStyle

        public void setCharacterStyle​(TextPropCollection characterStyle)
      • updateSheet

        public void updateSheet()
        Supply the SlideShow we belong to
      • getLength

        public int getLength()
        Get the length of the text
      • getRawText

        public String getRawText()
        Fetch the text, in raw storage form
        Specified by:
        getRawText in interface TextRun
      • setText

        public void setText​(String text)
        Change the text
        Specified by:
        setText in interface TextRun
      • setCharTextPropVal

        public void setCharTextPropVal​(String propName,
                                       Integer val)
        Sets the value of the given Paragraph TextProp, add if required
        Parameters:
        propName - The name of the Paragraph TextProp
        val - The value to set for the TextProp
      • isBold

        public boolean isBold()
        Specified by:
        isBold in interface TextRun
      • setBold

        public void setBold​(boolean bold)
        Specified by:
        setBold in interface TextRun
      • isItalic

        public boolean isItalic()
        Specified by:
        isItalic in interface TextRun
      • setItalic

        public void setItalic​(boolean italic)
        Specified by:
        setItalic in interface TextRun
      • isUnderlined

        public boolean isUnderlined()
        Specified by:
        isUnderlined in interface TextRun
      • setUnderlined

        public void setUnderlined​(boolean underlined)
        Specified by:
        setUnderlined in interface TextRun
      • isShadowed

        public boolean isShadowed()
        Does the text have a shadow?
      • setShadowed

        public void setShadowed​(boolean flag)
        Does the text have a shadow?
      • isEmbossed

        public boolean isEmbossed()
        Is this text embossed?
      • setEmbossed

        public void setEmbossed​(boolean flag)
        Is this text embossed?
      • setStrikethrough

        public void setStrikethrough​(boolean flag)
        Specified by:
        setStrikethrough in interface TextRun
      • getSuperscript

        public int getSuperscript()
        Gets the subscript/superscript option
        Returns:
        the percentage of the font size. If the value is positive, it is superscript, otherwise it is subscript
      • setSuperscript

        public void setSuperscript​(int val)
        Sets the subscript/superscript option
        Parameters:
        val - the percentage of the font size. If the value is positive, it is superscript, otherwise it is subscript
      • getFontIndex

        public int getFontIndex()
        Gets the font index
      • setFontIndex

        public void setFontIndex​(int idx)
        Sets the font index
      • setFontColor

        public void setFontColor​(int bgr)
        Sets color of the text, as a int bgr. (PowerPoint stores as BlueGreenRed, not the more usual RedGreenBlue)
        See Also:
        Color
      • isSubscript

        public boolean isSubscript()
        Specified by:
        isSubscript in interface TextRun