Class SyntaxHighlighter

  extended by edu.utep.cs.utjml.canica.jmleditor.SyntaxHighlighter

public class SyntaxHighlighter
extends Object

A class for syntax coloring a document. This class creates a new, separate thread to perform the syntax coloring of a document. The document to be syntax colored should be created by calling the createNewDocument() method. This method may be called many times to create multiple documents. However, the document that is created last will be syntax colored. Other documents can be syntax colored by calling the setDocument(StyledDocument) method.

Yoonsik Cheon

Constructor Summary
          Creates a new instance.
Method Summary
 DefaultStyledDocument createNewDocument()
          Creates and returns a new document that is automatically syntax colored.
 Thread getColorer()
          Returns the thread that does the coloring.
 void setDocument(StyledDocument doc)
          Sets the document to be syntax colored.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SyntaxHighlighter()
Creates a new instance.

Method Detail


public DefaultStyledDocument createNewDocument()
Creates and returns a new document that is automatically syntax colored. If this method is called multiple times, the last document will be syntax colored.

See Also:


public void setDocument(StyledDocument doc)
Sets the document to be syntax colored. The given document is assumed to be created by the createNewDocument() method.


public Thread getColorer()
Returns the thread that does the coloring.


UTJML is Copyright (C) 2004-2006 by University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the JML project.