Class HSSFFontFormatting

  • All Implemented Interfaces:
    FontFormatting

    public final class HSSFFontFormatting
    extends Object
    implements FontFormatting
    High level representation for Font Formatting component of Conditional Formatting settings
    • Method Detail

      • setFontColor

        public void setFontColor​(Color color)
        Description copied from interface: FontFormatting
        Sets the colour to use
        Specified by:
        setFontColor in interface FontFormatting
        Parameters:
        color - font colour to use
      • getFontHeight

        public int getFontHeight()
        gets the height of the font in 1/20th point units
        Specified by:
        getFontHeight in interface FontFormatting
        Returns:
        fontheight (in points/20); or -1 if not modified
      • getFontWeight

        public short getFontWeight()
        get the font weight for this font (100-1000dec or 0x64-0x3e8). Default is 0x190 for normal and 0x2bc for bold
        Returns:
        bw - a number between 100-1000 for the fonts "boldness"
      • isBold

        public boolean isBold()
        get whether the font weight is set to bold or not
        Specified by:
        isBold in interface FontFormatting
        Returns:
        bold - whether the font is bold or not
      • isEscapementTypeModified

        public boolean isEscapementTypeModified()
        Returns:
        true if escapement type was modified from default
      • isFontCancellationModified

        public boolean isFontCancellationModified()
        Returns:
        true if font cancellation was modified from default
      • isFontOutlineModified

        public boolean isFontOutlineModified()
        Returns:
        true if font outline type was modified from default
      • isFontShadowModified

        public boolean isFontShadowModified()
        Returns:
        true if font shadow type was modified from default
      • isFontStyleModified

        public boolean isFontStyleModified()
        Returns:
        true if font style was modified from default
      • isItalic

        public boolean isItalic()
        Specified by:
        isItalic in interface FontFormatting
        Returns:
        true if font style was set to italic
      • isOutlineOn

        public boolean isOutlineOn()
        Returns:
        true if font outline is on
      • isShadowOn

        public boolean isShadowOn()
        Returns:
        true if font shadow is on
      • isStruckout

        public boolean isStruckout()
        Specified by:
        isStruckout in interface FontFormatting
        Returns:
        true if font strikeout is on
      • isUnderlineTypeModified

        public boolean isUnderlineTypeModified()
        Returns:
        true if font underline type was modified from default
      • isFontWeightModified

        public boolean isFontWeightModified()
        Returns:
        true if font weight was modified from default
      • setFontStyle

        public void setFontStyle​(boolean italic,
                                 boolean bold)
        set font style options.
        Specified by:
        setFontStyle in interface FontFormatting
        Parameters:
        italic - - if true, set posture style to italic, otherwise to normal
        bold - if true, set font weight to bold, otherwise to normal
      • resetFontStyle

        public void resetFontStyle()
        set font style options to default values (non-italic, non-bold)
        Specified by:
        resetFontStyle in interface FontFormatting