A document implementation that can be tokenized by the syntax highlighting system.
Fields inherited from class | Fields |
---|---|
class javax.swing.text.PlainDocument |
tabSizeAttribute, lineLimitAttribute, ParagraphElementName, ContentElementName, SectionElementName, BidiElementName, ElementNameAttribute, StreamDescriptionProperty, TitleProperty |
class javax.swing.text.AbstractDocument |
ParagraphElementName, ContentElementName, SectionElementName, BidiElementName, ElementNameAttribute, StreamDescriptionProperty, TitleProperty |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
addUndoableEdit(javax.swing.undo.UndoableEdit edit) Adds an undoable edit to this document's undo list. |
|
void |
beginCompoundEdit() Starts a compound edit that can be undone in one operation. |
|
void |
endCompoundEdit() Ends a compound edit that can be undone in one operation. |
|
TokenMarker |
getTokenMarker() Returns the token marker that is to be used to split lines of this document up into tokens. |
|
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 | Name |
---|---|
class javax.swing.text.PlainDocument |
javax.swing.text.PlainDocument#insertString(int, java.lang.String, javax.swing.text.AttributeSet), javax.swing.text.PlainDocument#getDefaultRootElement(), javax.swing.text.PlainDocument#getParagraphElement(int), javax.swing.text.PlainDocument#remove(int, int), javax.swing.text.PlainDocument#getProperty(java.lang.Object), javax.swing.text.PlainDocument#getLength(), javax.swing.text.PlainDocument#replace(int, int, java.lang.String, javax.swing.text.AttributeSet), javax.swing.text.PlainDocument#getText(int, int), javax.swing.text.PlainDocument#getText(int, int, javax.swing.text.Segment), javax.swing.text.PlainDocument#removeDocumentListener(javax.swing.event.DocumentListener), javax.swing.text.PlainDocument#putProperty(java.lang.Object, java.lang.Object), javax.swing.text.PlainDocument#readUnlock(), javax.swing.text.PlainDocument#addDocumentListener(javax.swing.event.DocumentListener), javax.swing.text.PlainDocument#createPosition(int), javax.swing.text.PlainDocument#getDocumentProperties(), javax.swing.text.PlainDocument#setDocumentProperties(java.util.Dictionary), javax.swing.text.PlainDocument#getAsynchronousLoadPriority(), javax.swing.text.PlainDocument#setAsynchronousLoadPriority(int), javax.swing.text.PlainDocument#setDocumentFilter(javax.swing.text.DocumentFilter), javax.swing.text.PlainDocument#getDocumentFilter(), javax.swing.text.PlainDocument#getDocumentListeners(), javax.swing.text.PlainDocument#addUndoableEditListener(javax.swing.event.UndoableEditListener), javax.swing.text.PlainDocument#removeUndoableEditListener(javax.swing.event.UndoableEditListener), javax.swing.text.PlainDocument#getUndoableEditListeners(), javax.swing.text.PlainDocument#getStartPosition(), javax.swing.text.PlainDocument#getEndPosition(), javax.swing.text.PlainDocument#getRootElements(), javax.swing.text.PlainDocument#getBidiRootElement(), javax.swing.text.PlainDocument#dump(java.io.PrintStream), javax.swing.text.PlainDocument#readLock(), javax.swing.text.PlainDocument#render(java.lang.Runnable), javax.swing.text.PlainDocument#getListeners(java.lang.Class), javax.swing.text.PlainDocument#wait(long), javax.swing.text.PlainDocument#wait(long, int), javax.swing.text.PlainDocument#wait(), javax.swing.text.PlainDocument#equals(java.lang.Object), javax.swing.text.PlainDocument#toString(), javax.swing.text.PlainDocument#hashCode(), javax.swing.text.PlainDocument#getClass(), javax.swing.text.PlainDocument#notify(), javax.swing.text.PlainDocument#notifyAll() |
class javax.swing.text.AbstractDocument |
javax.swing.text.AbstractDocument#remove(int, int), javax.swing.text.AbstractDocument#getProperty(java.lang.Object), javax.swing.text.AbstractDocument#getLength(), javax.swing.text.AbstractDocument#replace(int, int, java.lang.String, javax.swing.text.AttributeSet), javax.swing.text.AbstractDocument#getText(int, int), javax.swing.text.AbstractDocument#getText(int, int, javax.swing.text.Segment), javax.swing.text.AbstractDocument#removeDocumentListener(javax.swing.event.DocumentListener), javax.swing.text.AbstractDocument#putProperty(java.lang.Object, java.lang.Object), javax.swing.text.AbstractDocument#readUnlock(), javax.swing.text.AbstractDocument#addDocumentListener(javax.swing.event.DocumentListener), javax.swing.text.AbstractDocument#insertString(int, java.lang.String, javax.swing.text.AttributeSet), javax.swing.text.AbstractDocument#createPosition(int), javax.swing.text.AbstractDocument#getDefaultRootElement(), javax.swing.text.AbstractDocument#getParagraphElement(int), javax.swing.text.AbstractDocument#getDocumentProperties(), javax.swing.text.AbstractDocument#setDocumentProperties(java.util.Dictionary), javax.swing.text.AbstractDocument#getAsynchronousLoadPriority(), javax.swing.text.AbstractDocument#setAsynchronousLoadPriority(int), javax.swing.text.AbstractDocument#setDocumentFilter(javax.swing.text.DocumentFilter), javax.swing.text.AbstractDocument#getDocumentFilter(), javax.swing.text.AbstractDocument#getDocumentListeners(), javax.swing.text.AbstractDocument#addUndoableEditListener(javax.swing.event.UndoableEditListener), javax.swing.text.AbstractDocument#removeUndoableEditListener(javax.swing.event.UndoableEditListener), javax.swing.text.AbstractDocument#getUndoableEditListeners(), javax.swing.text.AbstractDocument#getStartPosition(), javax.swing.text.AbstractDocument#getEndPosition(), javax.swing.text.AbstractDocument#getRootElements(), javax.swing.text.AbstractDocument#getBidiRootElement(), javax.swing.text.AbstractDocument#dump(java.io.PrintStream), javax.swing.text.AbstractDocument#readLock(), javax.swing.text.AbstractDocument#render(java.lang.Runnable), javax.swing.text.AbstractDocument#getListeners(java.lang.Class), javax.swing.text.AbstractDocument#wait(long), javax.swing.text.AbstractDocument#wait(long, int), javax.swing.text.AbstractDocument#wait(), javax.swing.text.AbstractDocument#equals(java.lang.Object), javax.swing.text.AbstractDocument#toString(), javax.swing.text.AbstractDocument#hashCode(), javax.swing.text.AbstractDocument#getClass(), javax.swing.text.AbstractDocument#notify(), javax.swing.text.AbstractDocument#notifyAll() |
Adds an undoable edit to this document's undo list. The edit should be ignored if something is currently being undone.
edit
- The undoable editStarts a compound edit that can be undone in one operation. Subclasses that implement undo should override this method; this class has no undo functionality so this method is empty.
Ends a compound edit that can be undone in one operation. Subclasses that implement undo should override this method; this class has no undo functionality so this method is empty.
Returns the token marker that is to be used to split lines of this document up into tokens. May return null if this document is not to be colorized.
Sets the token marker that is to be used to split lines of this document up into tokens. May throw an exception if this is not supported for this type of document.
tm
- The new token markerReparses the document, by passing all lines to the token marker. This should be called after the document is first loaded.
Reparses the document, by passing the specified lines to the token marker. This should be called after a large quantity of text is first inserted.
start
- The first line to parselen
- The number of lines, after the first one to parse