-
- All Known Subinterfaces:
ExtendedTerminal
,IOSafeExtendedTerminal
,Screen
,TextImage
- All Known Implementing Classes:
AbstractScreen
,ANSITerminal
,BasicTextImage
,CygwinTerminal
,IOSafeTerminalAdapter.Extended
,ScreenBuffer
,TelnetTerminal
,TerminalScreen
,UnixLikeTerminal
,UnixLikeTTYTerminal
,UnixTerminal
,VirtualScreen
public interface Scrollable
Describes an area that can be 'scrolled', by moving a range of lines up or down. Certain terminals will implement this through extensions and are much faster than if lanterna tries to manually erase and re-print the text.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
scrollLines(int firstLine, int lastLine, int distance)
Scroll a range of lines of this Scrollable according to given distance.
-
-
-
Method Detail
-
scrollLines
void scrollLines(int firstLine, int lastLine, int distance) throws java.io.IOException
Scroll a range of lines of this Scrollable according to given distance. If scroll-range is empty (firstLine > lastLine || distance == 0) then this method does nothing. Lines that are scrolled away from are cleared. If absolute value of distance is equal or greater than number of lines in range, then all lines within the range will be cleared.- Parameters:
firstLine
- first line of the range to be scrolled (top line is 0)lastLine
- last (inclusive) line of the range to be scrolleddistance
- if > 0: move lines up, else if < 0: move lines down.- Throws:
java.io.IOException
- If there was an I/O error when running the operation
-
-