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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Minimum number of rows a region can have.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the main/original region (bottom region, where readline operates).
    void
    Close the split-screen layout and restore the terminal to a single full-screen region.
    double
    Get the current split ratio.
    void
    Resume the split-screen layout after a suspend().
    void
    setSeparator(String separator)
    Set the separator line style.
    void
    setSplitRatio(double ratio)
    Change the split ratio.
    void
    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_HEIGHT
      Minimum 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

      void setSeparator(String separator)
      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 a suspend(). Redraws the separator and all regions.
    • close

      void close()
      Close the split-screen layout and restore the terminal to a single full-screen region.