Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.memoire.jedit
Class JEditSyntaxUtilities  view JEditSyntaxUtilities download JEditSyntaxUtilities.java

java.lang.Object
  extended bycom.memoire.jedit.JEditSyntaxUtilities

public class JEditSyntaxUtilities
extends java.lang.Object

Class with several utility functions used by jEdit's syntax colorizing subsystem.

Version:
$Id: JEditSyntaxUtilities.java,v 1.3 2001/07/25 17:39:05 desnoix Exp $

Constructor Summary
private JEditSyntaxUtilities()
           
 
Method Summary
static JEditSyntaxStyle[] getDefaultJEditSyntaxStyles()
          Returns the default style table.
static int paintSyntaxLine(javax.swing.text.Segment line, JEditToken tokens, JEditSyntaxStyle[] 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JEditSyntaxUtilities

private JEditSyntaxUtilities()
Method Detail

regionMatches

public 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.


regionMatches

public 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.


getDefaultJEditSyntaxStyles

public static JEditSyntaxStyle[] getDefaultJEditSyntaxStyles()
Returns the default style table. This can be passed to the setStyles() method of JEditSyntaxDocument to use the default syntax styles.


paintSyntaxLine

public static int paintSyntaxLine(javax.swing.text.Segment line,
                                  JEditToken tokens,
                                  JEditSyntaxStyle[] 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.