for (int i=0; i<syntaxScheme.getStyleCount(); i++) { Style ss = syntaxScheme.getStyle(i); if (ss!=null && ss.font!=null) {
/** * Creates and returns a syntax scheme where all styles have the same * font and foreground color. * * @param font The font for the styles. * @param fg The foreground color for the styles. * @return The syntax scheme. */ private SyntaxScheme createSyntaxScheme(Font font, Color fg) { SyntaxScheme scheme = new SyntaxScheme(true); for (int i=0; i<scheme.getStyleCount(); i++) { Style style = scheme.getStyle(i); if (style != null) { style.background = style.foreground = fg; style.font = font; if (i == 5) { style.underline = true; } else if (i == 6) { style.font = font.deriveFont(Font.BOLD, 24f); } else if (i == 7) { style.font = font.deriveFont(Font.ITALIC, 25f); } } } return scheme; }
int count = scheme.getStyleCount(); for (int i=0; i<count; i++) { Style ss = scheme.getStyle(i);
int count = scheme.getStyleCount(); for (int i=0; i<count; i++) { Style ss = scheme.getStyle(i);
/** * Set the font for all token types. * * @param textArea The text area to modify. * @param font The font to use. */ public static void setFont(RSyntaxTextArea textArea, Font font) { if (font != null) { SyntaxScheme ss = textArea.getSyntaxScheme(); ss = (SyntaxScheme) ss.clone(); for (int i = 0; i < ss.getStyleCount(); i++) { if (ss.getStyle(i) != null) { ss.getStyle(i).font = font; } } textArea.setSyntaxScheme(ss); textArea.setFont(font); } }
for (int i=0; i<syntaxScheme.getStyleCount(); i++) { Style ss = syntaxScheme.getStyle(i); if (ss!=null && ss.font!=null) {
int count = scheme.getStyleCount(); for (int i=0; i<count; i++) { Style ss = scheme.getStyle(i);
int count = scheme.getStyleCount(); for (int i=0; i<count; i++) { Style ss = scheme.getStyle(i);
for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).foreground = s.getBaseValues().getColor( for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).font = baseFont;
for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).foreground = s.getBaseValues().getColor( for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).font = baseFont;
for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).foreground = s.getBaseValues().getColor( for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).font = baseFont;
for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).foreground = s.getBaseValues().getColor(
for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).font = baseFont;
for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).foreground = getBaseValues().getColor( for (int i = 0; i < scheme.getStyleCount(); i++) { if (scheme.getStyle(i) != null) { scheme.getStyle(i).font = baseFont;