Class DefaultStyle

java.lang.Object
com.compomics.util.io.export.styles.DefaultStyle
All Implemented Interfaces:
WorkbookStyle

public class DefaultStyle extends Object implements WorkbookStyle
Default style for Excel sheets.
Author:
Marc Vaudel, Harald Barsnes
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the height of a header row.
    org.apache.poi.ss.usermodel.CellStyle
    Returns the standard cell style of a header.
    org.apache.poi.ss.usermodel.CellStyle
    getHeaderStyle(int hierarchicalDepth)
    Returns the standard cell style of a header at the given hierarchical depth.
    float
    Returns the row height for the main title.
    org.apache.poi.ss.usermodel.CellStyle
    Returns the cell style for the main title.
    float
    Returns the height of a standard line.
    org.apache.poi.ss.usermodel.CellStyle
    Returns the standard cell style.
    org.apache.poi.ss.usermodel.CellStyle
    getStandardStyle(int hierarchicalDepth)
    Returns the standard cell style for the given hierarchical depth.
    getStyle(ExcelWriter excelWriter)
    Returns the style attached to that writer or create a new one if none found.

    Methods inherited from class java.lang.Object

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

    • DefaultStyle

      public DefaultStyle()
      Empty default constructor.
  • Method Details

    • getStyle

      public static DefaultStyle getStyle(ExcelWriter excelWriter)
      Returns the style attached to that writer or create a new one if none found.
      Parameters:
      excelWriter - the writer of interest
      Returns:
      the style attached to that writer
    • getMainTitleStyle

      public org.apache.poi.ss.usermodel.CellStyle getMainTitleStyle()
      Description copied from interface: WorkbookStyle
      Returns the cell style for the main title.
      Specified by:
      getMainTitleStyle in interface WorkbookStyle
      Returns:
      the cell style for the main title
    • getMainTitleRowHeight

      public float getMainTitleRowHeight()
      Description copied from interface: WorkbookStyle
      Returns the row height for the main title.
      Specified by:
      getMainTitleRowHeight in interface WorkbookStyle
      Returns:
      the row height for the main title
    • getStandardStyle

      public org.apache.poi.ss.usermodel.CellStyle getStandardStyle()
      Description copied from interface: WorkbookStyle
      Returns the standard cell style.
      Specified by:
      getStandardStyle in interface WorkbookStyle
      Returns:
      the standard cell style
    • getStandardStyle

      public org.apache.poi.ss.usermodel.CellStyle getStandardStyle(int hierarchicalDepth)
      Description copied from interface: WorkbookStyle
      Returns the standard cell style for the given hierarchical depth. The depth is defined by the sublevel of the current cell.
      Specified by:
      getStandardStyle in interface WorkbookStyle
      Parameters:
      hierarchicalDepth - the hierarchical depth
      Returns:
      the standard cell style for the given hierarchical depth
    • getStandardHeight

      public float getStandardHeight()
      Description copied from interface: WorkbookStyle
      Returns the height of a standard line.
      Specified by:
      getStandardHeight in interface WorkbookStyle
      Returns:
      the height of a standard line
    • getHeaderStyle

      public org.apache.poi.ss.usermodel.CellStyle getHeaderStyle()
      Description copied from interface: WorkbookStyle
      Returns the standard cell style of a header.
      Specified by:
      getHeaderStyle in interface WorkbookStyle
      Returns:
      the standard cell style of a header
    • getHeaderStyle

      public org.apache.poi.ss.usermodel.CellStyle getHeaderStyle(int hierarchicalDepth)
      Description copied from interface: WorkbookStyle
      Returns the standard cell style of a header at the given hierarchical depth. The depth is defined by the sublevel of the current cell.
      Specified by:
      getHeaderStyle in interface WorkbookStyle
      Parameters:
      hierarchicalDepth - the hierarchical depth
      Returns:
      the standard cell style for the given hierarchical depth
    • getHeaderHeight

      public float getHeaderHeight()
      Description copied from interface: WorkbookStyle
      Returns the height of a header row.
      Specified by:
      getHeaderHeight in interface WorkbookStyle
      Returns:
      the height of a header row