question: private void processNonControlCharacters ( char character ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( character ) ; while ( hasNextChar ( ) ) { character = getNextChar ( ) ; if ( character == '' || character == '\b' || character == '\t' || character == '' || character == '\n' || character == '\r' || character == '' ) { pushBackChar ( character ) ; break ; } buffer . append ( character ) ; } displayNewText ( buffer . toString ( ) ) ; }
target:  This method processes a contiguous sequence of non-control characters. This is a performance optimization, so that we don't have to insert or append each non-control character individually to the StyledText widget. A non-control character is any character that passes the condition in the below while loop.