public class CWC_LongestWord extends Object implements AT_ColumnWidthCalculator
Calculates the width of table columns using the longest word in a column.
| Constructor and Description |
|---|
CWC_LongestWord() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
static int[] |
longestWord(LinkedList<AT_Row> rows,
int colNumbers)
Returns an array with the width of the longest word per column calculated from the given table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalculateColumnWidthspublic 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 widthpublic static int[] longestWord(LinkedList<AT_Row> rows, int colNumbers)
Returns an array with the width of the longest word per column calculated from the given table. Default padding will be added per column. Padding for individual columns will be added if defined.
rows - the table rows for calculationscolNumbers - number of columns in the tableCopyright © 2014–2017. All rights reserved.