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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voiddoTputs(Appendable out, String str, Object... params) private static intstatic voidtputs(Appendable out, String str, Object... params) Print the given terminal capabilitiesstatic StringPrint the given terminal capabilities
-
Field Details
-
sv
-
dv
-
IFTE_NONE
private static final int IFTE_NONE- See Also:
-
IFTE_IF
private static final int IFTE_IF- See Also:
-
IFTE_THEN
private static final int IFTE_THEN- See Also:
-
IFTE_ELSE
private static final int IFTE_ELSE- See Also:
-
-
Constructor Details
-
Curses
private Curses()
-
-
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
-
doTputs
- Throws:
IOException
-
toInteger
-