|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.swing.text.AbstractDocument
|
+--javax.swing.text.PlainDocument
|
+--de.hunsicker.jalopy.swing.syntax.DefaultSyntaxDocument
A simple implementation of SyntaxDocument. It takes care of inserting and
deleting lines from the token marker's state.
org.gjt.sp.jedit.syntax.SyntaxDocument,
Serialized Form| Nested Class Summary | |
class |
DefaultSyntaxDocument.DocumentHandler
An implementation of DocumentListener that inserts and deletes lines
from the token marker's state. |
| Field Summary | |
protected java.awt.Color[] |
colors
The colors |
protected TokenMarker |
tokenMarker
The token marker |
| Fields inherited from class javax.swing.text.PlainDocument |
lineLimitAttribute, tabSizeAttribute |
| 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 | |
DefaultSyntaxDocument()
Creates a new DefaultSyntaxDocument instance. |
|
| Method Summary | |
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. |
| Methods inherited from class javax.swing.text.PlainDocument |
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertString, insertUpdate, removeUpdate |
| Methods inherited from class javax.swing.text.AbstractDocument |
addDocumentListener, 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, 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 |
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render |
| Field Detail |
protected TokenMarker tokenMarker
protected java.awt.Color[] colors
| Constructor Detail |
public DefaultSyntaxDocument()
DefaultSyntaxDocument instance.
| Method Detail |
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 SyntaxDocument
public 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
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||