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()
        Description copied from interface: Terminal
        Returns the terminal attributes. The returned object can be safely modified further used in a call to Terminal.setAttributes(Attributes).
        Returns:
        the terminal attributes.
      • setAttributes

        public void setAttributes​(Attributes attr)
        Description copied from interface: Terminal
        Set the terminal attributes. The terminal will perform a copy of the given attributes.
        Parameters:
        attr - the new attributes
      • 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
      • getProvider

        public TerminalProvider getProvider()
        Description copied from interface: TerminalExt
        Returns the TerminalProvider that created this terminal or null if the terminal was created with no provider.