|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.jpeg.jj2000.j2k.util.MsgPrinter
public class MsgPrinter
This utility class formats messages to the specified line width, by inserting line-breaks between words, and printing the resulting lines.
Field Summary | |
---|---|
int |
lw
The line width to use |
Constructor Summary | |
---|---|
MsgPrinter(int linewidth)
Creates a new message printer with the specified line width and with the default locale. |
Method Summary | |
---|---|
int |
getLineWidth()
Returns the line width that is used for formatting. |
void |
print(PrintWriter out,
int flind,
int ind,
String msg)
Formats the message to print in the current line width, by breaking the message into lines between words. |
void |
setLineWidth(int linewidth)
Sets the line width to the specified value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int lw
Constructor Detail |
---|
public MsgPrinter(int linewidth)
linewidth
- The line width for which to format (in
characters)Method Detail |
---|
public int getLineWidth()
public void setLineWidth(int linewidth)
linewidth
- The new line width to use (in cahracters)public void print(PrintWriter out, int flind, int ind, String msg)
out
- Where to print the message.flind
- The indentation for the first line.ind
- The indentation for the other lines.msg
- The message to format and print.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |