|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The interface a document must implement to be colorizable by the
SyntaxEditorKit. It defines two methods, one that returns the
TokenMarker that will split a line into a list of tokens, and a method
that returns a color array that maps identification tags returned by the token marker
into Color objects. The possible token identifiers are defined as static
fields in the Token class.
| Field Summary |
| Fields inherited from interface javax.swing.text.Document |
StreamDescriptionProperty, TitleProperty |
| 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 interface javax.swing.text.Document |
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render |
| 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.
colors - The new color listpublic java.awt.Color[] getColors()
java.awt.Color
objects. Each index in the array is a token type.
public void setTokenMarker(TokenMarker tm)
tm - The new token markerpublic TokenMarker getTokenMarker()
public void tokenizeLines()
public void tokenizeLines(int start,
int len)
start - 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 | ||||||||||