Class BasicStyles


  • public final class BasicStyles
    extends java.lang.Object
    Factory class with the most important predefined styles
    • Constructor Summary

      Constructors 
      Constructor Description
      BasicStyles()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Style Bold()
      Gets the bold style
      static Style BoldItalic()
      Gets the bold and italic style
      static Style BorderFrame()
      Gets the border frame style
      static Style BorderFrameHeader()
      Gets the border style for header cells
      static Style colorizedBackground​(java.lang.String rgb)
      Gets a style to colorize the background of a cell
      static Style colorizedText​(java.lang.String rgb)
      Gets a style to colorize the text of a cell
      static Style DateFormat()
      Gets the date format style
      static Style DottedFill_0_125()
      Gets the special pattern fill style (for compatibility)
      static Style DoubleUnderline()
      Gets the double underline style
      static Style font​(java.lang.String fontName)
      Gets a style with a user defined Font (Font size 11)
      Note: The Font name as well as the availability of bold and italic on the Font cannot be validated by PicoXLSX4j.
      static Style font​(java.lang.String fontName, int fontSize)
      Gets a style with a user defined Font
      Note: The Font name as well as the availability of bold and italic on the Font cannot be validated by PicoXLSX4j.
      static Style font​(java.lang.String fontName, int fontSize, boolean isBold)
      Gets a style with a user defined Font
      Note: The Font name as well as the availability of bold and italic on the Font cannot be validated by PicoXLSX4j.
      static Style font​(java.lang.String fontName, int fontSize, boolean isBold, boolean isItalic)
      Gets a style with a user defined Font
      Note: The Font name as well as the availability of bold and italic on the Font cannot be validated by PicoXLSX4j.
      static Style Italic()
      Gets the italic style
      static Style MergeCellStyle()
      Gets the style used when merging cells
      static Style RoundFormat()
      Gets the round format style
      static Style Strike()
      Gets the strike style
      static Style TimeFormat()
      Gets the time format style
      static Style Underline()
      Gets the underline style
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BasicStyles

        public BasicStyles()
    • Method Detail

      • Bold

        public static Style Bold()
        Gets the bold style
        Returns:
        Style object
      • Italic

        public static Style Italic()
        Gets the italic style
        Returns:
        Style object
      • BoldItalic

        public static Style BoldItalic()
        Gets the bold and italic style
        Returns:
        Style object
      • Underline

        public static Style Underline()
        Gets the underline style
        Returns:
        Style object
      • DoubleUnderline

        public static Style DoubleUnderline()
        Gets the double underline style
        Returns:
        Style object
      • Strike

        public static Style Strike()
        Gets the strike style
        Returns:
        Style object
      • DateFormat

        public static Style DateFormat()
        Gets the date format style
        Returns:
        Style object
      • TimeFormat

        public static Style TimeFormat()
        Gets the time format style
        Returns:
        Style object
      • RoundFormat

        public static Style RoundFormat()
        Gets the round format style
        Returns:
        Style object
      • BorderFrame

        public static Style BorderFrame()
        Gets the border frame style
        Returns:
        Style object
      • BorderFrameHeader

        public static Style BorderFrameHeader()
        Gets the border style for header cells
        Returns:
        Style object
      • DottedFill_0_125

        public static Style DottedFill_0_125()
        Gets the special pattern fill style (for compatibility)
        Returns:
        Style object
      • MergeCellStyle

        public static Style MergeCellStyle()
        Gets the style used when merging cells
        Returns:
        Style object
      • colorizedText

        public static Style colorizedText​(java.lang.String rgb)
        Gets a style to colorize the text of a cell
        Parameters:
        rgb - RGB code in hex format (e.g. FF00AC). Alpha will be set to full opacity (FF)
        Returns:
        Style with Font color definition
      • colorizedBackground

        public static Style colorizedBackground​(java.lang.String rgb)
        Gets a style to colorize the background of a cell
        Parameters:
        rgb - RGB code in hex format (e.g. FF00AC). Alpha will be set to full opacity (FF)
        Returns:
        Style with background color definition
      • font

        public static Style font​(java.lang.String fontName)
        Gets a style with a user defined Font (Font size 11)
        Note: The Font name as well as the availability of bold and italic on the Font cannot be validated by PicoXLSX4j. The generated file may be corrupt or rendered with a fall-back Font in case of an error
        Parameters:
        fontName - Name of the Font
        Returns:
        Style with Font definition
      • font

        public static Style font​(java.lang.String fontName,
                                 int fontSize)
        Gets a style with a user defined Font
        Note: The Font name as well as the availability of bold and italic on the Font cannot be validated by PicoXLSX4j. The generated file may be corrupt or rendered with a fall-back Font in case of an error
        Parameters:
        fontName - Name of the Font
        fontSize - Size of the Font in points
        Returns:
        Style with Font definition
      • font

        public static Style font​(java.lang.String fontName,
                                 int fontSize,
                                 boolean isBold)
        Gets a style with a user defined Font
        Note: The Font name as well as the availability of bold and italic on the Font cannot be validated by PicoXLSX4j. The generated file may be corrupt or rendered with a fall-back Font in case of an error
        Parameters:
        fontName - Name of the Font
        fontSize - Size of the Font in points
        isBold - If true, the Font will be bold
        Returns:
        Style with Font definition
      • font

        public static Style font​(java.lang.String fontName,
                                 int fontSize,
                                 boolean isBold,
                                 boolean isItalic)
        Gets a style with a user defined Font
        Note: The Font name as well as the availability of bold and italic on the Font cannot be validated by PicoXLSX4j. The generated file may be corrupt or rendered with a fall-back Font in case of an error
        Parameters:
        fontName - Name of the Font
        fontSize - Size of the Font in points
        isBold - If true, the Font will be bold
        isItalic - If true, the Font will be italic
        Returns:
        Style with Font definition