|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.util.FormattableColumn
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class FormattableColumn
This class provides a data structure with information about a column to use
with the ColumnFormatter
.
Constructor Summary | |
---|---|
FormattableColumn(int width,
HorizontalAlignment alignment,
java.lang.String... labelLines)
Creates a new formattable column with the provided information. |
Method Summary | |
---|---|
void |
format(java.lang.StringBuilder buffer,
java.lang.String text,
OutputFormat format)
Appends a formatted representation of the provided text to the given buffer. |
HorizontalAlignment |
getAlignment()
Retrieves the alignment for this column. |
java.lang.String[] |
getLabelLines()
Retrieves the lines to use as the label for this column. |
java.lang.String |
getSingleLabelLine()
Retrieves a single-line representation of the label. |
int |
getWidth()
Retrieves the width for this column. |
java.lang.String |
toString()
Retrieves a string representation of this formattable column. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this formattable column to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FormattableColumn(int width, HorizontalAlignment alignment, java.lang.String... labelLines)
width
- The width to use for this column. It must be greater
than or equal to 1.alignment
- The alignment to use for this column. It must not be
null
.labelLines
- The lines to use as the label for this column. It must
not be null
.Method Detail |
---|
public int getWidth()
public HorizontalAlignment getAlignment()
public java.lang.String[] getLabelLines()
public java.lang.String getSingleLabelLine()
public void format(java.lang.StringBuilder buffer, java.lang.String text, OutputFormat format)
buffer
- The buffer to which the text should be appended. It must
not be null
.text
- The text to append to the buffer. It must not be
null
.format
- The format to use for the text. It must not be
null
.public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the string representation should be
appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |