close() method
in order to restore their original state.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | |
| public static enum | Terminal.
Types of signals. |
| public static interface | Terminal.
The SignalHandler defines the interface used to trap signals and perform specific behaviors. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | TYPE_DUMB
Type used for dumb terminals. |
| public static final String |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public boolean | |
| public Charset | |
| public Attributes | |
| public void | flush()
Redeclares java. Flushes this stream by writing any buffered output to the underlying stream. |
| public Attributes | |
| public boolean | |
| public default Size | |
| public Cursor | Returns: null if cursor position reporting
is not supported or a valid cursor positiona consumer receiving discarded characters discarded)Query the terminal to report the cursor position. |
| public default int | |
| public String | |
| public Integer | |
| public ColorPalette | |
| public Size | |
| public String | |
| public String | |
| public default int | |
| public Terminal. | |
| public boolean | Returns: whether focus tracking is supported by the terminalReturns |
| public boolean | Returns: whether mouse is supported by the terminalReturns |
| public InputStream | |
| public OutputStream | |
| public void | |
| public void | pause(boolean
true to wait until the terminal is actually pausedStop reading the input stream and optionally wait for the underlying threads to finish. |
| public boolean | Returns: whether the terminal is currently reading the input stream or notCheck whether the terminal is currently reading the input stream or not. |
| public boolean | |
| public void | |
| public NonBlockingReader | |
| public MouseEvent | |
| public MouseEvent | Returns: the decoded mouse eventthe input supplier reader)Read a MouseEvent from the given input stream. |
| public void | |
| public void | |
| public void | |
| public boolean | Returns: true if focus tracking is supportedwhether the focus tracking mode should be enabled or not tracking)Enable or disable focus tracking mode. |
| public boolean | Returns: true if mouse tracking is supportedthe mouse tracking mode trackingChange the mouse tracking mouse. |
| public PrintWriter |
| TYPE_DUMB | back to summary |
|---|---|
| public static final String TYPE_DUMB Type used for dumb terminals. | |
| TYPE_DUMB_COLOR | back to summary |
|---|---|
| public static final String TYPE_DUMB_COLOR | |
| canPauseResume | back to summary |
|---|---|
| public boolean canPauseResume() | |
| echo | back to summary |
|---|---|
| public boolean echo() | |
| echo | back to summary |
|---|---|
| public boolean echo(boolean echo) | |
| encoding | back to summary |
|---|---|
| public Charset encoding() Returns the
| |
| enterRawMode | back to summary |
|---|---|
| public Attributes enterRawMode() | |
| flush | back to summary |
|---|---|
| public void flush() Redeclares java. Doc from java. Flushes this stream by writing any buffered output to the underlying stream. | |
| getAttributes | back to summary |
|---|---|
| public Attributes getAttributes() Returns the terminal attributes.
The returned object can be safely modified
further used in a call to
| |
| getBooleanCapability | back to summary |
|---|---|
| public boolean getBooleanCapability(InfoCmp. | |
| getBufferSize | back to summary |
|---|---|
| public default Size getBufferSize() Retrieve the size of the window buffer.
Some terminals can be configured to have a buffer size
larger than the visible window size and provide scroll bars.
In such cases, this method should attempt to return the size
of the whole buffer. The | |
| getCursorPosition | back to summary |
|---|---|
| public Cursor getCursorPosition(IntConsumer discarded) 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 using
| |
| getHeight | back to summary |
|---|---|
| public default int getHeight() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getNumericCapability | back to summary |
|---|---|
| public Integer getNumericCapability(InfoCmp. | |
| getPalette | back to summary |
|---|---|
| public ColorPalette getPalette() Color support | |
| getSize | back to summary |
|---|---|
| public Size getSize() Retrieve the size of the visible window
| |
| getStringCapability | back to summary |
|---|---|
| public String getStringCapability(InfoCmp. | |
| getType | back to summary |
|---|---|
| public String getType() | |
| getWidth | back to summary |
|---|---|
| public default int getWidth() | |
| handle | back to summary |
|---|---|
| public Terminal. Registers a handler for the given
Note that the JVM does not easily allow catching the
| |
| hasFocusSupport | back to summary |
|---|---|
| public boolean hasFocusSupport() Returns
| |
| hasMouseSupport | back to summary |
|---|---|
| public boolean hasMouseSupport() Returns
| |
| input | back to summary |
|---|---|
| public InputStream input() Retrieve the input stream for this terminal.
In some rare cases, there may be a need to access the
terminal input stream directly. In the usual cases,
use the
| |
| output | back to summary |
|---|---|
| public OutputStream output() Retrieve the output stream for this terminal.
In some rare cases, there may be a need to access the
terminal output stream directly. In the usual cases,
use the
| |
| pause | back to summary |
|---|---|
| public void pause() Stop reading the input stream. | |
| pause | back to summary |
|---|---|
| public void pause(boolean wait) throws InterruptedException Stop reading the input stream and optionally wait for the underlying threads to finish.
| |
| paused | back to summary |
|---|---|
| public boolean paused() Check whether the terminal is currently reading the input stream or not. In order to process signal as quickly as possible, the terminal need to read the input stream and buffer it internally so that it can detect specific characters in the input stream (Ctrl+C, Ctrl+D, etc...) and raise the appropriate signals. However, there are some cases where this processing should be disabled, for example when handing the terminal control to a subprocess. | |
| puts | back to summary |
|---|---|
| public boolean puts(InfoCmp. | |
| raise | back to summary |
|---|---|
| public void raise(Terminal. Raise the specific signal.
This is not method usually called by non system terminals.
When accessing a terminal through a SSH or Telnet connection, signals may be
conveyed by the protocol and thus need to be raised when reaching the terminal code.
The terminals do that automatically when the terminal input stream has a character
mapped to | |
| reader | back to summary |
|---|---|
| public NonBlockingReader reader() Retrieve the
| |
| readMouseEvent | back to summary |
|---|---|
| public MouseEvent readMouseEvent() Read a MouseEvent from the terminal input stream.
Such an event must have been detected by scanning the terminal's
| |
| readMouseEvent | back to summary |
|---|---|
| public MouseEvent readMouseEvent(IntSupplier reader) Read a MouseEvent from the given input stream.
| |
| resume | back to summary |
|---|---|
| public void resume() Resume reading the input stream. | |
| setAttributes | back to summary |
|---|---|
| public void setAttributes(Attributes attr) Set the terminal attributes. The terminal will perform a copy of the given attributes.
| |
| setSize | back to summary |
|---|---|
| public void setSize(Size size) | |
| trackFocus | back to summary |
|---|---|
| public boolean trackFocus(boolean tracking) Enable or disable focus tracking mode. When focus tracking has been activated, each time the terminal grabs the focus, the string "\33[I" will be sent to the input stream and each time the focus is lost, the string "\33[O" will be sent to the input stream.
| |
| trackMouse | back to summary |
|---|---|
| public boolean trackMouse(Terminal. Change the mouse tracking mouse.
To start mouse tracking, this method must be called with a valid mouse tracking mode.
Mouse events will be reported by writing the
| |
| writer | back to summary |
|---|---|
| public PrintWriter writer() Retrieve the
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Terminal. | Any
Report all motions events, even if no mouse button is down. |
| public static final Terminal. | Button
Also report button-motion events. |
| public static final Terminal. | Normal
Track button press and release. |
| public static final Terminal. | Off
Disable mouse tracking |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Terminal. | |
| public static Terminal. |
| Any | back to summary |
|---|---|
| public static final Terminal. Report all motions events, even if no mouse button is down. | |
| Button | back to summary |
|---|---|
| public static final Terminal. Also report button-motion events. Mouse movements are reported if the mouse pointer has moved to a different character cell. | |
| Normal | back to summary |
|---|---|
| public static final Terminal. Track button press and release. | |
| Off | back to summary |
|---|---|
| public static final Terminal. Disable mouse tracking | |
| MouseTracking | back to summary |
|---|---|
| private MouseTracking() | |
| valueOf | back to summary |
|---|---|
| public static Terminal. | |
| values | back to summary |
|---|---|
| public static Terminal. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Terminal. | |
| public static final Terminal. | |
| public static final Terminal. | |
| public static final Terminal. | |
| public static final Terminal. | |
| public static final Terminal. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Terminal. | |
| public static Terminal. |
| CONT | back to summary |
|---|---|
| public static final Terminal. | |
| INFO | back to summary |
|---|---|
| public static final Terminal. | |
| INT | back to summary |
|---|---|
| public static final Terminal. | |
| QUIT | back to summary |
|---|---|
| public static final Terminal. | |
| TSTP | back to summary |
|---|---|
| public static final Terminal. | |
| WINCH | back to summary |
|---|---|
| public static final Terminal. | |
| Signal | back to summary |
|---|---|
| private Signal() | |
| valueOf | back to summary |
|---|---|
| public static Terminal. | |
| values | back to summary |
|---|---|
| public static Terminal. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Terminal. | SIG_DFL
The |
| public static final Terminal. | SIG_IGN
The |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| SIG_DFL | back to summary |
|---|---|
| public static final Terminal. The | |
| SIG_IGN | back to summary |
|---|---|
| public static final Terminal. The | |
| handle | back to summary |
|---|---|
| public void handle(Terminal. Handle the signal. | |