public interface TableBuilder extends TablePrinter, org.refcodes.mixin.RowWidthAccessor, org.refcodes.mixin.RowWidthAccessor.RowWidthBuilder<TableBuilder>
org.refcodes.mixin.RowWidthAccessor.RowWidthBuilder<B extends org.refcodes.mixin.RowWidthAccessor.RowWidthBuilder<?>>, org.refcodes.mixin.RowWidthAccessor.RowWidthMutator, org.refcodes.mixin.RowWidthAccessor.RowWidthProperty
Modifier and Type | Method and Description |
---|---|
TableBuilder |
addColumn()
Adds a column and returns this
TableBuilder instance as of the
builder pattern. |
int[] |
toColumnWidths()
Returns the currently calculated or configured column widths.
|
TableBuilder |
withBorderEscCode(String aAnsiEscCode)
Sets an overall ANSI escape code for the borders and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withColumnEscCode(String aAnsiEscCode)
Sets the column's ANSI escape code for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withColumnHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
Sets the column's alignment mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withColumnMoreTextMode(MoreTextMode aMoreTextMode)
Sets the column's "more" mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withColumnSplitTextMode(SplitTextMode aSplitTextMode)
Sets the column's line split mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withColumnTextFormatMode(TextFormatMode aTextFormatMode)
Sets the column's format mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withColumnWidth(int aWidth)
Sets the current column's (the last added one with the
addColumn() method) absolute width () @link
ColumnWidthType#ABSOLUTE) and returns this TableBuilder instance
as of the builder pattern. |
TableBuilder |
withColumnWidth(int aWidth,
ColumnWidthType aWidthType)
Sets the current column's (the last added one with the
addColumn() method) width and returns this TableBuilder
instance as of the builder pattern. |
TableBuilder |
withColumnWidthMetrics(ColumnWidthMetrics aColumnWidthMetrics)
Sets the current column's (the last added one with the
addColumn() method) width and returns this TableBuilder
instance as of the builder pattern. |
TableBuilder |
withEscCode(String aAnsiEscCode)
Sets an overall ANSI escape code for the header, the rows as well as the
borders; and returns this
TableBuilder instance as of the builder
pattern. |
TableBuilder |
withEscCodes(boolean isEscCodesEnabled)
Sets an overall ANSI escape code support for the
TableBuilder ,
for the rows as well as the borders; and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderColumnEscCode(String aAnsiEscCode)
Sets the column's header ANSI escape code for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderColumnHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
Sets the column's header alignment mode for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderColumnMoreTextMode(MoreTextMode aMoreTextMode)
Sets the column's header "more" mode for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderColumnSplitTextMode(SplitTextMode aSplitTextMode)
Sets the column's header line split mode for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderColumnTextFormatMode(TextFormatMode aTextFormatMode)
Sets the column's header format mode for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderEscCode(String aAnsiEscCode)
Sets an overall ANSI escape code for the header and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
Sets an overall alignment mode for the header and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderMoreTextMode(MoreTextMode aMoreTextMode)
Sets an overall "more" mode for the header and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderSplitTextMode(SplitTextMode aSplitTextMode)
Sets an overall line split mode for the header and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderTextFormatMode(TextFormatMode aTextFormatMode)
Sets an overall format mode for the header and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
Sets an overall alignment mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withLeftBorder(boolean hasLeftBorder)
Sets whether to print the left border and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withLineBreak(String aLineBreak)
Sets the required line break and returns this
TableBuilder
instance as of the builder pattern. |
TableBuilder |
withMoreTextMode(MoreTextMode aMoreTextMode)
Sets an overall "more" mode for the header and the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withPrintStream(PrintStream aPrintStream)
Sets the print stream to be used when using the print methods of the
TableBuilder and returns this TableBuilder instance as of
the builder pattern. |
TableBuilder |
withResetEscCode(String aAnsiEscCode)
Sets the ANSI reset escape code for this
TableBuilder instance as
of the builder pattern. |
TableBuilder |
withRightBorder(boolean hasRightBorder)
Sets whether to print the right border and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowColumnEscCode(String aAnsiEscCode)
Sets the column's header ANSI escape code for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowColumnHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
Sets the column's header alignment mode for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowColumnMoreTextMode(MoreTextMode aMoreTextMode)
Sets the column's header "more" mode for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowColumnSplitTextMode(SplitTextMode aSplitTextMode)
Sets the column's header line split mode for the header and the rows and
returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowColumnTextFormatMode(TextFormatMode aTextFormatMode)
Sets the column's row format mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowEscCode(String aAnsiEscCode)
Sets an overall ANSI escape code for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
Sets an overall alignment mode for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowMoreTextMode(MoreTextMode aMoreTextMode)
Sets an overall "more" mode for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowSplitTextMode(SplitTextMode aSplitTextMode)
Sets an overall line split mode for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowTextFormatMode(TextFormatMode aTextFormatMode)
Sets an overall format mode for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withSplitTextMode(SplitTextMode aSplitTextMode)
Sets an overall line split mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withTableStyle(TableStyle aTableStyle)
Sets the
TableStyle to use when printing and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withTextEscCode(String aAnsiEscCode)
Sets an overall ANSI escape code for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withTextFormatMode(TextFormatMode aTextFormatMode)
Sets an overall format mode for the header and the rows and returns this
TableBuilder instance as of the builder pattern. |
getTableStatus, printHeader, printHeaderBegin, printHeaderContinue, printHeaderEnd, printHeaderEnd, printRow, printRowBegin, printRowContinue, printRowEnd, printTail, setTableStatus, toHeader, toHeaderBegin, toHeaderContinue, toHeaderEnd, toHeaderEnd, toRow, toRowBegin, toRowContinue, toRowEnd, toTail
TableBuilder addColumn()
TableBuilder
instance as of the
builder pattern.TableBuilder
instance to continue configuration.TableBuilder withColumnWidth(int aWidth, ColumnWidthType aWidthType) throws IllegalStateException
addColumn()
method) width and returns this TableBuilder
instance as of the builder pattern.aWidth
- The width for the column.aWidthType
- The type the width is of, e.g.
ColumnWidthType.RELATIVE
or
ColumnWidthType.ABSOLUTE
TableBuilder
instance to continue configuration.IllegalStateException
- in case there is none column already added.TableBuilder withColumnWidth(int aWidth) throws IllegalStateException
addColumn()
method) absolute width () @link
ColumnWidthType#ABSOLUTE) and returns this TableBuilder
instance
as of the builder pattern.
Same as calling "withColumnWidth(int, ColumnWidthType.ABSOLUTE)}"aWidth
- The width for the column.TableBuilder
instance to continue configuration.IllegalStateException
- in case there is none column already added.TableBuilder withColumnWidthMetrics(ColumnWidthMetrics aColumnWidthMetrics) throws IllegalStateException
addColumn()
method) width and returns this TableBuilder
instance as of the builder pattern.aColumnWidthMetrics
- The width and the ColumnWidthType
(
ColumnWidthType.RELATIVE
or
ColumnWidthType.ABSOLUTE
) of the column.TableBuilder
instance to continue configuration.IllegalStateException
- in case there is none column already added.TableBuilder withLeftBorder(boolean hasLeftBorder)
TableBuilder
instance as of the builder pattern.hasLeftBorder
- True in case a left border is to be printed, elser
falseTableBuilder
instance to continue configuration.TableBuilder withRightBorder(boolean hasRightBorder)
TableBuilder
instance as of the builder pattern.hasRightBorder
- True in case a right border is to be printed, elser
falseTableBuilder
instance to continue configuration.TableBuilder withTableStyle(TableStyle aTableStyle)
TableStyle
to use when printing and returns this
TableBuilder
instance as of the builder pattern.aTableStyle
- The TableStyle
defining the tables style to be
used when printing the table borders.TableBuilder
instance to continue configuration.TableBuilder withLineBreak(String aLineBreak)
TableBuilder
instance as of the builder pattern.aLineBreak
- The line break character to use, by default the
platform specific one is used.TableBuilder
instance to continue configuration.TableBuilder withPrintStream(PrintStream aPrintStream)
TableBuilder
and returns this TableBuilder
instance as of
the builder pattern.aPrintStream
- The PrintStream
to be used when printing out
the table.TableBuilder
instance to continue configuration.TableBuilder withEscCodes(boolean isEscCodesEnabled)
TableBuilder
,
for the rows as well as the borders; and returns this
TableBuilder
instance as of the builder pattern. In case of being
set to Boolean.FALSE
, then an ANSI support is disabled
altogether, else it is enabled (again, if already configured). The latest
setting wins.isEscCodesEnabled
- True to enable, false to disable escape code
support altogether.TableBuilder
instance to continue configuration.TableBuilder withEscCode(String aAnsiEscCode)
TableBuilder
instance as of the builder
pattern. In case an ANSI escape codes is set, then an ANSI reset code is
prepended to the according text being printed. The latest ANSI escape
code set wins.TableBuilder
instance to continue configuration.TableBuilder withBorderEscCode(String aAnsiEscCode)
TableBuilder
instance as of the builder pattern. In case an ANSI
escape codes is set, then an ANSI reset code is prepended to the
according text being printed. The latest ANSI escape code set wins.TableBuilder
instance to continue configuration.TableBuilder withTextEscCode(String aAnsiEscCode)
TableBuilder
instance as of the builder pattern. In case an
ANSI escape codes is set, then an ANSI reset code is prepended to the
according text being printed. The latest ANSI escape code set wins.TableBuilder
instance to continue configuration.TableBuilder withHeaderEscCode(String aAnsiEscCode)
TableBuilder
instance as of the builder pattern. The latest ANSI
escape code being set wins.aAnsiEscCode
- The String
to be used for ANSI escaping the
text.TableBuilder
instance to continue configuration.TableBuilder withRowEscCode(String aAnsiEscCode)
TableBuilder
instance as of the builder pattern. The latest ANSI
escape code being set wins.aAnsiEscCode
- The String
to be used for ANSI escaping the
text.TableBuilder
instance to continue configuration.TableBuilder withColumnEscCode(String aAnsiEscCode)
TableBuilder
instance as of the builder pattern. The
latest ANSI escape code being set wins.aAnsiEscCode
- The String
to be used for ANSI escaping the
text.TableBuilder
instance to continue configuration.TableBuilder withHeaderColumnEscCode(String aAnsiEscCode)
TableBuilder
instance as of the builder pattern. The
latest ANSI escape code being set wins.aAnsiEscCode
- The String
to be used for ANSI escaping the
text.TableBuilder
instance to continue configuration.TableBuilder withRowColumnEscCode(String aAnsiEscCode)
TableBuilder
instance as of the builder pattern. The
latest ANSI escape code being set wins.aAnsiEscCode
- The String
to be used for ANSI escaping the
text.TableBuilder
instance to continue configuration.TableBuilder withResetEscCode(String aAnsiEscCode)
TableBuilder
instance as
of the builder pattern. In case an ANSI escape codes is set, then this
ANSI reset code is prepended to the according text being printed.TableBuilder
instance to continue configuration.TableBuilder withHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
TableBuilder
instance as of the builder pattern. The latest
alignment mode being set wins.aHorizAlignTextMode
- The HorizAlignTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
TableBuilder
instance as of the builder pattern. The latest
alignment mode being set wins.aHorizAlignTextMode
- The HorizAlignTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withRowHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
TableBuilder
instance as of the builder pattern. The latest
alignment mode being set wins.aHorizAlignTextMode
- The HorizAlignTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withColumnHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
TableBuilder
instance as of the builder pattern. The latest
alignment mode being set wins.aHorizAlignTextMode
- The HorizAlignTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderColumnHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
TableBuilder
instance as of the builder pattern. The
latest alignment mode being set wins.aHorizAlignTextMode
- The HorizAlignTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withRowColumnHorizAlignTextMode(HorizAlignTextMode aHorizAlignTextMode)
TableBuilder
instance as of the builder pattern. The
latest alignment mode being set wins.aHorizAlignTextMode
- The HorizAlignTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withTextFormatMode(TextFormatMode aTextFormatMode)
TableBuilder
instance as of the builder pattern. The latest
format mode being set wins.aTextFormatMode
- The TextFormatMode
to be used for
formating the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderTextFormatMode(TextFormatMode aTextFormatMode)
TableBuilder
instance as of the builder pattern. The latest
format mode being set wins.aTextFormatMode
- The TextFormatMode
to be used for
formating the text.TableBuilder
instance to continue configuration.TableBuilder withRowTextFormatMode(TextFormatMode aTextFormatMode)
TableBuilder
instance as of the builder pattern. The latest
format mode being set wins.aTextFormatMode
- The TextFormatMode
to be used for
formating the text.TableBuilder
instance to continue configuration.TableBuilder withColumnTextFormatMode(TextFormatMode aTextFormatMode)
TableBuilder
instance as of the builder pattern. The latest
format mode being set wins.aTextFormatMode
- The TextFormatMode
to be used for
formating the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderColumnTextFormatMode(TextFormatMode aTextFormatMode)
TableBuilder
instance as of the builder pattern. The
latest format mode being set wins.aTextFormatMode
- The TextFormatMode
to be used for
formating the text.TableBuilder
instance to continue configuration.TableBuilder withRowColumnTextFormatMode(TextFormatMode aTextFormatMode)
TableBuilder
instance as of the builder pattern. The latest
format mode being set wins.aTextFormatMode
- The TextFormatMode
to be used for
formating the text.TableBuilder
instance to continue configuration.TableBuilder withSplitTextMode(SplitTextMode aSplitTextMode)
TableBuilder
instance as of the builder pattern. The latest
line split mode being set wins.aSplitTextMode
- The SplitTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderSplitTextMode(SplitTextMode aSplitTextMode)
TableBuilder
instance as of the builder pattern. The latest line
split mode being set wins.aSplitTextMode
- The SplitTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withRowSplitTextMode(SplitTextMode aSplitTextMode)
TableBuilder
instance as of the builder pattern. The latest line
split mode being set wins.aSplitTextMode
- The SplitTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withColumnSplitTextMode(SplitTextMode aSplitTextMode)
TableBuilder
instance as of the builder pattern. The latest
line split mode being set wins.aSplitTextMode
- The SplitTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderColumnSplitTextMode(SplitTextMode aSplitTextMode)
TableBuilder
instance as of the builder pattern. The
latest line split mode being set wins.aSplitTextMode
- The SplitTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withRowColumnSplitTextMode(SplitTextMode aSplitTextMode)
TableBuilder
instance as of the builder pattern. The
latest line split mode being set wins.aSplitTextMode
- The SplitTextMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withMoreTextMode(MoreTextMode aMoreTextMode)
TableBuilder
instance as of the builder pattern. The latest
"more" mode being set wins.aMoreTextMode
- The MoreTextMode
to be used for aligning the
text.TableBuilder
instance to continue configuration.TableBuilder withHeaderMoreTextMode(MoreTextMode aMoreTextMode)
TableBuilder
instance as of the builder pattern. The latest
"more" mode being set wins.aMoreTextMode
- The MoreTextMode
to be used for aligning the
text.TableBuilder
instance to continue configuration.TableBuilder withRowMoreTextMode(MoreTextMode aMoreTextMode)
TableBuilder
instance as of the builder pattern. The latest
"more" mode being set wins.aMoreTextMode
- The MoreTextMode
to be used for aligning the
text.TableBuilder
instance to continue configuration.TableBuilder withColumnMoreTextMode(MoreTextMode aMoreTextMode)
TableBuilder
instance as of the builder pattern. The latest
"more" mode being set wins.aMoreTextMode
- The MoreTextMode
to be used for aligning the
text.TableBuilder
instance to continue configuration.TableBuilder withHeaderColumnMoreTextMode(MoreTextMode aMoreTextMode)
TableBuilder
instance as of the builder pattern. The
latest "more" mode being set wins.aMoreTextMode
- The MoreTextMode
to be used for aligning the
text.TableBuilder
instance to continue configuration.TableBuilder withRowColumnMoreTextMode(MoreTextMode aMoreTextMode)
TableBuilder
instance as of the builder pattern. The
latest "more" mode being set wins.aMoreTextMode
- The MoreTextMode
to be used for aligning the
text.TableBuilder
instance to continue configuration.int[] toColumnWidths()
Copyright © 2016. All rights reserved.