Class SyntaxUtilities
- java.lang.Object
- 
- com.inductiveautomation.ignition.client.jedittextarea.SyntaxUtilities
 
- 
 public class SyntaxUtilities extends java.lang.ObjectClass with several utility functions used by jEdit's syntax colorizing subsystem.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static SyntaxStyle[]getDefaultSyntaxStyles()Returns the default style table.static intpaintSyntaxLine(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 booleanregionMatches(boolean ignoreCase, javax.swing.text.Segment text, int offset, char[] match)Checks if a subregion of aSegmentis equal to a character array.static booleanregionMatches(boolean ignoreCase, javax.swing.text.Segment text, int offset, java.lang.String match)Checks if a subregion of aSegmentis equal to a string.
 
- 
- 
- 
Method Detail- 
regionMatchespublic static boolean regionMatches(boolean ignoreCase, javax.swing.text.Segment text, int offset, java.lang.String match)Checks if a subregion of aSegmentis equal to a string.- Parameters:
- ignoreCase- True if case should be ignored, false otherwise
- text- The segment
- offset- The offset into the segment
- match- The string to match
 
 - 
regionMatchespublic static boolean regionMatches(boolean ignoreCase, javax.swing.text.Segment text, int offset, char[] match)Checks if a subregion of aSegmentis equal to a character array.- Parameters:
- ignoreCase- True if case should be ignored, false otherwise
- text- The segment
- offset- The offset into the segment
- match- The character array to match
 
 - 
getDefaultSyntaxStylespublic static SyntaxStyle[] getDefaultSyntaxStyles() Returns the default style table. This can be passed to thesetStyles()method ofSyntaxDocumentto use the default syntax styles.
 - 
paintSyntaxLinepublic 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. Note that this method munges the offset and count values of the segment.- Parameters:
- line- The line segment
- tokens- The token list for the line
- styles- The syntax style list
- expander- The tab expander used to determine tab stops. May be null
- gfx- The graphics context
- x- The x co-ordinate
- y- The y co-ordinate
- Returns:
- The x co-ordinate, plus the width of the painted string
 
 
- 
 
-