public class SyntaxUtilities
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static @NotNull SyntaxStyles |
getDefaultSyntaxStyles()
Returns the default styles.
|
static int |
paintSyntaxLine(@NotNull javax.swing.text.Segment line,
@NotNull java.lang.Iterable<Token> tokens,
@NotNull SyntaxStyles styles,
@NotNull javax.swing.text.TabExpander expander,
@NotNull 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,
@NotNull java.lang.CharSequence match)
Checks if a sub-region of a
Segment is equal to a string. |
public static boolean regionMatches(boolean ignoreCase, javax.swing.text.Segment text, int offset, @NotNull @NotNull java.lang.CharSequence 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 match@NotNull public static @NotNull SyntaxStyles getDefaultSyntaxStyles()
TextAreaPainter.setStyles(SyntaxStyles)
to use the default syntax
styles.public static int paintSyntaxLine(@NotNull @NotNull javax.swing.text.Segment line, @NotNull @NotNull java.lang.Iterable<Token> tokens, @NotNull @NotNull SyntaxStyles styles, @NotNull @NotNull javax.swing.text.TabExpander expander, @NotNull @NotNull java.awt.Graphics gfx, int x, int y)
line
- the line segmenttokens
- the token list for the linestyles
- the syntax stylesexpander
- the tab expander used to determine tab stops; may be
nullgfx
- the graphics contextx
- the x co-ordinatey
- the y co-ordinate