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)
Draw the given Token.
|
static SyntaxStyles |
getInstance()
Returns the Default Singleton
|
SyntaxStyle |
getStyle(TokenType type)
Return 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)
styles
- public static SyntaxStyles getInstance()
public static SyntaxStyles read(Configuration config)
public void put(TokenType type, SyntaxStyle style)
public SyntaxStyle getStyle(TokenType type)
type
- public int drawText(javax.swing.text.Segment segment, int x, int y, java.awt.Graphics graphics, javax.swing.text.TabExpander e, Token token)
segment
- x
- y
- graphics
- e
- token
-