| java.lang.Object workbench.gui.editor.SyntaxUtilities
SyntaxUtilities | public class SyntaxUtilities (Code) | | Class with several utility functions used by jEdit's syntax colorizing
subsystem.
author: Slava Pestov version: $Id: SyntaxUtilities.java,v 1.10 2007/12/17 20:41:20 thomas Exp $ |
Method Summary | |
public static SyntaxStyle[] | getDefaultSyntaxStyles() Returns the default style table. | public static int | paintSyntaxLine(Segment line, Token tokens, SyntaxStyle[] styles, TabExpander expander, Graphics gfx, int x, int y, int addwidth) Paints the specified line onto the graphics context. | public static boolean | regionMatches(boolean ignoreCase, Segment text, int offset, String match) Checks if a subregion of a Segment is equal to a
string. | public static boolean | regionMatches(boolean ignoreCase, Segment text, int offset, char[] match) Checks if a subregion of a Segment is equal to a
character array. |
getDefaultSyntaxStyles | public static SyntaxStyle[] getDefaultSyntaxStyles()(Code) | | Returns the default style table. This can be passed to the
setStyles() method of SyntaxDocument
to use the default syntax styles.
|
paintSyntaxLine | public static int paintSyntaxLine(Segment line, Token tokens, SyntaxStyle[] styles, TabExpander expander, Graphics gfx, int x, int y, int addwidth)(Code) | | Paints the specified line onto the graphics context. Note that this
method munges the offset and count values of the segment.
Parameters: line - The line segment Parameters: tokens - The token list for the line Parameters: styles - The syntax style list Parameters: expander - The tab expander used to determine tab stops. Maybe null Parameters: gfx - The graphics context Parameters: x - The x co-ordinate Parameters: y - The y co-ordinate Parameters: addwidth - Additional spacing to be added to the line width The x co-ordinate, plus the width of the painted string |
regionMatches | public static boolean regionMatches(boolean ignoreCase, Segment text, int offset, String match)(Code) | | Checks if a subregion of a Segment is equal to a
string.
Parameters: ignoreCase - True if case should be ignored, false otherwise Parameters: text - The segment Parameters: offset - The offset into the segment Parameters: match - The string to match |
regionMatches | public static boolean regionMatches(boolean ignoreCase, Segment text, int offset, char[] match)(Code) | | Checks if a subregion of a Segment is equal to a
character array.
Parameters: ignoreCase - True if case should be ignored, false otherwise Parameters: text - The segment Parameters: offset - The offset into the segment Parameters: match - The character array to match |
|
|