Class ExcelRichText.FontStyle

java.lang.Object
io.github.dornol.excelkit.excel.ExcelRichText.FontStyle
Enclosing class:
ExcelRichText

public static class ExcelRichText.FontStyle extends Object
Style configuration for a rich text segment.

Supports bold, italic, underline, strikethrough, font color (RGB), and font size.

  • Constructor Details

    • FontStyle

      public FontStyle()
      Creates a new font style with defaults.
  • Method Details

    • bold

      public ExcelRichText.FontStyle bold(boolean bold)
      Sets bold styling.
      Parameters:
      bold - whether to apply bold
      Returns:
      this instance for chaining
    • italic

      public ExcelRichText.FontStyle italic(boolean italic)
      Sets italic styling.
      Parameters:
      italic - whether to apply italic
      Returns:
      this instance for chaining
    • underline

      public ExcelRichText.FontStyle underline(boolean underline)
      Sets underline styling.
      Parameters:
      underline - whether to apply underline
      Returns:
      this instance for chaining
    • strikethrough

      public ExcelRichText.FontStyle strikethrough(boolean strikethrough)
      Sets strikethrough styling.
      Parameters:
      strikethrough - whether to apply strikethrough
      Returns:
      this instance for chaining
    • color

      public ExcelRichText.FontStyle color(int r, int g, int b)
      Sets the font color using RGB values.
      Parameters:
      r - red component (0–255)
      g - green component (0–255)
      b - blue component (0–255)
      Returns:
      this instance for chaining
    • color

      public ExcelRichText.FontStyle color(ExcelColor color)
      Sets the font color using a predefined ExcelColor.
      Parameters:
      color - the color preset
      Returns:
      this instance for chaining
    • fontSize

      public ExcelRichText.FontStyle fontSize(int size)
      Sets the font size in points.
      Parameters:
      size - font size in points
      Returns:
      this instance for chaining