com.cburch.editor
Class SyntaxHighlighter

java.lang.Object
  extended by com.cburch.editor.SyntaxHighlighter

public class SyntaxHighlighter
extends java.lang.Object

Handles coloring tokens according to their corresponding styles. For this to work, a scanner must be associated with the editor.

Version:
0.1 2005-05-31
Author:
Carl Burch

Constructor Summary
SyntaxHighlighter(Editor editor)
          Constructs a SyntaxHighlighter for the given editor.
 
Method Summary
 boolean isEnabled()
          Returns true if syntax highlighting is enabled.
 void setEnabled(boolean value)
          Changes the enable/disable status of this syntax highlighter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyntaxHighlighter

public SyntaxHighlighter(Editor editor)
Constructs a SyntaxHighlighter for the given editor.

Parameters:
editor - the editor whose contents we are to highlight.
Method Detail

isEnabled

public boolean isEnabled()
Returns true if syntax highlighting is enabled.

Returns:
true if this highlighter is enabled, false otherwise.

setEnabled

public void setEnabled(boolean value)
Changes the enable/disable status of this syntax highlighter. Disabling will remove all highlights; enabling will add all highlights back.

Parameters:
value - true to enable the highlighter, false to disable.