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 DefaultStyle()
Empty default constructor. -
Method Summary
Modifier and Type Method Description float
getHeaderHeight()
Returns the height of a header row.org.apache.poi.ss.usermodel.CellStyle
getHeaderStyle()
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
getMainTitleRowHeight()
Returns the row height for the main title.org.apache.poi.ss.usermodel.CellStyle
getMainTitleStyle()
Returns the cell style for the main title.float
getStandardHeight()
Returns the height of a standard line.org.apache.poi.ss.usermodel.CellStyle
getStandardStyle()
Returns the standard cell style.org.apache.poi.ss.usermodel.CellStyle
getStandardStyle(int hierarchicalDepth)
Returns the standard cell style for the given hierarchical depth.static DefaultStyle
getStyle(ExcelWriter excelWriter)
Returns the style attached to that writer or create a new one if none found.
-
Constructor Details
-
DefaultStyle
public DefaultStyle()Empty default constructor.
-
-
Method Details
-
getStyle
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 interfaceWorkbookStyle
- 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 interfaceWorkbookStyle
- 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 interfaceWorkbookStyle
- 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 interfaceWorkbookStyle
- 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 interfaceWorkbookStyle
- 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 interfaceWorkbookStyle
- 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 interfaceWorkbookStyle
- 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 interfaceWorkbookStyle
- Returns:
- the height of a header row
-