infoDisplay.append( (clientId > 0 ? getTimeStamp() + "> " : "") + input.getText() + getLineDelimiter() );
if (clientId > 0) infoDisplay.append( getTimeStamp() + "> " ); int start = infoDisplay.getCharCount(); String outText = input.getText(); infoDisplay.append( outText + getLineDelimiter() ); infoDisplay.setStyleRange(new StyleRange(start, outText.length(), highlightColor, infoDisplay.getBackground()));
	protected void createContents( Composite parent, int style ) {			this.parent = parent;				parent.setLayout( null );		parent.addControlListener( this );				/* Adding the Console-Display Text-field */		// change to styledtext sometime in the future to differentiate incoming/outgoing text in color		infoDisplay = new Text( parent, style | SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.READ_ONLY );		input = new Text( parent, SWT.SINGLE | SWT.BORDER );									//Send command 		input.addKeyListener( new KeyAdapter() {			public void keyPressed( KeyEvent e ) {				int numLinesDisplayed = infoDisplay.getClientArea().height / infoDisplay.getLineHeight();				if (e.keyCode == SWT.PAGE_UP) {					if ( infoDisplay.getTopIndex() > numLinesDisplayed )  						infoDisplay.setTopIndex( infoDisplay.getTopIndex() - ( numLinesDisplayed ) );					else						infoDisplay.setTopIndex(0);				}				else if (e.keyCode == SWT.PAGE_DOWN) {					infoDisplay.setTopIndex( infoDisplay.getTopIndex() + ( numLinesDisplayed ) );				}				else if ( e.character == SWT.CR ) {					infoDisplay.append( (clientId > 0 ? getTimeStamp() + "> " : "") + input.getText() + getLineDelimiter() );					setChanged();					notifyObservers( input.getText() );					input.setText( "" );				}			}				} );		}