1 package com
.googlecode
.lanterna
.graphics
;
3 import java
.io
.IOException
;
6 * Describes an area that can be 'scrolled', by moving a range of lines up or down. Certain terminals will implement
7 * this through extensions and are much faster than if lanterna tries to manually erase and re-print the text.
11 public interface Scrollable
{
13 * Scroll a range of lines of this Scrollable according to given distance.
15 * If scroll-range is empty (firstLine > lastLine || distance == 0) then
16 * this method does nothing.
18 * Lines that are scrolled away from are cleared.
20 * If absolute value of distance is equal or greater than number of lines
21 * in range, then all lines within the range will be cleared.
23 * @param firstLine first line of the range to be scrolled (top line is 0)
24 * @param lastLine last (inclusive) line of the range to be scrolled
25 * @param distance if > 0: move lines up, else if < 0: move lines down.
27 void scrollLines(int firstLine
, int lastLine
, int distance
) throws IOException
;