public class DefaultSyntaxDocument extends javax.swing.text.PlainDocument implements SyntaxDocument
SyntaxDocument. It takes care of inserting and
deleting lines from the token marker's state.org.gjt.sp.jedit.syntax.SyntaxDocument,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
class |
DefaultSyntaxDocument.DocumentHandler
An implementation of
DocumentListener that inserts and deletes lines
from the token marker's state. |
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| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Color[] |
colors
The colors
|
protected TokenMarker |
tokenMarker
The token marker
|
| Constructor and Description |
|---|
DefaultSyntaxDocument()
Creates a new
DefaultSyntaxDocument instance. |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color[] |
getColors()
Returns the color array that maps token identifiers to
java.awt.Color
objects. |
TokenMarker |
getTokenMarker()
Returns the token marker that is to be used to split lines of this document up
into tokens.
|
void |
setColors(java.awt.Color[] colors)
Sets the color array that maps token identifiers to
java.awt.Color
ojects. |
void |
setTokenMarker(TokenMarker tm)
Sets the token marker that is to be used to split lines of this document up into
tokens.
|
void |
tokenizeLines()
Reparses the document, by passing all lines to the token marker.
|
void |
tokenizeLines(int start,
int len)
Reparses the document, by passing the specified lines to the token marker.
|
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertString, insertUpdate, removeUpdateaddDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlockclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, renderprotected TokenMarker tokenMarker
protected java.awt.Color[] colors
public DefaultSyntaxDocument()
DefaultSyntaxDocument instance.public void setColors(java.awt.Color[] colors)
java.awt.Color
ojects. May throw an exception if this is not supported for this type of
document.setColors in interface SyntaxDocumentcolors - The new color listpublic java.awt.Color[] getColors()
java.awt.Color
objects.getColors in interface SyntaxDocumentpublic void setTokenMarker(TokenMarker tm)
setTokenMarker in interface SyntaxDocumenttm - The new token markerpublic TokenMarker getTokenMarker()
getTokenMarker in interface SyntaxDocumentpublic void tokenizeLines()
tokenizeLines in interface SyntaxDocumentpublic void tokenizeLines(int start,
int len)
tokenizeLines in interface SyntaxDocumentstart - The first line to parselen - The number of lines, after the first one to parse