Package jsyntaxpane
Class SyntaxStyles
java.lang.Object
jsyntaxpane.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
Fields -
Method Summary
Modifier and TypeMethodDescriptionint
drawText
(Segment segment, int x, int y, Graphics graphics, TabExpander e, Token token) Draw the given Token.static SyntaxStyles
Returns the Default SingletonReturn the style for the given TokenTypevoid
mergeStyles
(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)
-
Field Details
-
STYLE_PATTERN
-
-
Method Details
-
mergeStyles
You can call the mergeStyles method with a Properties file to customize the existing styles. Any existing styles will be overwritten by the styles you provide.- Parameters:
styles
-
-
getInstance
Returns the Default Singleton- Returns:
-
read
-
put
-
getStyle
Return the style for the given TokenType- Parameters:
type
-- Returns:
-
drawText
Draw the given Token. This will simply find the proper SyntaxStyle for the TokenType and then asks the proper Style to draw the text of the Token.- Parameters:
segment
-x
-y
-graphics
-e
-token
-- Returns:
-