Class HSSFFontWrapper


  • public final class HSSFFontWrapper
    extends Object
    The HSSFFontWrapper is used to store excel style font information.
    Author:
    Heiko Evermann
    • Field Detail

      • FONT_FACTOR

        public static final int FONT_FACTOR
        Deprecated.
        No longer used, will be removed in 6.0
        scale between Excel and awt. With this value it looks fine.
        See Also:
        Constant Field Values
    • Constructor Detail

      • HSSFFontWrapper

        public HSSFFontWrapper​(StyleSheet contentStyle,
                               short colorIndex)
      • HSSFFontWrapper

        public HSSFFontWrapper​(String fontName,
                               short fontSize,
                               boolean bold,
                               boolean italic,
                               boolean underline,
                               boolean strikethrough,
                               short colorIndex)
        Creates a new HSSFFontWrapper for the given font and color.
        Parameters:
        fontName - the name of the wrapped font.
        fontSize - the name of the wrapped font.
        bold - a font style flag.
        italic - a font style flag.
        underline - a font style flag.
        strikethrough - a font style flag.
        colorIndex - the foreground color.
      • HSSFFontWrapper

        public HSSFFontWrapper​(org.apache.poi.ss.usermodel.Font font)
        Creates a HSSFFontWrapper for the excel font.
        Parameters:
        font - the font.
    • Method Detail

      • equals

        public boolean equals​(Object o)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class Object
        Parameters:
        o - the compared object.
        Returns:
        true, if the font wrapper contains the same font definition, false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code.
      • isBold

        public boolean isBold()
      • getColorIndex

        public short getColorIndex()
      • getFontHeight

        public int getFontHeight()
      • getFontName

        public String getFontName()
      • getHashCode

        public int getHashCode()
      • isItalic

        public boolean isItalic()
      • isStrikethrough

        public boolean isStrikethrough()
      • isUnderline

        public boolean isUnderline()