Class Columns
java.lang.Object
com.complexible.common.dataexporter.Columns
Utility class to create different kinds of columns
- Author:
- Evren Sirin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FormattedColumnReturns a column for displaying decimals and floating point numbers with"%,1.1f"formatting.static FormattedColumnReturns a column for displaying decimals and floating point numbers with given fraction digits.static voidensureWidth(com.brsanthu.dataexporter.model.Column column, int width) Ensures the given column is at least as wide as the given width.static FormattedColumnReturns a column for displaying cells with arbitrary formatting.static FormattedColumnReturns a column for displaying integers with"%,d"formatting.static MergedColumnReturns a merged column that will span the individual columns.static FormattedColumnReturns a column displayingtoStringvalues with proper word wrapping.static FormattedColumnReturns a column displayingtoStringvalues with proper word wrapping.
-
Constructor Details
-
Columns
public Columns()
-
-
Method Details
-
string
Returns a column displayingtoStringvalues with proper word wrapping. Column is aligned top left.- Parameters:
name- name of the column- Returns:
- string column
-
string
Returns a column displayingtoStringvalues with proper word wrapping.- Parameters:
name- name of the column- Returns:
- string column
-
integer
Returns a column for displaying integers with"%,d"formatting. Column is aligned top right.- Parameters:
name- name of the column- Returns:
- integer column
-
decimal
Returns a column for displaying decimals and floating point numbers with"%,1.1f"formatting. Column is aligned top right.- Parameters:
name- name of the column- Returns:
- decimal column
-
decimal
Returns a column for displaying decimals and floating point numbers with given fraction digits. Column is aligned top right.- Parameters:
name- name of the columnfractionDigits- number of fraction digits to show- Returns:
- decimal column
-
format
Returns a column for displaying cells with arbitrary formatting. Column is aligned top right.- Parameters:
name- name of the columnformat-format string- Returns:
- formatted column
-
merge
Returns a merged column that will span the individual columns.- Parameters:
title- title of the merged columncolumns- columns that will be spanned- Returns:
- merged column
-
ensureWidth
public static void ensureWidth(com.brsanthu.dataexporter.model.Column column, int width) Ensures the given column is at least as wide as the given width.- Parameters:
column- the column whose width is being adjustedwidth- the minimum width
-