Class SplitScreenImpl

java.lang.Object
org.aesh.terminal.tty.split.SplitScreenImpl
All Implemented Interfaces:
org.aesh.terminal.tty.SplitScreen

public class SplitScreenImpl extends Object implements org.aesh.terminal.tty.SplitScreen
Implementation of split-screen using cursor addressing.

The terminal is divided into a top region (for output/logs) and a bottom region (for readline). A separator line is drawn between them. Each region has its own scrollback buffer. Rendering uses cursor save/restore and absolute cursor positioning (ESC [row;colH).

Experimental — this feature is under active development.

  • Constructor Details

    • SplitScreenImpl

      public SplitScreenImpl(org.aesh.terminal.Connection connection, double ratio)
      Create a split screen.
      Parameters:
      connection - the terminal connection
      ratio - fraction of screen for the top region (0.0-1.0)
  • Method Details

    • handleResize

      public void handleResize(org.aesh.terminal.tty.Size newSize)
      Handle terminal resize.
      Parameters:
      newSize - the new terminal size
    • topRegion

      public org.aesh.terminal.tty.ScreenRegion topRegion()
      Specified by:
      topRegion in interface org.aesh.terminal.tty.SplitScreen
    • bottomRegion

      public org.aesh.terminal.tty.ScreenRegion bottomRegion()
      Specified by:
      bottomRegion in interface org.aesh.terminal.tty.SplitScreen
    • setSplitRatio

      public void setSplitRatio(double ratio)
      Specified by:
      setSplitRatio in interface org.aesh.terminal.tty.SplitScreen
    • getSplitRatio

      public double getSplitRatio()
      Specified by:
      getSplitRatio in interface org.aesh.terminal.tty.SplitScreen
    • setSeparator

      public void setSeparator(String separator)
      Specified by:
      setSeparator in interface org.aesh.terminal.tty.SplitScreen
    • suspend

      public void suspend()
      Specified by:
      suspend in interface org.aesh.terminal.tty.SplitScreen
    • resume

      public void resume()
      Specified by:
      resume in interface org.aesh.terminal.tty.SplitScreen
    • close

      public void close()
      Specified by:
      close in interface org.aesh.terminal.tty.SplitScreen
    • isClosed

      public boolean isClosed()
      Check whether this split screen has been closed.
      Returns:
      true if closed
    • isSuspended

      public boolean isSuspended()
      Check whether this split screen is currently suspended.
      Returns:
      true if suspended