Package xyz.cofe.term.common.nix
Class NixConsole
- java.lang.Object
-
- xyz.cofe.term.common.nix.NixAbstractConsole
-
- xyz.cofe.term.common.nix.NixConsole
-
- All Implemented Interfaces:
AutoCloseable,Console
- Direct Known Subclasses:
NixAsyncConsole
public class NixConsole extends NixAbstractConsole
Адоптация для Unix терминалов
-
-
Field Summary
Fields Modifier and Type Field Description protected Queue<InputEvent>eventBufferprotected intlimitMouseActionsprotected List<com.googlecode.lanterna.input.MouseAction>mouseActionsprotected com.googlecode.lanterna.terminal.ExtendedTerminalterminal-
Fields inherited from class xyz.cofe.term.common.nix.NixAbstractConsole
closed
-
-
Constructor Summary
Constructors Constructor Description NixConsole(com.googlecode.lanterna.terminal.ExtendedTerminal terminal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected Queue<InputEvent>createEventQueue()protected List<com.googlecode.lanterna.input.MouseAction>createHistory()protected <R> RmouseHistory(Function<List<com.googlecode.lanterna.input.MouseAction>,R> history)protected Optional<InputEvent>pollFromQueue()protected voidputToQueue(InputEvent event)protected <R> Rterminal(Function<com.googlecode.lanterna.terminal.ExtendedTerminal,R> term)-
Methods inherited from class xyz.cofe.term.common.nix.NixAbstractConsole
close, getCursorPosition, getSize, init, read, read, readSync, setBackground, setCursorPosition, setCursorPosition, setCursorVisible, setForeground, setSize, setTitle, terminal, write
-
-
-
-
Field Detail
-
terminal
protected final com.googlecode.lanterna.terminal.ExtendedTerminal terminal
-
eventBuffer
protected final Queue<InputEvent> eventBuffer
-
mouseActions
protected final List<com.googlecode.lanterna.input.MouseAction> mouseActions
-
limitMouseActions
protected final int limitMouseActions
- See Also:
- Constant Field Values
-
-
Method Detail
-
createEventQueue
protected Queue<InputEvent> createEventQueue()
-
terminal
protected <R> R terminal(Function<com.googlecode.lanterna.terminal.ExtendedTerminal,R> term)
- Specified by:
terminalin classNixAbstractConsole
-
putToQueue
protected void putToQueue(InputEvent event)
- Specified by:
putToQueuein classNixAbstractConsole
-
pollFromQueue
protected Optional<InputEvent> pollFromQueue()
- Specified by:
pollFromQueuein classNixAbstractConsole
-
createHistory
protected List<com.googlecode.lanterna.input.MouseAction> createHistory()
-
mouseHistory
protected <R> R mouseHistory(Function<List<com.googlecode.lanterna.input.MouseAction>,R> history)
- Specified by:
mouseHistoryin classNixAbstractConsole
-
-