Class ScrollingAWTTerminal.ScrollController

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int scrollValue  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ScrollController()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getScrollingOffset()
      Called by the SwingTerminal to know the 'offset' into the backlog.
      void updateModel​(int totalSize, int screenHeight)
      Called by the SwingTerminal when the terminal has changed or more lines are entered into the terminal
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • scrollValue

        private int scrollValue
    • Constructor Detail

      • ScrollController

        private ScrollController()
    • Method Detail

      • updateModel

        public void updateModel​(int totalSize,
                                int screenHeight)
        Description copied from interface: TerminalScrollController
        Called by the SwingTerminal when the terminal has changed or more lines are entered into the terminal
        Specified by:
        updateModel in interface TerminalScrollController
        Parameters:
        totalSize - Total number of lines in the backlog currently
        screenHeight - Number of lines covered by the terminal window at its current size
      • getScrollingOffset

        public int getScrollingOffset()
        Description copied from interface: TerminalScrollController
        Called by the SwingTerminal to know the 'offset' into the backlog. Returning 0 here will always draw the latest lines; if you return 5, it will draw from five lines into the backlog and skip the 5 most recent lines.
        Specified by:
        getScrollingOffset in interface TerminalScrollController
        Returns:
        According to this scroll controller, how far back into the backlog are we?