| javax.swing.text.GapContent org.skunk.swing.text.syntax.SyntaxContent
Constructor Summary | |
public | SyntaxContent() constructs a new SyntaxContent object, with a Flexicizer SyntaxTokenizer. | public | SyntaxContent(int initialLength) constructs a new SyntaxContent object with the given initial length. | public | SyntaxContent(SyntaxTokenizer tokenizer) constructs a new SyntaxContent object with the given SyntaxTokenizer. |
SyntaxContent | public SyntaxContent()(Code) | | constructs a new SyntaxContent object, with a Flexicizer SyntaxTokenizer.
|
SyntaxContent | public SyntaxContent(int initialLength)(Code) | | constructs a new SyntaxContent object with the given initial length.
Parameters: initialLength - the initial length |
SyntaxContent | public SyntaxContent(SyntaxTokenizer tokenizer)(Code) | | constructs a new SyntaxContent object with the given SyntaxTokenizer.
Parameters: tokenizer - the SyntaxTokenizer to install |
getFileMode | public FileMode getFileMode()(Code) | | returns the file mode of this tokenizer.
the file mode, or null if the tokenizer currently has no mode |
insertString | public UndoableEdit insertString(int where, String str) throws BadLocationException(Code) | | insert string into the content at the given offset.
overridden to allocate space in the style buffer for the
insert, and to tokenize the document.
Parameters: where - the offset into the document where the insert should begin Parameters: str - the string to insert exception: BadLocationException - if the offset is greater than the document length |
isTokenizing | public boolean isTokenizing()(Code) | | says whether tokenization is on.
If it returns true, the syntaxDocument and syntaxTokenizer must both be non-null
whether tokenization is on. |
remove | public UndoableEdit remove(int where, int nitems) throws BadLocationException(Code) | | removes characters from the content.
overridden to deallocate space from the styleBuffer,
and to tokenize the document.
Parameters: where - the offset of the removal Parameters: nitems - the number of characters to remove exception: BadLocationException - if the parameters are out of bounds |
setFileMode | public void setFileMode(FileMode mode)(Code) | | sets the file mode.
Parameters: mode - the file mode |
setSyntaxDocument | protected void setSyntaxDocument(SyntaxDocument syntaxDocument)(Code) | | gives the content object a reference to the document.
A hack, but it needs this at present to call the tokenizer's
tokenize() method.
Parameters: syntaxDocument - the SyntaxDocument which owns this content object |
setSyntaxTokenizer | public void setSyntaxTokenizer(SyntaxTokenizer syntaxTokenizer)(Code) | | applies a syntax tokenizer.
Parameters: syntaxTokenizer - the tokenizer |
setTokenizing | public void setTokenizing(boolean tokenizing)(Code) | | sets tokenization on.
If there is no tokenizer installed, or if the syntaxDocument is null,
isTokenizing() will return false, regardless of the value set here.
Parameters: tokenizing - whether to tokenize |
|
|