Package org.jline.terminal.impl
Class AbstractPosixTerminal
java.lang.Object
org.jline.terminal.impl.AbstractTerminal
org.jline.terminal.impl.AbstractPosixTerminal
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,Terminal
- Direct Known Subclasses:
PosixPtyTerminal
,PosixSysTerminal
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jline.terminal.Terminal
Terminal.MouseTracking, Terminal.Signal, Terminal.SignalHandler
-
Field Summary
FieldsFields inherited from class org.jline.terminal.impl.AbstractTerminal
bools, encoding, handlers, ints, name, onClose, palette, status, strings, type
Fields inherited from interface org.jline.terminal.Terminal
TYPE_DUMB, TYPE_DUMB_COLOR
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractPosixTerminal
(String name, String type, Pty pty) AbstractPosixTerminal
(String name, String type, Pty pty, Charset encoding, Terminal.SignalHandler signalHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doClose()
getCursorPosition
(IntConsumer discarded) Query the terminal to report the cursor position.getPty()
getSize()
Retrieve the size of the visible windowvoid
setAttributes
(Attributes attr) void
Methods inherited from class org.jline.terminal.impl.AbstractTerminal
canPauseResume, checkInterrupted, close, echo, echo, echoSignal, encoding, enterRawMode, flush, getBooleanCapability, getKind, getName, getNumericCapability, getPalette, getStatus, getStatus, getStringCapability, getType, handle, hasFocusSupport, hasMouseSupport, parseInfoCmp, pause, pause, paused, puts, raise, readMouseEvent, readMouseEvent, resume, setOnClose, trackFocus, trackMouse
-
Field Details
-
pty
-
originalAttributes
-
-
Constructor Details
-
AbstractPosixTerminal
- Throws:
IOException
-
AbstractPosixTerminal
public AbstractPosixTerminal(String name, String type, Pty pty, Charset encoding, Terminal.SignalHandler signalHandler) throws IOException - Throws:
IOException
-
-
Method Details
-
getPty
-
getAttributes
-
setAttributes
-
getSize
Description copied from interface:Terminal
Retrieve the size of the visible window- Returns:
- the visible terminal size
- See Also:
-
setSize
-
doClose
- Overrides:
doClose
in classAbstractTerminal
- Throws:
IOException
-
getCursorPosition
Description copied from interface:Terminal
Query the terminal to report the cursor position. As the response is read from the input stream, some characters may be read before the cursor position is actually read. Those characters can be given back usingorg.jline.keymap.BindingReader#runMacro(String)
- Specified by:
getCursorPosition
in interfaceTerminal
- Overrides:
getCursorPosition
in classAbstractTerminal
- Parameters:
discarded
- a consumer receiving discarded characters- Returns:
null
if cursor position reporting is not supported or a valid cursor position
-