/** * Changes style/coloring scheme into the specified. * * @param name Name of color scheme (HRD name). * @param useBackground If true, native HRD background properties would be assigned to colored * StyledText. */ public void setRegionMapper(String name, boolean useBackground) { baseEditor.setRegionMapper("rgb", name); StyledRegion sr = (StyledRegion) baseEditor.getBackground(); text.setForeground(null); text.setBackground(null); if (useBackground) { text.setForeground(cm.getColor(sr.bfore, sr.fore)); text.setBackground(cm.getColor(sr.bback, sr.back)); } ; /* if ((sr.style & StyledRegion.BOLD) != 0){ Font cf = text.getFont(); FontData fdata[] = cf.getFontData(); fdata[0].setStyle(SWT.BOLD); text.setFont(new Font(text.getDisplay(), fdata)); System.out.println("font!"); }; */ setCross(vertCross, horzCross); };