int gcStyle = getStyle() & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
int gcStyle = isMirrored() ? SWT.RIGHT_TO_LEFT : SWT.LEFT_TO_RIGHT;
void createCaretBitmaps() {	int caretWidth = BIDI_CARET_WIDTH;	int gcStyle = getStyle() & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);		Display display = getDisplay();		if (caretPalette == null) {		caretPalette = new PaletteData(new RGB[] {new RGB (0,0,0), new RGB (255,255,255)});	}		if (leftCaretBitmap != null) {		leftCaretBitmap.dispose();	}	ImageData imageData = new ImageData(caretWidth, lineHeight, 1, caretPalette);	leftCaretBitmap = new Image(display, imageData);	// mirror the caret gc because when the bitmap is rendered on the screen it will be 	// mirrored since the GC for the canvas is mirrored	GC gc = new GC (leftCaretBitmap, gcStyle); 	gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));	gc.drawLine(0,0,0,lineHeight);	gc.drawLine(0,0,caretWidth-1,0);	gc.drawLine(0,1,1,1);	gc.dispose();			if (rightCaretBitmap != null) {		rightCaretBitmap.dispose();	}	rightCaretBitmap = new Image(display, imageData);	// mirror the caret gc because when the bitmap is rendered on the screen it will be 	// mirrored since the GC for the canvas is mirrored	gc = new GC (rightCaretBitmap, gcStyle); 	gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));	gc.drawLine(caretWidth-1,0,caretWidth-1,lineHeight);	gc.drawLine(0,0,caretWidth-1,0);	gc.drawLine(caretWidth-1,1,1,1);	gc.dispose();	}