|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object processing.app.syntax.SyntaxUtilities
public class SyntaxUtilities
Class with several utility functions used by jEdit's syntax colorizing subsystem.
Method Summary | |
---|---|
static SyntaxStyle[] |
getDefaultSyntaxStyles()
Returns the default style table. |
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. |
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. |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean regionMatches(boolean ignoreCase, javax.swing.text.Segment text, int offset, java.lang.String match)
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 matchpublic static boolean regionMatches(boolean ignoreCase, javax.swing.text.Segment text, int offset, char[] match)
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 matchpublic static SyntaxStyle[] getDefaultSyntaxStyles()
setStyles()
method of SyntaxDocument
to use the default syntax styles.
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)
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |