Class WindowsTerminal

    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • supportsColor

        public boolean supportsColor()
        Description copied from interface: TerminalOutput
        Returns true if this terminal supports setting output colors.
      • supportsTextAttributes

        public boolean supportsTextAttributes()
        Description copied from interface: TerminalOutput
        Returns true if this terminal supports setting text attributes, such as bold.
      • supportsCursorMotion

        public boolean supportsCursorMotion()
        Description copied from interface: TerminalOutput
        Returns true if this terminal supports moving the cursor.
      • supportsCursorVisibility

        public boolean supportsCursorVisibility()
        Description copied from interface: TerminalOutput
        Returns true if this terminal supports hiding the cursor.
      • getTerminalSize

        public TerminalSize getTerminalSize()
        Description copied from interface: TerminalOutput
        Returns the size of the terminal. Supported by all terminals.
        Returns:
        The current terminal size. Never returns null.
      • getOutputStream

        public java.io.OutputStream getOutputStream()
        Description copied from interface: TerminalOutput
        Returns an OutputStream that writes to this terminal. The output stream is not buffered.
      • foreground

        public TerminalOutput foreground​(TerminalOutput.Color color)
        Description copied from interface: TerminalOutput
        Sets the terminal foreground color, if supported. Does nothing if this terminal does not support setting the foreground color.
      • defaultForeground

        public TerminalOutput defaultForeground()
                                         throws NativeException
        Description copied from interface: TerminalOutput
        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

        public TerminalOutput normal()
        Description copied from interface: TerminalOutput
        Switches the terminal to normal text mode. Switches off bold text mode and sets normal intensity. Supported by all terminals.
      • reset

        public TerminalOutput reset()
        Description copied from interface: TerminalOutput
        Resets this terminal. Switches to normal text mode, restores default foreground color and shows the cursor. Supported by all terminals.
      • cursorRight

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

        public TerminalOutput clearToEndOfLine()
                                        throws NativeException
        Description copied from interface: TerminalOutput
        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.