|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@ComponentSpecification public interface LineWrapper
This is the interface used to
wrap
texts
if they exceed a specific length. It even allows to do complex
multi-column layouts
easily.
Method Summary | |
---|---|
int |
wrap(Appendable appendable,
TextTableInfo tableInfo,
String columnText,
TextColumnInfo columnInfo)
This method appends the given
text to the appendable . |
int |
wrap(Appendable appendable,
TextTableInfo tableInfo,
String column1Text,
TextColumnInfo column1Info,
String column2Text,
TextColumnInfo column2Info)
This method is like wrap(Appendable, TextTableInfo, String, TextColumnInfo) but for a
two-column layout. |
int |
wrap(Appendable appendable,
TextTableInfo tableInfo,
String column1Text,
TextColumnInfo column1Info,
String column2Text,
TextColumnInfo column2Info,
String column3Text,
TextColumnInfo column3Info)
This method is like wrap(Appendable, TextTableInfo, String, TextColumnInfo) but for a
three-column layout. |
int |
wrap(Appendable appendable,
TextTableInfo tableInfo,
TextColumn... columns)
This method is like wrap(Appendable, TextTableInfo, String, TextColumnInfo, String, TextColumnInfo, String, TextColumnInfo)
for any number of columns. |
Method Detail |
---|
int wrap(Appendable appendable, TextTableInfo tableInfo, String columnText, TextColumnInfo columnInfo)
appends
the given
text
to the appendable
. If the text is longer
than the number of characters
left in the
current line, the text
is wrapped. This means the current line
is filled with parts of the text
, a newline is
added
and the next line is filled
with the same procedure until the entire text
is processed.
The last line is NOT terminated with a newline but ends with the last
character of the text.
appendable
- is the target where to
append
to.tableInfo
- is the TextTableInfo
for the general layout.columnText
- is the text to append. The text may contain newline
characters to indicate a line-break is forced at those positions.columnInfo
- holds the configuration like
width
,
alignment
,
indent
, etc.
appended
excluding the
first line. In other words the number of
line
separators
that have been appended.int wrap(Appendable appendable, TextTableInfo tableInfo, String column1Text, TextColumnInfo column1Info, String column2Text, TextColumnInfo column2Info)
wrap(Appendable, TextTableInfo, String, TextColumnInfo)
but for a
two-column layout.
appendable
- is the target where to
append
to.tableInfo
- is the TextTableInfo
for the general layout.column1Text
- is the text for the first column.column1Info
- is the TextColumnInfo
of the first column.column2Text
- is the text for the second column.column2Info
- is the TextColumnInfo
of the second column.
appended
excluding the
first line. In other words the number of
line
separators
that have been appended.wrap(Appendable, TextTableInfo, TextColumn[])
int wrap(Appendable appendable, TextTableInfo tableInfo, String column1Text, TextColumnInfo column1Info, String column2Text, TextColumnInfo column2Info, String column3Text, TextColumnInfo column3Info)
wrap(Appendable, TextTableInfo, String, TextColumnInfo)
but for a
three-column layout.
appendable
- is the target where to
append
to.tableInfo
- is the TextTableInfo
for the general layout.column1Text
- is the text for the first column.column1Info
- is the TextColumnInfo
of the first column.column2Text
- is the text for the second column.column2Info
- is the TextColumnInfo
of the second column.column3Text
- is the text for the third column.column3Info
- is the TextColumnInfo
of the third column.
appended
excluding the
first line. In other words the number of
line
separators
that have been appended.wrap(Appendable, TextTableInfo, TextColumn[])
int wrap(Appendable appendable, TextTableInfo tableInfo, TextColumn... columns)
wrap(Appendable, TextTableInfo, String, TextColumnInfo, String, TextColumnInfo, String, TextColumnInfo)
for any number of columns.
appendable
- is the target where to
append
to.tableInfo
- is the TextTableInfo
for the general layout.columns
- are the columns to append
.
appended
excluding the
first line. In other words the number of
line
separators
that have been appended.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |