@InterfaceAudience.Private public class TerminalImpl extends Object implements Terminal
Terminal
interface for normal display mode. This implementation
produces output intended for human viewing. In particular, it only displays one screenful of
data. The output contains some escape sequences for formatting.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 Terminal
public CursorPosition getCursorPosition()
getCursorPosition
in interface Terminal
public void setCursorPosition(int column, int row)
setCursorPosition
in interface Terminal
public void hideCursor()
hideCursor
in interface Terminal
public TerminalPrinter getTerminalPrinter(int startRow)
getTerminalPrinter
in interface Terminal
public void close()
close
in interface Closeable
close
in interface AutoCloseable
private TerminalSize queryTerminalSize()
private void sttyRaw()
private void sttyCooked()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.