|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--prog.utils.WordWrap
The format() method of this class converts a long String into a multi-line String whose pieces are less than or equal to the specified line length. Any newline characters are retained, and newline characters are inserted wherever a word wrap is appropriate.
| Field Summary | |
int[] |
breakCols
A record of the column numbers at which format() broke the input String to new lines. |
| Constructor Summary | |
WordWrap()
|
|
| Method Summary | |
java.lang.String |
format(java.lang.String str,
int linelength)
Converts a long String into a multi-line String that fits within a specified column width. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int[] breakCols
| Constructor Detail |
public WordWrap()
| Method Detail |
public java.lang.String format(java.lang.String str,
int linelength)
format in interface TextFormatterpublic static void main(java.lang.String[] args)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||