Scrollable
, InputProvider
, ExtendedTerminal
, Terminal
, Closeable
, AutoCloseable
public class UnixTerminal extends UnixLikeTTYTerminal
If you need to have Lanterna to call stty at a different location, you'll need to
subclass this and override getSTTYCommand()
.
UnixLikeTerminal.CtrlCBehaviour
Modifier and Type | Field | Description |
---|---|---|
protected UnixTerminalSizeQuerier |
terminalSizeQuerier |
Deprecated.
|
Constructor | Description |
---|---|
UnixTerminal() |
Creates a UnixTerminal with default settings, using System.in and System.out for input/output, using the default
character set on the system as the encoding and trap ctrl+c signal instead of killing the application.
|
UnixTerminal(InputStream terminalInput,
OutputStream terminalOutput,
Charset terminalCharset) |
Creates a UnixTerminal using a specified input stream, output stream and character set.
|
UnixTerminal(InputStream terminalInput,
OutputStream terminalOutput,
Charset terminalCharset,
UnixLikeTerminal.CtrlCBehaviour terminalCtrlCBehaviour) |
Creates a UnixTerminal using a specified input stream, output stream and character set, with a custom size
querier instead of using the default one.
|
UnixTerminal(InputStream terminalInput,
OutputStream terminalOutput,
Charset terminalCharset,
UnixTerminalSizeQuerier customSizeQuerier) |
Deprecated.
Use an overload that doesn't take a
UnixTerminalSizeQuerier |
UnixTerminal(InputStream terminalInput,
OutputStream terminalOutput,
Charset terminalCharset,
UnixTerminalSizeQuerier customSizeQuerier,
UnixLikeTerminal.CtrlCBehaviour terminalCtrlCBehaviour) |
Deprecated.
Use an overload that doesn't take a
UnixTerminalSizeQuerier |
Modifier and Type | Method | Description |
---|---|---|
TerminalSize |
findTerminalSize() |
addResizeListener, newTextGraphics, onResized, onResized, removeResizeListener
clearScreen, deiconify, disableSGR, enableSGR, enterPrivateMode, exitPrivateMode, getCursorPosition, getDefaultKeyDecodingProfile, getTerminalSize, iconify, maximize, popTitle, pushTitle, resetColorAndSGR, scrollLines, setBackgroundColor, setCursorPosition, setCursorPosition, setCursorVisible, setForegroundColor, setMouseCaptureMode, setTerminalSize, setTitle, unmaximize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addKeyDecodingProfile, bell, enquireTerminal, flush, getCharset, getInputDecoder, putCharacter, translateCharacter, writeToTerminal
addResizeListener, bell, enquireTerminal, flush, newTextGraphics, putCharacter, removeResizeListener
close, getTerminalCtrlCBehaviour, pollInput, readInput
acquire, canonicalMode, exec, keyEchoEnabled, keyStrokeSignalsEnabled, registerTerminalResizeListener, restoreTerminalSettings, runSTTYCommand, saveTerminalSettings
@Deprecated protected final UnixTerminalSizeQuerier terminalSizeQuerier
public UnixTerminal() throws IOException
IOException
- If there was an I/O error initializing the terminalpublic UnixTerminal(InputStream terminalInput, OutputStream terminalOutput, Charset terminalCharset) throws IOException
terminalInput
- Input stream to read terminal input fromterminalOutput
- Output stream to write terminal output toterminalCharset
- Character set to use when converting characters to bytesIOException
- If there was an I/O error initializing the terminal@Deprecated public UnixTerminal(InputStream terminalInput, OutputStream terminalOutput, Charset terminalCharset, UnixTerminalSizeQuerier customSizeQuerier) throws IOException
UnixTerminalSizeQuerier
terminalInput
- Input stream to read terminal input fromterminalOutput
- Output stream to write terminal output toterminalCharset
- Character set to use when converting characters to bytescustomSizeQuerier
- Object to use for looking up the size of the terminal, or null to use the built-in
methodIOException
- If there was an I/O error initializing the terminalpublic UnixTerminal(InputStream terminalInput, OutputStream terminalOutput, Charset terminalCharset, UnixLikeTerminal.CtrlCBehaviour terminalCtrlCBehaviour) throws IOException
terminalInput
- Input stream to read terminal input fromterminalOutput
- Output stream to write terminal output toterminalCharset
- Character set to use when converting characters to bytesterminalCtrlCBehaviour
- Special settings on how the terminal will behave, see UnixTerminalMode
for more
detailsIOException
- If there was an I/O error initializing the terminal@Deprecated public UnixTerminal(InputStream terminalInput, OutputStream terminalOutput, Charset terminalCharset, UnixTerminalSizeQuerier customSizeQuerier, UnixLikeTerminal.CtrlCBehaviour terminalCtrlCBehaviour) throws IOException
UnixTerminalSizeQuerier
terminalInput
- Input stream to read terminal input fromterminalOutput
- Output stream to write terminal output toterminalCharset
- Character set to use when converting characters to bytescustomSizeQuerier
- Object to use for looking up the size of the terminal, or null to use the built-in
methodterminalCtrlCBehaviour
- Special settings on how the terminal will behave, see UnixTerminalMode
for more
detailsIOException
- If there was an I/O error initializing the terminalpublic TerminalSize findTerminalSize() throws IOException
findTerminalSize
in class ANSITerminal
IOException
Copyright © 2020. All rights reserved.