Class AbstractPosixTerminal

    • Field Detail

      • pty

        protected final Pty pty
      • originalAttributes

        protected final Attributes originalAttributes
    • Constructor Detail

      • AbstractPosixTerminal

        public AbstractPosixTerminal​(java.lang.String name,
                                     java.lang.String type,
                                     Pty pty)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • AbstractPosixTerminal

        public AbstractPosixTerminal​(java.lang.String name,
                                     java.lang.String type,
                                     Pty pty,
                                     java.nio.charset.Charset encoding,
                                     Terminal.SignalHandler signalHandler)
                              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getPty

        public Pty getPty()
      • getAttributes

        public Attributes getAttributes()
      • setAttributes

        public void setAttributes​(Attributes attr)
      • getSize

        public Size getSize()
        Description copied from interface: Terminal
        Retrieve the size of the visible window
        Returns:
        the visible terminal size
        See Also:
        Terminal.getBufferSize()
      • setSize

        public void setSize​(Size size)
      • doClose

        protected void doClose()
                        throws java.io.IOException
        Overrides:
        doClose in class AbstractTerminal
        Throws:
        java.io.IOException
      • getCursorPosition

        public Cursor getCursorPosition​(java.util.function.IntConsumer discarded)
        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 using org.jline.keymap.BindingReader#runMacro(String)
        Specified by:
        getCursorPosition in interface Terminal
        Overrides:
        getCursorPosition in class AbstractTerminal
        Parameters:
        discarded - a consumer receiving discarded characters
        Returns:
        null if cursor position reporting is not supported or a valid cursor position