Interface SplitScreen
public interface SplitScreen
Manages a split-screen terminal layout where the screen is divided
into independently scrolling regions.
Created via Connection.splitScreen(double).
The original screen becomes the "main" region (typically bottom, where
readline operates). The split creates a new region (typically top,
for output/logs).
Experimental API — this feature is under active development and the API may change.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMinimum number of rows a region can have. -
Method Summary
Modifier and TypeMethodDescriptionReturns the main/original region (bottom region, where readline operates).voidclose()Close the split-screen layout and restore the terminal to a single full-screen region.doubleGet the current split ratio.voidresume()Resume the split-screen layout after asuspend().voidsetSeparator(String separator) Set the separator line style.voidsetSplitRatio(double ratio) Change the split ratio.voidsuspend()Suspend the split-screen layout temporarily.Returns the new region created by the split (top region).
-
Field Details
-
MIN_REGION_HEIGHT
static final int MIN_REGION_HEIGHTMinimum number of rows a region can have.- See Also:
-
-
Method Details
-
topRegion
ScreenRegion topRegion()Returns the new region created by the split (top region).- Returns:
- the top screen region
-
bottomRegion
ScreenRegion bottomRegion()Returns the main/original region (bottom region, where readline operates).- Returns:
- the bottom screen region
-
setSplitRatio
void setSplitRatio(double ratio) Change the split ratio.- Parameters:
ratio- the new ratio (0.0-1.0, fraction of screen for the top region)
-
getSplitRatio
double getSplitRatio()Get the current split ratio.- Returns:
- the ratio (fraction of screen for the top region)
-
setSeparator
Set the separator line style.The separator is drawn between the top and bottom regions. The string is repeated to fill the terminal width. Use null or empty string for no separator.
- Parameters:
separator- the separator character(s), e.g. "─" or "="
-
suspend
void suspend()Suspend the split-screen layout temporarily.Used when a command needs the full screen (e.g., entering alternate screen buffer for an editor or pager). The split layout is hidden and can be restored with
resume(). -
resume
void resume()Resume the split-screen layout after asuspend(). Redraws the separator and all regions. -
close
void close()Close the split-screen layout and restore the terminal to a single full-screen region.
-