Package xyz.cofe.term.common.demo
Class ConsoleDelegate
- java.lang.Object
-
- xyz.cofe.term.common.demo.ConsoleDelegate
-
- All Implemented Interfaces:
AutoCloseable,Console
public class ConsoleDelegate extends Object implements Console
-
-
Constructor Summary
Constructors Constructor Description ConsoleDelegate(Console console)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()PositiongetCursorPosition()SizegetSize()Optional<InputEvent>read()voidsetBackground(Color color)voidsetCursorPosition(Position position)voidsetCursorVisible(boolean visible)voidsetForeground(Color color)voidsetSize(Size size)voidsetTitle(String title)voidwrite(String text)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface xyz.cofe.term.common.Console
setCursorPosition
-
-
-
-
Field Detail
-
target
public final Console target
-
-
Constructor Detail
-
ConsoleDelegate
public ConsoleDelegate(Console console)
-
-
Method Detail
-
getCursorPosition
public Position getCursorPosition()
- Specified by:
getCursorPositionin interfaceConsole
-
setCursorPosition
public void setCursorPosition(Position position)
- Specified by:
setCursorPositionin interfaceConsole
-
setForeground
public void setForeground(Color color)
- Specified by:
setForegroundin interfaceConsole
-
setBackground
public void setBackground(Color color)
- Specified by:
setBackgroundin interfaceConsole
-
setCursorVisible
public void setCursorVisible(boolean visible)
- Specified by:
setCursorVisiblein interfaceConsole
-
read
public Optional<InputEvent> read()
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-