public class SyntaxUtilities
Class with several utility functions used by jEdit's syntax colorizing subsystem.
Type Params | Return Type | Name and description |
---|---|---|
|
public static SyntaxStyle[] |
getDefaultSyntaxStyles() Returns the default style table. |
|
public static int |
paintSyntaxLine(javax.swing.text.Segment line, Token tokens, SyntaxStyle[] styles, javax.swing.text.TabExpander expander, java.awt.Graphics gfx, int x, int y) Paints the specified line onto the graphics context. |
|
public static boolean |
regionMatches(boolean ignoreCase, javax.swing.text.Segment text, int offset, java.lang.String match) Checks if a subregion of a Segment is equal to a string. |
|
public static boolean |
regionMatches(boolean ignoreCase, javax.swing.text.Segment text, int offset, char[] match) Checks if a subregion of a Segment is equal to a character
array. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Returns the default style table. This can be passed to the
setStyles()
method of SyntaxDocument
to use the
default syntax styles.
Paints the specified line onto the graphics context. Note that this method munges the offset and count values of the segment.
line
- The line segmenttokens
- The token list for the linestyles
- The syntax style listexpander
- The tab expander used to determine tab stops. May be nullgfx
- The graphics contextx
- The x co-ordinatey
- The y co-ordinate Checks if a subregion of a Segment
is equal to a string.
ignoreCase
- True if case should be ignored, false otherwisetext
- The segmentoffset
- The offset into the segmentmatch
- The string to match Checks if a subregion of a Segment
is equal to a character
array.
ignoreCase
- True if case should be ignored, false otherwisetext
- The segmentoffset
- The offset into the segmentmatch
- The character array to match