|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.mmm.util.text.api.TextTableInfo
public class TextTableInfo
This is a Java-bean for the layout-configuration of a text table.
It contains the width
, line-separator
, and various other meta-information for the layout of a
textual table.
LineWrapper
Field Summary | |
---|---|
static int |
DEFAULT_WIDTH
The default width . |
private String |
lineSeparator
|
private int |
width
|
Constructor Summary | |
---|---|
TextTableInfo()
The constructor. |
Method Summary | |
---|---|
String |
getLineSeparator()
This method gets the StringUtil.LINE_SEPARATOR used to terminate a
line of text. |
int |
getWidth()
This method gets the width of the text-table in characters. |
void |
setLineSeparator(String newline)
This method sets the line-separator . |
void |
setWidth(int width)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_WIDTH
width
. This default is suitable for a
single-column layout.
private String lineSeparator
getLineSeparator()
private int width
getWidth()
Constructor Detail |
---|
public TextTableInfo()
Method Detail |
---|
public String getLineSeparator()
StringUtil.LINE_SEPARATOR
used to terminate a
line of text. Only the line-separator of the
last
column
is used and all others are ignored.
public void setLineSeparator(String newline)
line-separator
.
newline
- is the new line-separator.StringUtil.LINE_SEPARATOR
,
StringUtil.LINE_SEPARATOR_CR
,
StringUtil.LINE_SEPARATOR_CRLF
,
StringUtil.LINE_SEPARATOR_LF
,
StringUtil.LINE_SEPARATOR_LFCR
public int getWidth()
console
. It may be
TextColumnInfo.WIDTH_AUTO_ADJUST
if all
column-widths
are set to actual positive
values. Otherwise the value returned by this method has to be positive and
greater or equal to the sum of the following term for each
column
:
WhereTextColumnInfo.getBorderLeft()
.length() +TextColumnInfo.getBorderRight()
.length() + <column-with>
<column-with>
is TextColumnInfo.getWidth()
or (in case of TextColumnInfo.WIDTH_AUTO_ADJUST
) an auto-calculated
value that has to be greater or equal to 1. The default value is
80.
public void setWidth(int width)
width
- is the width to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |