de.hunsicker.jalopy.swing.syntax
Class SyntaxUtilities

java.lang.Object
  |
  +--de.hunsicker.jalopy.swing.syntax.SyntaxUtilities

public class SyntaxUtilities
extends java.lang.Object

Class with segment and bracket matching functions used by the syntax colorizing subsystem. It also provides a way to get the default color table.

Version:
$Id: SyntaxUtilities.java,v 1.1.2.1 2005/02/09 22:01:35 notzippy Exp $
Author:
Slava Pestov

Method Summary
static java.awt.Color[] getDefaultSyntaxColors()
          Returns the default color table.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultSyntaxColors

public static java.awt.Color[] getDefaultSyntaxColors()
Returns the default color table. This can be passed to the setColors() method of SyntaxDocument to use the default syntax colors.

Returns:
the default colors.

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.

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
Returns:
true if the given Segment is equal to the character array.


Copyright © 1997-2005 Jalopy. All Rights Reserved.