public interface TableBuilder extends TablePrinter, org.refcodes.mixin.mixins.RowWidthAccessor, org.refcodes.mixin.mixins.RowWidthAccessor.RowWidthBuilder<TableBuilder>
org.refcodes.mixin.mixins.RowWidthAccessor.RowWidthBuilder<B extends org.refcodes.mixin.mixins.RowWidthAccessor.RowWidthBuilder<?>>, org.refcodes.mixin.mixins.RowWidthAccessor.RowWidthMutator, org.refcodes.mixin.mixins.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 |
withAlignMode(TextAlignMode aTextAlignMode)
Sets an overall alignment mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withBorderEscCode(String aAnsiEscCode)
Sets an overall ANSI escape code for the borders and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withColumnAlignMode(TextAlignMode aTextAlignMode)
Sets the column's alignment mode for the header and the rows 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 |
withColumnFormatMode(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 |
withColumnMoreMode(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 |
withColumnSplitMode(LineSplitMode aLineSplitMode)
Sets the column's line split mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withColumnWidth(ColumnWidth aColumnWidth)
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 |
withColumnWidth(int aWidth,
WidthType 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 |
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 |
withFormatMode(TextFormatMode aTextFormatMode)
Sets an overall format mode for the header and the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderAlignMode(TextAlignMode aTextAlignMode)
Sets an overall alignment mode for the header and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderColumnAlignMode(TextAlignMode aTextAlignMode)
Sets the column's header alignment mode for the header and the rows 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 |
withHeaderColumnFormatMode(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 |
withHeaderColumnMoreMode(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 |
withHeaderColumnSplitMode(LineSplitMode aLineSplitMode)
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 |
withHeaderEscCode(String aAnsiEscCode)
Sets an overall ANSI escape code for the header and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderFormatMode(TextFormatMode aTextFormatMode)
Sets an overall format mode for the header and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderMoreMode(MoreTextMode aMoreTextMode)
Sets an overall "more" mode for the header and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withHeaderSplitMode(LineSplitMode aLineSplitMode)
Sets an overall line split mode for the header 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 |
withMoreMode(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 |
withRowAlignMode(TextAlignMode aTextAlignMode)
Sets an overall alignment mode for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowColumnAlignMode(TextAlignMode aTextAlignMode)
Sets the column's header alignment mode for the header and the rows 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 |
withRowColumnFormatMode(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 |
withRowColumnMoreMode(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 |
withRowColumnSplitMode(LineSplitMode aLineSplitMode)
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 |
withRowEscCode(String aAnsiEscCode)
Sets an overall ANSI escape code for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowFormatMode(TextFormatMode aTextFormatMode)
Sets an overall format mode for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowMoreMode(MoreTextMode aMoreTextMode)
Sets an overall "more" mode for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withRowSplitMode(LineSplitMode aLineSplitMode)
Sets an overall line split mode for the rows and returns this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withSplitMode(LineSplitMode aLineSplitMode)
Sets an overall line split mode for the header and the rows and returns
this
TableBuilder instance as of the builder pattern. |
TableBuilder |
withTableEscCode(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 |
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. |
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, WidthType 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.
WidthType.RELATIVE
or WidthType.ABSOLUTE
TableBuilder
instance to continue configuration.IllegalStateException
- in case there is none column already added.TableBuilder withColumnWidth(ColumnWidth aColumnWidth) throws IllegalStateException
addColumn()
method) width and returns this TableBuilder
instance as of the builder pattern.aColumnWidth
- The width and the WidthType
(
WidthType.RELATIVE
or WidthType.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. The latest setting wins.isEscCodesEnabled
- True to enable, false to disable escape code
support altogether.TableBuilder
instance to continue configuration.TableBuilder withTableEscCode(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 withAlignMode(TextAlignMode aTextAlignMode)
TableBuilder
instance as of the builder pattern. The latest
alignment mode being set wins.aTextAlignMode
- The TextAlignMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderAlignMode(TextAlignMode aTextAlignMode)
TableBuilder
instance as of the builder pattern. The latest
alignment mode being set wins.aTextAlignMode
- The TextAlignMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withRowAlignMode(TextAlignMode aTextAlignMode)
TableBuilder
instance as of the builder pattern. The latest
alignment mode being set wins.aTextAlignMode
- The TextAlignMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withColumnAlignMode(TextAlignMode aTextAlignMode)
TableBuilder
instance as of the builder pattern. The latest
alignment mode being set wins.aTextAlignMode
- The TextAlignMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderColumnAlignMode(TextAlignMode aTextAlignMode)
TableBuilder
instance as of the builder pattern. The
latest alignment mode being set wins.aTextAlignMode
- The TextAlignMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withRowColumnAlignMode(TextAlignMode aTextAlignMode)
TableBuilder
instance as of the builder pattern. The
latest alignment mode being set wins.aTextAlignMode
- The TextAlignMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withFormatMode(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 withHeaderFormatMode(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 withRowFormatMode(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 withColumnFormatMode(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 withHeaderColumnFormatMode(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 withRowColumnFormatMode(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 withSplitMode(LineSplitMode aLineSplitMode)
TableBuilder
instance as of the builder pattern. The latest
line split mode being set wins.aLineSplitMode
- The LineSplitMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderSplitMode(LineSplitMode aLineSplitMode)
TableBuilder
instance as of the builder pattern. The latest line
split mode being set wins.aLineSplitMode
- The LineSplitMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withRowSplitMode(LineSplitMode aLineSplitMode)
TableBuilder
instance as of the builder pattern. The latest line
split mode being set wins.aLineSplitMode
- The LineSplitMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withColumnSplitMode(LineSplitMode aLineSplitMode)
TableBuilder
instance as of the builder pattern. The latest
line split mode being set wins.aLineSplitMode
- The LineSplitMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withHeaderColumnSplitMode(LineSplitMode aLineSplitMode)
TableBuilder
instance as of the builder pattern. The
latest line split mode being set wins.aLineSplitMode
- The LineSplitMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withRowColumnSplitMode(LineSplitMode aLineSplitMode)
TableBuilder
instance as of the builder pattern. The
latest line split mode being set wins.aLineSplitMode
- The LineSplitMode
to be used for aligning
the text.TableBuilder
instance to continue configuration.TableBuilder withMoreMode(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 withHeaderMoreMode(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 withRowMoreMode(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 withColumnMoreMode(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 withHeaderColumnMoreMode(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 withRowColumnMoreMode(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 © 2015. All rights reserved.