| Constructor and Description |
|---|
SyntaxScheme(boolean useDefaults)
Creates a color scheme that either has all color values set to
a default value or set to
null. |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Returns a deep copy of this color scheme.
|
boolean |
equals(Object otherScheme)
Tests whether this color scheme is the same as another color scheme.
|
int |
hashCode()
This is implemented to be consistent with
equals(Object). |
static SyntaxScheme |
loadFromString(String string)
Loads a syntax highlighting color scheme from a string created from
toCommaSeparatedString. |
void |
restoreDefaults()
Restores all colors and fonts to their default values.
|
void |
setStyle(int type,
Style style)
Sets a style to use when rendering a token type.
|
String |
toCommaSeparatedString()
Returns this syntax highlighting scheme as a comma-separated list of
values as follows:
If a color is non-null, it is added as a 24-bit integer
of the form
((r<<16) | (g<<8) | (b)); if it is
null, it is added as "-,". |
public Style[] styles
public SyntaxScheme(boolean useDefaults)
null.useDefaults - If true, all color values will
be set to default colors; if false, all colors
will be initially null.public Object clone()
public boolean equals(Object otherScheme)
public int hashCode()
equals(Object).
This is a requirement to keep FindBugs happy.public static SyntaxScheme loadFromString(String string)
toCommaSeparatedString. This method is useful for saving
and restoring color schemes.string - A string generated from toCommaSeparatedString().public void restoreDefaults()
public void setStyle(int type,
Style style)
type - The token type.style - The style for the token type.public String toCommaSeparatedString()
((r<<16) | (g<<8) | (b)); if it is
null, it is added as "-,".
i is the index of the syntax scheme.
-).
uline is whether or not the font should be
underlined, and is either t or f.
style is the family,style,size
triplet described above.
Copyright © 2009-2013 jtstand.com. All Rights Reserved.