Interface TerminalOutput

    • Method Detail

      • supportsTextAttributes

        boolean supportsTextAttributes()
        Returns true if this terminal supports setting text attributes, such as bold.
      • supportsColor

        boolean supportsColor()
        Returns true if this terminal supports setting output colors.
      • supportsCursorMotion

        boolean supportsCursorMotion()
        Returns true if this terminal supports moving the cursor.
      • supportsCursorVisibility

        boolean supportsCursorVisibility()
        Returns true if this terminal supports hiding the cursor.
      • getTerminalSize

        TerminalSize getTerminalSize()
                              throws NativeException
        Returns the size of the terminal. Supported by all terminals.
        Returns:
        The current terminal size. Never returns null.
        Throws:
        NativeException - On failure.
      • getOutputStream

        java.io.OutputStream getOutputStream()
        Returns an OutputStream that writes to this terminal. The output stream is not buffered.
      • defaultForeground

        TerminalOutput defaultForeground()
                                  throws NativeException
        Sets the terminal foreground color to the default, if supported. Does nothing if this terminal does not support setting the foreground color.
        Throws:
        NativeException - On failure.
      • normal

        TerminalOutput normal()
                       throws NativeException
        Switches the terminal to normal text mode. Switches off bold text mode and sets normal intensity. Supported by all terminals.
        Throws:
        NativeException - On failure.
      • reset

        TerminalOutput reset()
                      throws NativeException
        Resets this terminal. Switches to normal text mode, restores default foreground color and shows the cursor. Supported by all terminals.
        Throws:
        NativeException - On failure.
      • cursorLeft

        TerminalOutput cursorLeft​(int count)
                           throws NativeException
        Moves the cursor the given number of characters to the left.
        Throws:
        NativeException - On failure, or if this terminal does not support cursor motion.
      • cursorRight

        TerminalOutput cursorRight​(int count)
                            throws NativeException
        Moves the cursor the given number of characters to the right.
        Throws:
        NativeException - On failure, or if this terminal does not support cursor motion.
      • cursorDown

        TerminalOutput cursorDown​(int count)
                           throws NativeException
        Moves the cursor the given number of characters down.
        Throws:
        NativeException - On failure, or if this terminal does not support cursor motion.
      • clearToEndOfLine

        TerminalOutput clearToEndOfLine()
                                 throws NativeException
        Clears characters from the cursor position to the end of the current line.
        Throws:
        NativeException - On failure, or if this terminal does not support clearing.