org.comedia.text
Class CSyntaxDocument

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
        |
        +--javax.swing.text.DefaultStyledDocument
              |
              +--org.comedia.text.CSyntaxDocument
All Implemented Interfaces:
javax.swing.text.Document, java.io.Serializable, javax.swing.text.StyledDocument

public class CSyntaxDocument
extends javax.swing.text.DefaultStyledDocument

Implements a document with optimal syntax highlighting.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.DefaultStyledDocument
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit, javax.swing.text.DefaultStyledDocument.ElementBuffer, javax.swing.text.DefaultStyledDocument.ElementSpec, javax.swing.text.DefaultStyledDocument.SectionElement
 
Inner classes inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
 
Fields inherited from class javax.swing.text.DefaultStyledDocument
buffer, BUFFER_SIZE_DEFAULT
 
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
CSyntaxDocument()
           
CSyntaxDocument(javax.swing.text.AbstractDocument.Content c, javax.swing.text.StyleContext styles)
           
CSyntaxDocument(javax.swing.text.StyleContext styles)
           
 
Method Summary
 void performHighlight(CAbstractHighlighter highlighter, int start, int end)
          Performs the syntax highlighting.
 void updateAttributes(int start, int end, javax.swing.text.AttributeSet s)
           
 
Methods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged
 
Methods inherited from class javax.swing.text.AbstractDocument
addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeUndoableEditListener, render, setAsynchronousLoadPriority, setDocumentProperties, writeLock, writeUnlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.text.Document
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeUndoableEditListener, render
 

Constructor Detail

CSyntaxDocument

public CSyntaxDocument(javax.swing.text.AbstractDocument.Content c,
                       javax.swing.text.StyleContext styles)

CSyntaxDocument

public CSyntaxDocument(javax.swing.text.StyleContext styles)

CSyntaxDocument

public CSyntaxDocument()
Method Detail

updateAttributes

public void updateAttributes(int start,
                             int end,
                             javax.swing.text.AttributeSet s)

performHighlight

public void performHighlight(CAbstractHighlighter highlighter,
                             int start,
                             int end)
Performs the syntax highlighting.
Parameters:
start - a start position.
end - an end position.