Module com.googlecode.lanterna
Class ScrollingAWTTerminal.ScrollController
java.lang.Object
com.googlecode.lanterna.terminal.swing.ScrollingAWTTerminal.ScrollController
- All Implemented Interfaces:
TerminalScrollController
- Enclosing class:
ScrollingAWTTerminal
private class ScrollingAWTTerminal.ScrollController
extends Object
implements TerminalScrollController
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.googlecode.lanterna.terminal.swing.TerminalScrollController
TerminalScrollController.Null
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
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
-
Field Details
-
scrollValue
private int scrollValue
-
-
Constructor Details
-
ScrollController
private ScrollController()
-
-
Method Details
-
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 interfaceTerminalScrollController
- Parameters:
totalSize
- Total number of lines in the backlog currentlyscreenHeight
- 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 interfaceTerminalScrollController
- Returns:
- According to this scroll controller, how far back into the backlog are we?
-