public class CWC_FixedWidth extends Object implements AT_ColumnWidthCalculator
Calculates the width of table columns using a fixed width for each column.
| Constructor and Description |
|---|
CWC_FixedWidth()
Creates a new calculator object.
|
| Modifier and Type | Method and Description |
|---|---|
CWC_FixedWidth |
add(int width)
Adds a column with the column width.
|
int[] |
calculateColumnWidths(LinkedList<AT_Row> rows,
int colNumbers,
int tableWidth)
Returns the width of each column in an array, column one being [0] and so on.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalculateColumnWidthspublic CWC_FixedWidth()
Creates a new calculator object. Default internal array is set to size 1 (1 column) of width 0.
public CWC_FixedWidth add(int width)
Adds a column with the column width.
width - column width in number of characters, ignored if smaller than 3public int[] calculateColumnWidths(LinkedList<AT_Row> rows, int colNumbers, int tableWidth)
AT_ColumnWidthCalculatorReturns the width of each column in an array, column one being [0] and so on.
calculateColumnWidths in interface AT_ColumnWidthCalculatorrows - the table rows with rules and contentcolNumbers - number of columns in the tabletableWidth - required overall table widthCopyright © 2014–2017. All rights reserved.