question: protected void insertText ( final String text , final NotificationType type ) { ChatTextSink dest = new ChatTextSink ( textPane . getDocument ( ) ) ; StyleSet set = new StyleSet ( StyleContext . getDefaultStyleContext ( ) , getStyle ( type . getColor ( ) , type . getStyleDescription ( ) ) ) ; set . setAttribute ( StyleConstants . Foreground , type . getColor ( ) ) ; formatter . format ( text , set , dest ) ; }
target:  Add text using a style defined for a notification type.