public class SyntaxStyles
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.regex.Pattern |
STYLE_PATTERN |
| Modifier and Type | Method and Description |
|---|---|
int |
drawText(javax.swing.text.Segment segment,
int x,
int y,
java.awt.Graphics graphics,
javax.swing.text.TabExpander e,
Token token)
Draws the given Token.
|
static SyntaxStyles |
getInstance()
Returns the default singleton
|
SyntaxStyle |
getStyle(TokenType type)
Returns the style for the given TokenType
|
void |
mergeStyles(java.util.Properties styles)
You can call the mergeStyles method with a Properties file to customize
the existing styles.
|
void |
put(TokenType type,
SyntaxStyle style) |
static SyntaxStyles |
read(Configuration config) |
public void mergeStyles(java.util.Properties styles)
public static SyntaxStyles getInstance()
public static SyntaxStyles read(Configuration config)
public void put(TokenType type, SyntaxStyle style)
public SyntaxStyle getStyle(TokenType type)
public int drawText(javax.swing.text.Segment segment,
int x,
int y,
java.awt.Graphics graphics,
javax.swing.text.TabExpander e,
Token token)