|
Josh Native console access wrapper for Java |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.yifanlu.Josh.JoshBuffer
com.yifanlu.Josh.JoshOutput
public class JoshOutput
Provides simplified access to the output buffer.
This is recommended for users who just want to change text colors and other popular console controls.
Objects from this class are immutable.
| Constructor Summary | |
|---|---|
JoshOutput(ConsoleHandle handle)
Creates a new output buffer for simplified manipulation of the output buffer. |
|
| Method Summary | |
|---|---|
void |
clearConsole()
Clears the console buffer to a blank black screen. |
void |
clearConsole(ConsoleColor background)
Clears the console buffer and sets the background color. |
void |
print(java.lang.String output)
Print a string. |
void |
printcolorln(java.lang.Object... objects)
Print a String with a foreground color and then change the character color back to defaults and terminate the line. |
void |
printhighlightln(java.lang.Object... objects)
Print a String with a background color and then change the character color back to defaults and terminate the line. |
void |
println(java.lang.String output)
Print a String and then terminate the line. |
| Methods inherited from class com.yifanlu.Josh.JoshBuffer |
|---|
equals, getHandle, hashCode, setHandle |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JoshOutput(ConsoleHandle handle)
handle - A memory location that this buffer represents.| Method Detail |
|---|
public void clearConsole()
public void clearConsole(ConsoleColor background)
background - The background color of the console buffer.public void println(java.lang.String output)
output - The String to be printed.public void print(java.lang.String output)
output - The String to be printed.
public void printhighlightln(java.lang.Object... objects)
throws java.lang.IllegalArgumentException
printhightln(ConsoleColor.BLUE(), "This is blue text", ConsoleColor.GREEN(), "This is green text");
Note that this method accepts unlimited number of paramaters and interprets it as an array or objects. The array MUST be in the order of
ConsoleColor, then String.
objects - An array of Object in the order of ConsoleColor, then String in that order.
java.lang.IllegalArgumentException - If the order of the paramaters is not correct.
public void printcolorln(java.lang.Object... objects)
throws java.lang.IllegalArgumentException
printcolorln(ConsoleColor.BLUE(), "This is blue colored text", ConsoleColor.GREEN(), "This is green colored text");
Note that this method accepts unlimited number of paramaters and interprets it as an array or objects. The array MUST be in the order of
ConsoleColor, then String.
objects - An array of Object in the order of ConsoleColor, then String in that order.
java.lang.IllegalArgumentException - If the order of the paramaters is not correct.
|
Copyright © 2010 Yifan Lu | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||