void repaintScreen ( ) { int repaintLine = 1 ; console . out ( ) . print ( ansi ( ) . eraseScreen ( Erase . ALL ) ) ; console . out ( ) . print ( ansi ( ) . cursor ( 1 , 1 ) ) ; console . out ( ) . print ( "\33[" + ( getHeaderSize ( ) + 1 ) + ";" + ( terminal . getHeight ( ) - getFooterSize ( ) ) + ";r" ) ; redrawHeader ( ) ; redrawFooter ( ) ; LinkedList < String > linesToDisplay = new LinkedList < String > ( ) ; int l = 1 ; while ( linesToDisplay . size ( ) < terminal . getHeight ( ) - getFooterSize ( ) ) { String currentLine = getContent ( l ++ ) ; linesToDisplay . addAll ( toDisplayLines ( currentLine ) ) ; } for ( int i = 0 ; i < terminal . getHeight ( ) - getHeaderSize ( ) - getFooterSize ( ) ; i ++ ) { console . out ( ) . print ( ansi ( ) . cursor ( repaintLine + getHeaderSize ( ) , 1 ) ) ; displayText ( linesToDisplay . get ( i ) ) ; repaintLine ++ ; } console . out ( ) . print ( ansi ( ) . cursor ( 2 , 1 ) ) ; }
Repaints the whole screen .