Interface ScreenRegion
public interface ScreenRegion
A region of the terminal screen that can be independently written to.
Screen regions are created by splitting the terminal via
Connection.splitScreen(double). Each region
has its own scrollback buffer and size. Content written to a region
scrolls independently within that region's bounds.
Experimental API — this feature is under active development and the API may change.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the region's visible content and scrollback buffer.voidclose()Close this region, merging it back into the parent region.voidsetResizeHandler(Consumer<Size> handler) Set a handler to be called when this region is resized.size()Returns the current size of this region.voidWrite text to this region.default voidWrite a line of text to this region (appends newline).
-
Method Details
-
write
Write text to this region.The text is appended to the region's scrollback buffer and rendered within the region's bounds. If the text exceeds the visible area, older content scrolls up within the region.
Thread-safe — can be called from any thread.
- Parameters:
text- the text to write, may contain ANSI escape sequences
-
writeln
Write a line of text to this region (appends newline).- Parameters:
text- the text to write
-
size
Size size()Returns the current size of this region.- Returns:
- the region size (width x height in characters)
-
setResizeHandler
-
clear
void clear()Clear the region's visible content and scrollback buffer. -
close
void close()Close this region, merging it back into the parent region. After closing, this region can no longer be written to.
-