Class HSSFFont

    • Field Detail

    • Method Detail

      • setFontName

        public void setFontName​(java.lang.String name)
        set the name for the font (i.e. Arial)
        Specified by:
        setFontName in interface Font
        Parameters:
        name - String representing the name of the font to use
        See Also:
        FONT_ARIAL
      • getFontName

        public java.lang.String getFontName()
        get the name for the font (i.e. Arial)
        Specified by:
        getFontName in interface Font
        Returns:
        String representing the name of the font to use
        See Also:
        FONT_ARIAL
      • getIndex

        public short getIndex()
        get the index within the HSSFWorkbook (sequence within the collection of Font objects)
        Specified by:
        getIndex in interface Font
        Returns:
        unique index number of the underlying record this Font represents (probably you don't care unless you're comparing which one is which)
      • getIndexAsInt

        public int getIndexAsInt()
        get the index within the HSSFWorkbook (sequence within the collection of Font objects)
        Specified by:
        getIndexAsInt in interface Font
        Returns:
        unique index number of the underlying record this Font represents (probably you don't care unless you're comparing which one is which)
      • setFontHeight

        public void setFontHeight​(short height)
        set the font height in unit's of 1/20th of a point. Maybe you might want to use the setFontHeightInPoints which matches to the familiar 10, 12, 14 etc..
        Specified by:
        setFontHeight in interface Font
        Parameters:
        height - height in 1/20ths of a point
        See Also:
        setFontHeightInPoints(short)
      • setFontHeightInPoints

        public void setFontHeightInPoints​(short height)
        set the font height
        Specified by:
        setFontHeightInPoints in interface Font
        Parameters:
        height - height in the familiar unit of measure - points
        See Also:
        setFontHeight(short)
      • getFontHeight

        public short getFontHeight()
        get the font height in unit's of 1/20th of a point. Maybe you might want to use the getFontHeightInPoints which matches to the familiar 10, 12, 14 etc..
        Specified by:
        getFontHeight in interface Font
        Returns:
        short - height in 1/20ths of a point
        See Also:
        getFontHeightInPoints()
      • getFontHeightInPoints

        public short getFontHeightInPoints()
        get the font height
        Specified by:
        getFontHeightInPoints in interface Font
        Returns:
        short - height in the familiar unit of measure - points
        See Also:
        getFontHeight()
      • setItalic

        public void setItalic​(boolean italic)
        set whether to use italics or not
        Specified by:
        setItalic in interface Font
        Parameters:
        italic - italics or not
      • getItalic

        public boolean getItalic()
        get whether to use italics or not
        Specified by:
        getItalic in interface Font
        Returns:
        italics or not
      • setStrikeout

        public void setStrikeout​(boolean strikeout)
        set whether to use a strikeout horizontal line through the text or not
        Specified by:
        setStrikeout in interface Font
        Parameters:
        strikeout - or not
      • getStrikeout

        public boolean getStrikeout()
        get whether to use a strikeout horizontal line through the text or not
        Specified by:
        getStrikeout in interface Font
        Returns:
        strikeout or not
      • setBold

        public void setBold​(boolean bold)
        sets the font to be bold or not
        Specified by:
        setBold in interface Font
      • getBold

        public boolean getBold()
        get if the font is bold or not
        Specified by:
        getBold in interface Font
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object