|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsyntaxpane.SyntaxStyles
public class SyntaxStyles
The Styles to use for each TokenType. The defaults are created here, and then the resource META-INF/services/syntaxstyles.properties is read and merged. You can also pass a properties instance and merge your prefered styles into the default styles. Text is drawn by forwarding the drawText request to the SyntaxStyle for the that matches the given TokenType
Field Summary | |
---|---|
static java.util.regex.Pattern |
STYLE_PATTERN
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.regex.Pattern STYLE_PATTERN
Method Detail |
---|
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
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |