Class FontFormatting

  • All Implemented Interfaces:
    java.lang.Cloneable

    public final class FontFormatting
    extends java.lang.Object
    implements java.lang.Cloneable
    Font Formatting Block of the Conditional Formatting Rule Record.
    • Constructor Detail

      • FontFormatting

        public FontFormatting()
      • FontFormatting

        public FontFormatting​(RecordInputStream in)
        Creates new FontFormatting
    • Method Detail

      • getRawRecord

        public byte[] getRawRecord()
      • getDataLength

        public int getDataLength()
      • setFontHeight

        public void setFontHeight​(int height)
        sets the height of the font in 1/20th point units
        Parameters:
        height - fontheight (in points/20); or -1 to preserve the cell font height
      • getFontHeight

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

        public void setOutline​(boolean on)
      • isOutlineOn

        public boolean isOutlineOn()
      • setShadow

        public void setShadow​(boolean on)
      • isShadowOn

        public boolean isShadowOn()
      • setStrikeout

        public void setStrikeout​(boolean strike)
        set the font to be stricken out or not
        Parameters:
        strike - - whether the font is stricken out or not
      • setBold

        public void setBold​(boolean bold)
        set the font weight to bold (weight=700) or to normal(weight=400) boldness.
        Parameters:
        bold - - set font weight to bold if true; to normal otherwise
      • 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
        Returns:
        bold - whether the font is bold or not
      • getFontColorIndex

        public short getFontColorIndex()
      • setFontColorIndex

        public void setFontColorIndex​(short fci)
      • isFontStyleModified

        public boolean isFontStyleModified()
      • setFontStyleModified

        public void setFontStyleModified​(boolean modified)
      • isFontOutlineModified

        public boolean isFontOutlineModified()
      • setFontOutlineModified

        public void setFontOutlineModified​(boolean modified)
      • isFontShadowModified

        public boolean isFontShadowModified()
      • setFontShadowModified

        public void setFontShadowModified​(boolean modified)
      • setFontCancellationModified

        public void setFontCancellationModified​(boolean modified)
      • isFontCancellationModified

        public boolean isFontCancellationModified()
      • setEscapementTypeModified

        public void setEscapementTypeModified​(boolean modified)
      • isEscapementTypeModified

        public boolean isEscapementTypeModified()
      • setUnderlineTypeModified

        public void setUnderlineTypeModified​(boolean modified)
      • isUnderlineTypeModified

        public boolean isUnderlineTypeModified()
      • setFontWieghtModified

        public void setFontWieghtModified​(boolean modified)
      • isFontWeightModified

        public boolean isFontWeightModified()
      • toString

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