Class NixAbstractConsole

    • Field Detail

      • closed

        protected volatile boolean closed
    • Constructor Detail

      • NixAbstractConsole

        public NixAbstractConsole()
    • Method Detail

      • terminal

        protected void terminal​(Consumer<com.googlecode.lanterna.terminal.ExtendedTerminal> term)
      • terminal

        protected abstract <R> R terminal​(Function<com.googlecode.lanterna.terminal.ExtendedTerminal,​R> term)
      • init

        protected void init​(com.googlecode.lanterna.terminal.ExtendedTerminal terminal)
      • close

        protected void close​(com.googlecode.lanterna.terminal.ExtendedTerminal terminal)
      • putToQueue

        protected abstract void putToQueue​(InputEvent event)
      • setTitle

        public void setTitle​(String title)
        Description copied from interface: Console
        Устанавливает заголовок
        Specified by:
        setTitle in interface Console
        Parameters:
        title - заголовок
      • getCursorPosition

        public Position getCursorPosition()
        Description copied from interface: Console
        Возвращает позицию курсора
        Specified by:
        getCursorPosition in interface Console
        Returns:
        позиция курсора
      • setCursorPosition

        public void setCursorPosition​(Position position)
        Description copied from interface: Console
        Устанавливает позицию курсора
        Specified by:
        setCursorPosition in interface Console
        Parameters:
        position - позиция курсора
      • setCursorPosition

        public void setCursorPosition​(int x,
                                      int y)
        Description copied from interface: Console
        Устанавливает позицию курсора
        Specified by:
        setCursorPosition in interface Console
        Parameters:
        x - координаты
        y - координаты
      • getSize

        public Size getSize()
        Description copied from interface: Console
        Возвращает размер терминала
        Specified by:
        getSize in interface Console
        Returns:
        размер терминала
      • setSize

        public void setSize​(Size size)
        Description copied from interface: Console
        Устанавливает размер терминала
        Specified by:
        setSize in interface Console
        Parameters:
        size - размер терминала
      • setForeground

        public void setForeground​(Color color)
        Description copied from interface: Console
        Устанавливает цвет текста
        Specified by:
        setForeground in interface Console
        Parameters:
        color - цвет
      • setBackground

        public void setBackground​(Color color)
        Description copied from interface: Console
        Устанавливает цвет фона
        Specified by:
        setBackground in interface Console
        Parameters:
        color - цвет
      • setCursorVisible

        public void setCursorVisible​(boolean visible)
        Description copied from interface: Console
        Установить видимость курсора
        Specified by:
        setCursorVisible in interface Console
        Parameters:
        visible - true - курсор видим
      • write

        public void write​(String text)
        Description copied from interface: Console
        Запись текста в позицию курсора
        Specified by:
        write in interface Console
        Parameters:
        text - текст
      • mouseHistory

        protected abstract <R> R mouseHistory​(Function<List<com.googlecode.lanterna.input.MouseAction>,​R> history)
      • read

        public Optional<InputEvent> read()
        Description copied from interface: Console
        Чтение событие ввода
        Specified by:
        read in interface Console
        Returns:
        событие
      • readSync

        public Optional<InputEvent> readSync()
        Синхронное-блокируемое чтение данных
        Returns:
        прочитанное значение
      • read

        protected Optional<InputEvent> read​(com.googlecode.lanterna.input.KeyStroke ks)