Class ConsoleDelegate

  • All Implemented Interfaces:
    AutoCloseable, Console

    public class ConsoleDelegate
    extends Object
    implements Console
    Делегирует вызовы к целевой консоли
    • Field Detail

      • target

        public final Console target
        Куда идут целевые вызовы
    • Constructor Detail

      • ConsoleDelegate

        public ConsoleDelegate​(Console target)
        Конструктор
        Parameters:
        target - Куда идут целевые вызовы
    • Method Detail

      • 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 - курсор видим
      • read

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

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