public abstract class Console extends PrintStream implements IBase
Abstract Console class.
| Modifier and Type | Class and Description |
|---|---|
static class |
Console.COLOR |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_HEIGHT
Constant
DEFAULT_HEIGHT=25 |
static int |
DEFAULT_WIDTH
Constant
DEFAULT_WIDTH=40 |
protected LinkedList<String> |
history |
out| Constructor and Description |
|---|
Console()
Constructor for Console.
|
Console(PrintStream out)
Constructor for Console.
|
Console(PrintStream out,
boolean flush,
String charset)
Constructor for Console.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
cleanup()
cleanup.
|
void |
cr()
cr.
|
static Console |
create()
Factory to return the correct implementation of console.
|
ConsoleProgressBar |
createProgressBar()
createProgressBar.
|
abstract Console.COLOR |
getBackgroundColor()
getBackgroundColor.
|
abstract int |
getCursorX()
getCursorX.
|
abstract int |
getCursorY()
getCursorY.
|
abstract Console.COLOR |
getForegroundColor()
getForegroundColor.
|
abstract int |
getHeight()
getHeight.
|
abstract int |
getWidth()
getWidth.
|
abstract boolean |
isBlink()
isBlink.
|
abstract boolean |
isBold()
isBold.
|
abstract boolean |
isSupportBlink()
isSupportBlink.
|
abstract boolean |
isSupportBold()
isSupportBold.
|
abstract boolean |
isSupportColor()
isSupportColor.
|
abstract boolean |
isSupportCursor()
isSupportCursor.
|
abstract boolean |
isSupportSize()
isSupportSize.
|
void |
printLine()
printLine.
|
void |
printLine(char c)
printLine.
|
String |
readLine()
readLine.
|
abstract String |
readLine(LinkedList<String> history)
readLine.
|
char[] |
readPassword()
readPassword.
|
abstract void |
setBlink(boolean blink)
setBlink.
|
abstract void |
setBold(boolean bold)
setBold.
|
abstract void |
setColor(Console.COLOR foreground,
Console.COLOR background)
setColor.
|
abstract void |
setCursor(int x,
int y)
setCursor.
|
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, writewritepublic static final int DEFAULT_WIDTH
DEFAULT_WIDTH=40public static final int DEFAULT_HEIGHT
DEFAULT_HEIGHT=25protected LinkedList<String> history
public Console()
Constructor for Console.
public Console(PrintStream out)
Constructor for Console.
out - a PrintStream object.public Console(PrintStream out, boolean flush, String charset) throws UnsupportedEncodingException
Constructor for Console.
out - a PrintStream object.flush - a boolean.charset - a String object.UnsupportedEncodingException - if any.public static Console create()
Console object.public abstract String readLine(LinkedList<String> history)
readLine.
history - a LinkedList object.String object.public char[] readPassword()
readPassword.
public void cr()
cr.
public abstract boolean isSupportSize()
isSupportSize.
public abstract int getWidth()
getWidth.
public abstract int getHeight()
getHeight.
public abstract boolean isSupportCursor()
isSupportCursor.
public abstract void setCursor(int x,
int y)
setCursor.
x - a int.y - a int.public abstract int getCursorX()
getCursorX.
public abstract int getCursorY()
getCursorY.
public ConsoleProgressBar createProgressBar()
createProgressBar.
ConsoleProgressBar object.public abstract boolean isSupportColor()
isSupportColor.
public abstract void setColor(Console.COLOR foreground, Console.COLOR background)
setColor.
foreground - a Console.COLOR object.background - a Console.COLOR object.public abstract Console.COLOR getForegroundColor()
getForegroundColor.
Console.COLOR object.public abstract Console.COLOR getBackgroundColor()
getBackgroundColor.
Console.COLOR object.public abstract boolean isSupportBlink()
isSupportBlink.
public abstract void setBlink(boolean blink)
setBlink.
blink - a boolean.public abstract boolean isBlink()
isBlink.
public abstract boolean isSupportBold()
isSupportBold.
public abstract void setBold(boolean bold)
setBold.
bold - a boolean.public abstract boolean isBold()
isBold.
public abstract void cleanup()
cleanup.
public void printLine()
printLine.
public void printLine(char c)
printLine.
c - a char.Copyright © 2016. All Rights Reserved.