Class Curses
The Curses class provides methods for manipulating the terminal display using ANSI escape sequences and terminal capabilities. It includes functionality for cursor movement, screen clearing, text attributes, and other terminal operations.
This class is named after the curses library commonly used in Unix-like systems for terminal control, though it provides a simplified subset of functionality. It handles the complexities of formatting and interpreting terminal capability strings, allowing for portable terminal manipulation across different terminal types.
Key features include:
- Cursor positioning and movement
- Screen and line clearing
- Text attribute control (bold, underline, etc.)
- Color manipulation
- Terminal capability string parsing and execution
This class is used internally by JLine components to perform terminal operations in a consistent way across different terminal types and platforms.
-
Method Summary
-
Method Details
-
tputs
Print the given terminal capabilities- Parameters:
cap
- the capability to outputparams
- optional parameters- Returns:
- the result string
-
tputs
Print the given terminal capabilities- Parameters:
out
- the output streamstr
- the capability to outputparams
- optional parameters
-