@InterfaceAudience.Private public class TerminalImpl extends Object implements Terminal
Terminal interface.| Modifier and Type | Field and Description |
|---|---|
private TerminalSize |
cachedTerminalSize |
private KeyPressGenerator |
keyPressGenerator |
private Queue<KeyPress> |
keyPressQueue |
private static org.slf4j.Logger |
LOGGER |
private PrintWriter |
output |
private ScreenBuffer |
screenBuffer |
| Constructor and Description |
|---|
TerminalImpl() |
TerminalImpl(String title) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
close() |
TerminalSize |
doResizeIfNecessary() |
private String |
doStty(String sttyOptionsString) |
CursorPosition |
getCursorPosition() |
TerminalSize |
getSize() |
TerminalPrinter |
getTerminalPrinter(int startRow) |
void |
hideCursor() |
KeyPress |
pollKeyPress() |
private TerminalSize |
queryTerminalSize() |
void |
refresh() |
void |
setCursorPosition(int column,
int row) |
private void |
setTitle(String title) |
private void |
sttyCooked() |
private void |
sttyRaw() |
private void |
updateTerminalSize(int columns,
int rows) |
private static final org.slf4j.Logger LOGGER
private TerminalSize cachedTerminalSize
private final PrintWriter output
private final ScreenBuffer screenBuffer
private final Queue<KeyPress> keyPressQueue
private final KeyPressGenerator keyPressGenerator
public TerminalImpl()
public TerminalImpl(@Nullable String title)
private void updateTerminalSize(int columns, int rows)
public TerminalSize getSize()
@Nullable public TerminalSize doResizeIfNecessary()
doResizeIfNecessary in interface Terminal@Nullable public KeyPress pollKeyPress()
pollKeyPress in interface Terminalpublic CursorPosition getCursorPosition()
getCursorPosition in interface Terminalpublic void setCursorPosition(int column, int row)
setCursorPosition in interface Terminalpublic void hideCursor()
hideCursor in interface Terminalpublic TerminalPrinter getTerminalPrinter(int startRow)
getTerminalPrinter in interface Terminalpublic void close()
close in interface Closeableclose in interface AutoCloseableprivate TerminalSize queryTerminalSize()
private void sttyRaw()
private void sttyCooked()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.