public class MessageUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
LINE_LENGTH
How long a line can be before being split by
showMessage(java.lang.String) . |
Modifier and Type | Method and Description |
---|---|
static void |
showMessage(String message)
Formats and word-wraps the supplied text, then outputs it as a sector
message.
|
static void |
showMessage(@Nullable String preamble,
String message,
boolean indentMessage)
Formats and word-wraps the supplied text, then outputs it as a sector
message.
|
public static final int LINE_LENGTH
showMessage(java.lang.String)
. This is hardcoded to
a number that still looks good at very low resolutions. If you wish to
have a different message length, you can use StringUtils.wrapString(java.lang.String, int)
then output the results.public static void showMessage(@Nullable @Nullable String preamble, String message, boolean indentMessage)
preamble
- The header for this message, won't be indented. Can be null.message
- The main body of text.indentMessage
- Whether to indent each line of the main body.public static void showMessage(String message)
message
- The message to output.