Static Public Member Functions | |
final void | printMessage (final String message, final PrintStream stream, final int color) |
final void | printMessage (final String message, final PrintStream stream, final int color, boolean endline) |
Static Public Attributes | |
final int | STD = 0 |
final int | ERROR = 1 |
final int | INFO = 2 |
final int | STATUS = 3 |
final int | PROMPT = 4 |
Definition at line 35 of file ColorPrinter.java.
|
Print a message in color
Definition at line 130 of file ColorPrinter.java. 00132 { 00133 00134 final StringBuffer msg = new StringBuffer(message); 00135 switch (color) 00136 { 00137 default : // Use STD as default 00138 case STD : 00139 msg.insert(0, STD_COLOR); 00140 msg.append(END_COLOR); 00141 break; 00142 case ERROR : 00143 msg.insert(0, ERR_COLOR); 00144 msg.append(END_COLOR); 00145 break; 00146 case INFO : 00147 msg.insert(0, INFO_COLOR); 00148 msg.append(END_COLOR); 00149 break; 00150 case STATUS : 00151 msg.insert(0, STATUS_COLOR); 00152 msg.append(END_COLOR); 00153 break; 00154 case PROMPT : 00155 msg.insert(0, PROMPT_COLOR); 00156 msg.append(END_COLOR); 00157 break; 00158 } 00159 final String strmessage = msg.toString(); 00160 if (endline) 00161 stream.println(strmessage); 00162 else 00163 stream.print(strmessage); 00164 }
|
|
Print a message in color
Definition at line 116 of file ColorPrinter.java. 00118 { 00119 printMessage(message, stream, color, true); 00120 }
|
|
Error color Definition at line 95 of file ColorPrinter.java. |
|
Info color for commands Definition at line 99 of file ColorPrinter.java. |
|
status color for commands Definition at line 107 of file ColorPrinter.java. |
|
status color for commands Definition at line 103 of file ColorPrinter.java. |
|
Standard color Definition at line 91 of file ColorPrinter.java. |