Interface StatusLine
public interface StatusLine
A persistent status line displayed between scrolling output and the prompt.
Status lines are registered via Connection.registerStatusLine(int)
and displayed in priority order (lowest priority at top, highest at bottom,
closest to the prompt). They persist across printAbove() calls and
are redrawn automatically when the prompt is redrawn.
Status lines support ANSI escape sequences for colors and styling.
Example:
StatusLine buildStatus = connection.registerStatusLine(100);
buildStatus.setMessage("[Building] src/main/java...");
// ... later
buildStatus.setMessage("[Ready] Build complete in 1.2s");
// ... when no longer needed
buildStatus.close();
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Remove this status line from the display.Get the current message.voidsetMessage(String message) Update the message displayed on this status line.
-
Method Details
-
setMessage
Update the message displayed on this status line.The message may contain ANSI escape sequences for styling. Setting to null or empty string hides the line without closing it.
Thread-safe — can be called from any thread.
- Parameters:
message- the message to display, or null to hide
-
getMessage
-
close
void close()Remove this status line from the display.After calling close(), the status line is no longer displayed and cannot be reused. Calling setMessage() after close() has no effect.
-