UTJML

edu.utep.cs.utjml.canica.jmleditor
Class SyntaxHighlighter

java.lang.Object
  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.

Author:
Yoonsik Cheon

Constructor Summary
SyntaxHighlighter()
          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

SyntaxHighlighter

public SyntaxHighlighter()
Creates a new instance.

Method Detail

createNewDocument

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:
createNewDocument()

setDocument

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


getColorer

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


UTJML

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.