/** * Restores all colors and fonts to their default values. * * @param baseFont The base font to use when creating this scheme. If * this is <code>null</code>, then a default monospaced font is * used. */ public void restoreDefaults(Font baseFont) { restoreDefaults(baseFont, true); }
/** * Creates a default color scheme. * * @param baseFont The base font to use. Keywords will be a bold version * of this font, and comments will be an italicized version of this * font. * @param fontStyles Whether bold and italic should be used in the scheme * (vs. all tokens using a plain font). */ public SyntaxScheme(Font baseFont, boolean fontStyles) { styles = new Style[DEFAULT_NUM_TOKEN_TYPES]; restoreDefaults(baseFont, fontStyles); }
/** * Creates a color scheme that either has all color values set to * a default value or set to <code>null</code>. * * @param useDefaults If <code>true</code>, all color values will * be set to default colors; if <code>false</code>, all colors * will be initially <code>null</code>. */ public SyntaxScheme(boolean useDefaults) { styles = new Style[DEFAULT_NUM_TOKEN_TYPES]; if (useDefaults) { restoreDefaults(null); } }
/** * Restores all colors and fonts to their default values. * * @param baseFont The base font to use when creating this scheme. If * this is <code>null</code>, then a default monospaced font is * used. */ public void restoreDefaults(Font baseFont) { restoreDefaults(baseFont, true); }
/** * Creates a default color scheme. * * @param baseFont The base font to use. Keywords will be a bold version * of this font, and comments will be an italicized version of this * font. */ public SyntaxScheme(Font baseFont) { styles = new Style[Token.NUM_TOKEN_TYPES]; restoreDefaults(baseFont); }
/** * Creates a default color scheme. * * @param baseFont The base font to use. Keywords will be a bold version * of this font, and comments will be an italicized version of this * font. * @param fontStyles Whether bold and italic should be used in the scheme * (vs. all tokens using a plain font). */ public SyntaxScheme(Font baseFont, boolean fontStyles) { styles = new Style[DEFAULT_NUM_TOKEN_TYPES]; restoreDefaults(baseFont, fontStyles); }
/** * Creates a color scheme that either has all color values set to * a default value or set to <code>null</code>. * * @param useDefaults If <code>true</code>, all color values will * be set to default colors; if <code>false</code>, all colors * will be initially <code>null</code>. */ public SyntaxScheme(boolean useDefaults) { styles = new Style[DEFAULT_NUM_TOKEN_TYPES]; if (useDefaults) { restoreDefaults(null); } }
/** * Creates a color scheme that either has all color values set to * a default value or set to <code>null</code>. * * @param useDefaults If <code>true</code>, all color values will * be set to default colors; if <code>false</code>, all colors * will be initially <code>null</code>. */ public SyntaxScheme(boolean useDefaults) { styles = new Style[Token.NUM_TOKEN_TYPES]; if (useDefaults) { restoreDefaults(null); } }
/** * Creates a color scheme that either has all color values set to * a default value or set to <code>null</code>. * * @param useDefaults If <code>true</code>, all color values will * be set to default colors; if <code>false</code>, all colors * will be initially <code>null</code>. */ public SyntaxScheme(boolean useDefaults) { styles = new Style[Token.NUM_TOKEN_TYPES]; if (useDefaults) { restoreDefaults(); } }
public void initSytles(SyntaxPreferences prefs, FontInfo fontInfo) super.restoreDefaults(fontInfo.createFont()); Style[] stylesBuf = new Style[SquirrelTokenMarker.getNumTokenTypes()]; System.arraycopy(styles, 0, stylesBuf, 0, styles.length);