Class ExcelCellStyle

java.lang.Object
com.northconcepts.datapipeline.excel.ExcelCellStyle
All Implemented Interfaces:
Cloneable

public class ExcelCellStyle extends Object implements Cloneable
Represents the styling properties that can be applied to an Excel cell. Includes font, background color, text wrapping, and data format options.
See Also:
  • Constructor Details

    • ExcelCellStyle

      public ExcelCellStyle()
  • Method Details

    • hyperlink

      public static final ExcelCellStyle hyperlink()
      Returns a new ExcelCellStyle that is underlined with a blue font color.
    • hyperlink

      public static final ExcelCellStyle hyperlink(ExcelCellStyle style)
      Decorates the supplied style making it underlined with a blue font color. Existing font attributes (e.g., bold, italic, size) are preserved.
    • isWrapText

      public boolean isWrapText()
      Returns whether text wrapping is enabled for the cell.
      Returns:
      true if text wrapping is enabled, false otherwise
    • setWrapText

      public ExcelCellStyle setWrapText(boolean wrapText)
      Sets whether text wrapping is enabled for the cell.
      Parameters:
      wrapText - true to enable text wrapping, false to disable
      Returns:
      this ExcelCellStyle instance for method chaining
    • getBackgroundColor

      public ExcelColor getBackgroundColor()
      Gets the background color of the cell.
      Returns:
      the background color
    • setBackgroundColor

      public ExcelCellStyle setBackgroundColor(ExcelColor backgroundColor)
      Sets the background color of the cell.
      Parameters:
      backgroundColor - the background color to set
      Returns:
      this ExcelCellStyle instance for method chaining
    • setBackgroundColor

      public ExcelCellStyle setBackgroundColor(ExcelColorPalette backgroundColorPalette)
      Sets the background color of the cell.
      Parameters:
      backgroundColorPalette - the background color to set
      Returns:
      this ExcelCellStyle instance for method chaining
    • getExcelFont

      public ExcelFont getExcelFont()
      Gets the font styling for the cell.
      Returns:
      the Excel font
    • setExcelFont

      public ExcelCellStyle setExcelFont(ExcelFont excelFont)
      Sets the font styling for the cell.
      Parameters:
      excelFont - the Excel font to set
      Returns:
      this ExcelCellStyle instance for method chaining
    • getDataFormat

      public String getDataFormat()
      Gets the data format string for the cell (e.g., "0.00" for decimals, "m/d/yy" for dates).
      Returns:
      the data format string
    • setDataFormat

      public ExcelCellStyle setDataFormat(String dataFormat)
      Sets the data format string for the cell (e.g., "0.00" for decimals, "m/d/yy" for dates).
      Parameters:
      dataFormat - the data format string to set
      Returns:
      this ExcelCellStyle instance for method chaining
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      protected ExcelCellStyle clone()
      Overrides:
      clone in class Object