private void processNonControlCharacters(char character){
  StringBuffer buffer=new StringBuffer();
  buffer.append(character);
  while (hasNextChar()) {
    character=getNextChar();
    if (character == '\u0000' || character == '\b' || character == '\t' || character == '\u0007' || character == '\n' || character == '\r' || character == '\u001b') {
      pushBackChar(character);
      break;
    }
    buffer.append(character);
  }
  displayNewText(buffer.toString());
}

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 ( ) ) ; }
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 .
