|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.nukesoft.bot2.botutil.VerboseConsole
The VerboseConsole class is used to dynamicaly define the verbosity of all console output. This class can be used as a substitute to System.out. Class constants can be used to implement ANSI colors and text effects.
Field Summary | |
static int |
CRITICAL
|
static int |
HIGH
|
static int |
LOW
|
static int |
MEDIUM
|
static int |
SILENT
|
Constructor Summary | |
VerboseConsole()
|
|
VerboseConsole(int level)
|
Method Summary | |
static String |
BLACK_BACK()
|
static String |
BLACK_TEXT()
|
static String |
BLINK_OFF()
|
static String |
BLINK_ON()
|
static String |
BLUE_BACK()
|
static String |
BLUE_TEXT()
|
static String |
BOLD_OFF()
|
static String |
BOLD_ON()
|
static String |
BROWN_BACK()
|
static String |
BROWN_TEXT()
|
static String |
CYAN_BACK()
|
static String |
CYAN_TEXT()
|
static void |
enableANSI(boolean isOn)
Enables or disables ANSI color. |
static String |
GRAY_TEXT()
|
static String |
GREEN_BACK()
|
static String |
GREEN_TEXT()
|
static String |
MAGENTA_BACK()
|
static String |
MAGENTA_TEXT()
|
static void |
main(String[] args)
Does a demo of what ANSI color can do. |
static void |
print(String s)
Print a string at the default level. |
static void |
print(String s,
int level)
Print a string at a given level. |
static void |
println(String s)
Print a string at the default level. |
static void |
println(String s,
int level)
Print a string at a given level. |
static String |
RED_BACK()
|
static String |
RED_TEXT()
|
static String |
RESET_COLORS()
|
static String |
REVERSE_OFF()
|
static String |
REVERSE_ON()
|
static void |
setLevel(int level)
Sets the verbocity level of the console. |
static String |
WHITE_BACK()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SILENT
public static final int LOW
public static final int MEDIUM
public static final int HIGH
public static final int CRITICAL
Constructor Detail |
public VerboseConsole()
public VerboseConsole(int level)
Method Detail |
public static void setLevel(int level)
level
- The target verbocity level.public static void enableANSI(boolean isOn)
isOn
- TRUE = on, FALSE = off.public static void print(String s, int level)
s
- The string to print.level
- The level of this message.public static void print(String s)
s
- The string to print.public static void println(String s, int level)
s
- The string to print.level
- The level of this message.public static void println(String s)
s
- The string to print.public static final String BLACK_TEXT()
public static final String RED_TEXT()
public static final String GREEN_TEXT()
public static final String BROWN_TEXT()
public static final String BLUE_TEXT()
public static final String MAGENTA_TEXT()
public static final String CYAN_TEXT()
public static final String GRAY_TEXT()
public static final String BLACK_BACK()
public static final String RED_BACK()
public static final String GREEN_BACK()
public static final String BROWN_BACK()
public static final String BLUE_BACK()
public static final String MAGENTA_BACK()
public static final String CYAN_BACK()
public static final String WHITE_BACK()
public static final String RESET_COLORS()
public static final String BOLD_ON()
public static final String BLINK_ON()
public static final String REVERSE_ON()
public static final String BOLD_OFF()
public static final String BLINK_OFF()
public static final String REVERSE_OFF()
public static void main(String[] args)
args
- Optionaly, the verbosity level to use.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |