|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.text.DocumentFilter
groovy.ui.text.StructuredSyntaxDocumentFilter
public class StructuredSyntaxDocumentFilter
| Nested Class Summary | |
|---|---|
class |
StructuredSyntaxDocumentFilter.LexerNode
|
private static class |
StructuredSyntaxDocumentFilter.MLComparator
|
protected class |
StructuredSyntaxDocumentFilter.MultiLineRun
|
| Nested classes/interfaces inherited from class javax.swing.text.DocumentFilter |
|---|
javax.swing.text.DocumentFilter.FilterBypass |
| Field Summary | |
|---|---|
private java.nio.CharBuffer |
buffer
|
protected StructuredSyntaxDocumentFilter.LexerNode |
lexer
The root of the lexical parsing tree. |
private static StructuredSyntaxDocumentFilter.MLComparator |
ML_COMPARATOR
|
protected java.util.TreeSet |
mlTextRunSet
The position tree of multi-line comments. |
private javax.swing.text.Segment |
segment
|
protected javax.swing.text.DefaultStyledDocument |
styledDocument
|
static java.lang.String |
TAB_REPLACEMENT
|
| Constructor Summary | |
|---|---|
StructuredSyntaxDocumentFilter(javax.swing.text.DefaultStyledDocument document)
Creates a new instance of StructuredSyntaxDocumentFilter |
|
| Method Summary | |
|---|---|
private int |
calcBeginParse(int offset)
|
private int |
calcEndParse(int offset)
|
private static void |
checkRegexp(java.lang.String regexp)
|
StructuredSyntaxDocumentFilter.LexerNode |
createLexerNode()
Create a new LexerNode for adding to root. |
private StructuredSyntaxDocumentFilter.MultiLineRun |
getMultiLineRun(int offset)
|
StructuredSyntaxDocumentFilter.LexerNode |
getRootNode()
Get the root node for lexing the document. |
void |
insertString(javax.swing.text.DocumentFilter.FilterBypass fb,
int offset,
java.lang.String text,
javax.swing.text.AttributeSet attrs)
Insert a string into the document, and then parse it if the parser has been set. |
protected void |
parseDocument(int offset,
int length)
Parse the Document to update the character styles given an initial start position. |
void |
remove(javax.swing.text.DocumentFilter.FilterBypass fb,
int offset,
int length)
Remove a string from the document, and then parse it if the parser has been set. |
void |
replace(javax.swing.text.DocumentFilter.FilterBypass fb,
int offset,
int length,
java.lang.String text,
javax.swing.text.AttributeSet attrs)
Replace a string in the document, and then parse it if the parser has been set. |
private java.lang.String |
replaceMetaCharacters(java.lang.String string)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TAB_REPLACEMENT
private static final StructuredSyntaxDocumentFilter.MLComparator ML_COMPARATOR
protected StructuredSyntaxDocumentFilter.LexerNode lexer
protected javax.swing.text.DefaultStyledDocument styledDocument
private javax.swing.text.Segment segment
private java.nio.CharBuffer buffer
protected java.util.TreeSet mlTextRunSet
| Constructor Detail |
|---|
public StructuredSyntaxDocumentFilter(javax.swing.text.DefaultStyledDocument document)
document - the styled document to parse| Method Detail |
|---|
private static void checkRegexp(java.lang.String regexp)
private int calcBeginParse(int offset)
private int calcEndParse(int offset)
public StructuredSyntaxDocumentFilter.LexerNode createLexerNode()
private StructuredSyntaxDocumentFilter.MultiLineRun getMultiLineRun(int offset)
public StructuredSyntaxDocumentFilter.LexerNode getRootNode()
public void insertString(javax.swing.text.DocumentFilter.FilterBypass fb,
int offset,
java.lang.String text,
javax.swing.text.AttributeSet attrs)
throws javax.swing.text.BadLocationException
insertString in class javax.swing.text.DocumentFilterfb - offset - text - attrs -
javax.swing.text.BadLocationException
protected void parseDocument(int offset,
int length)
throws javax.swing.text.BadLocationException
offset - length -
javax.swing.text.BadLocationException
public void remove(javax.swing.text.DocumentFilter.FilterBypass fb,
int offset,
int length)
throws javax.swing.text.BadLocationException
remove in class javax.swing.text.DocumentFilterfb - offset - length -
javax.swing.text.BadLocationException
public void replace(javax.swing.text.DocumentFilter.FilterBypass fb,
int offset,
int length,
java.lang.String text,
javax.swing.text.AttributeSet attrs)
throws javax.swing.text.BadLocationException
replace in class javax.swing.text.DocumentFilterfb - offset - length - text - attrs -
javax.swing.text.BadLocationExceptionprivate java.lang.String replaceMetaCharacters(java.lang.String string)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||