public class SyntaxUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SPECIAL_CHAR_END_OF_LINE |
static String |
SPECIAL_CHAR_SPACE |
static String |
SPECIAL_CHAR_TAB |
Modifier and Type | Method and Description |
---|---|
static int |
paintSyntaxLine(CodeEditor editor,
Segment line,
int start,
int end,
Token tokens,
SyntaxStyleSchema styles,
TabExpander expander,
Graphics gfx,
int x,
int y)
|
static int |
paintSyntaxLine(CodeEditor editor,
Segment line,
int start,
int end,
Token tokens,
SyntaxStyleSchema styles,
TabExpander expander,
Graphics gfx,
int x,
int y,
int lineStartOffset)
Paints the specified line onto the graphics context.
|
static boolean |
regionMatches(boolean ignoreCase,
Segment text,
int offset,
char[] match)
Checks if a subregion of a
Segment is equal to a character array. |
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 final String SPECIAL_CHAR_SPACE
public static final String SPECIAL_CHAR_TAB
public static final String SPECIAL_CHAR_END_OF_LINE
public static boolean regionMatches(boolean ignoreCase, Segment text, int offset, 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, 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 match@Deprecated public static int paintSyntaxLine(CodeEditor editor, Segment line, int start, int end, Token tokens, SyntaxStyleSchema styles, TabExpander expander, Graphics gfx, int x, int y)
paintSyntaxLine(CodeEditor, javax.swing.text.Segment, int, int,
com.jidesoft.editor.tokenmarker.Token, SyntaxStyleSchema, javax.swing.text.TabExpander,
java.awt.Graphics, int, int, int)
editor
- The CodeEditor instanceline
- The line segmentstart
- The start positionend
- The end positiontokens
- 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-ordinatepublic static int paintSyntaxLine(CodeEditor editor, Segment line, int start, int end, Token tokens, SyntaxStyleSchema styles, TabExpander expander, Graphics gfx, int x, int y, int lineStartOffset)
editor
- The CodeEditor instanceline
- The line segmentstart
- The start positionend
- The end positiontokens
- 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-ordinatelineStartOffset
- The offset between the offset of Segment line and the start offset of the line in the code
editor.