All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.util.FastSyntaxColoringModel

java.lang.Object
   |
   +----jp.kyasu.awt.DefaultTextModel
           |
           +----jp.kyasu.awt.DefaultTextEditModel
                   |
                   +----jp.kyasu.awt.util.SyntaxColoringModel
                           |
                           +----jp.kyasu.awt.util.FastSyntaxColoringModel

public class FastSyntaxColoringModel
extends SyntaxColoringModel
The FastSyntaxColoringModel class implements the TextEditModel interface. The FastSyntaxColoringModel object hilights the syntax of the text representing a program written in a computer language.

The FastSyntaxColoringModel hilights the syntax faster than the SyntaxColoringModel but it cannot change the font styles for the tokens.

Version:
09 May 1998
Author:
Kazuki YASUMATSU
See Also:
LanguageTokenizer, LanguageTokenizerFactory

Constructor Index

 o FastSyntaxColoringModel(RichText, LanguageTokenizerFactory)
Constructs a model with the specified rich text and factory of the language tokenizer.
 o FastSyntaxColoringModel(RichText, LanguageTokenizerFactory, Font)
Constructs a model with the specified rich text, factory of the language tokenizer, and base font.

Method Index

 o setCommentStyleAndColor(int, Color)
Sets the font style for the comment tokens.
 o setConstantStyleAndColor(int, Color)
Sets the font style for the constant tokens.
 o setKeywordStyleAndColor(int, Color)
Sets the font style for the keyword tokens.
 o setNormalStyleAndColor(int, Color)
Sets the font style for the normal tokens.

Constructors

 o FastSyntaxColoringModel
 public FastSyntaxColoringModel(RichText richText,
                                LanguageTokenizerFactory factory)
Constructs a model with the specified rich text and factory of the language tokenizer.

Parameters:
richText - the rich text.
factory - the factory of the language tokenizer.
 o FastSyntaxColoringModel
 public FastSyntaxColoringModel(RichText richText,
                                LanguageTokenizerFactory factory,
                                Font baseFont)
Constructs a model with the specified rich text, factory of the language tokenizer, and base font.

Parameters:
richText - the rich text.
factory - the factory of the language tokenizer.
baseFont - the base font of the model.

Methods

 o setNormalStyleAndColor
 public void setNormalStyleAndColor(int fontStyle,
                                    Color color)
Sets the font style for the normal tokens.

Overrides:
setNormalStyleAndColor in class SyntaxColoringModel
 o setKeywordStyleAndColor
 public void setKeywordStyleAndColor(int fontStyle,
                                     Color color)
Sets the font style for the keyword tokens.

Overrides:
setKeywordStyleAndColor in class SyntaxColoringModel
 o setConstantStyleAndColor
 public void setConstantStyleAndColor(int fontStyle,
                                      Color color)
Sets the font style for the constant tokens.

Overrides:
setConstantStyleAndColor in class SyntaxColoringModel
 o setCommentStyleAndColor
 public void setCommentStyleAndColor(int fontStyle,
                                     Color color)
Sets the font style for the comment tokens.

Overrides:
setCommentStyleAndColor in class SyntaxColoringModel

All Packages  Class Hierarchy  This Package  Previous  Next  Index