public class TableBuilder extends Object
Modifier and Type | Class and Description |
---|---|
class |
TableBuilder.BorderStub |
class |
TableBuilder.CellMatcherStub |
Constructor and Description |
---|
TableBuilder(TableModel model)
Construct a table with the given model.
|
Modifier and Type | Method and Description |
---|---|
TableBuilder |
addFullBorder(BorderStyle style)
Set a border around each and every cell of the table.
|
TableBuilder |
addHeaderAndVerticalsBorders(BorderStyle style)
Set a border on the outline of the whole table, around the first row and draw vertical lines
around each column.
|
TableBuilder |
addHeaderBorder(BorderStyle style)
Set a border on the outline of the whole table, as well as around the first row.
|
TableBuilder |
addInnerBorder(BorderStyle style)
Set a border on the inner verticals and horizontals of the table, but not on the outline.
|
TableBuilder |
addOutlineBorder(BorderStyle style)
Set a border on the outline of the whole table.
|
Table |
build() |
TableModel |
getModel() |
TableBuilder.CellMatcherStub |
on(CellMatcher matcher) |
TableBuilder.BorderStub |
paintBorder(BorderStyle style,
int match) |
public TableBuilder(TableModel model)
default formatting
using toString()sizing strategy
trying to use the maximum space, resorting to splitting lines on
spaceswrapping text
on space charactersleft aligning
text.public TableModel getModel()
public TableBuilder.CellMatcherStub on(CellMatcher matcher)
public Table build()
public TableBuilder.BorderStub paintBorder(BorderStyle style, int match)
public TableBuilder addOutlineBorder(BorderStyle style)
public TableBuilder addHeaderBorder(BorderStyle style)
public TableBuilder addFullBorder(BorderStyle style)
public TableBuilder addHeaderAndVerticalsBorders(BorderStyle style)
public TableBuilder addInnerBorder(BorderStyle style)