public class DisplayTokenHandler extends DefaultTokenHandler
Chunk objects that can be painted on screen.firstToken, lastToken, lineContext| Constructor and Description |
|---|
DisplayTokenHandler() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Chunk> |
getChunkList()
Returns the list of chunks.
|
void |
handleToken(javax.swing.text.Segment seg,
byte id,
int offset,
int length,
TokenMarker.LineContext context)
Called by the token marker when a syntax token has been parsed.
|
void |
init(SyntaxStyle[] styles,
java.awt.font.FontRenderContext fontRenderContext,
javax.swing.text.TabExpander expander,
java.util.List<Chunk> out,
float wrapMargin,
int physicalLineOffset)
Init some variables that will be used when marking tokens.
|
addToken, createToken, getLineContext, getParserRuleSet, getTokens, init, setLineContextpublic void init(SyntaxStyle[] styles, java.awt.font.FontRenderContext fontRenderContext, javax.swing.text.TabExpander expander, java.util.List<Chunk> out, float wrapMargin, int physicalLineOffset)
JEditBuffer.markTokens(int, TokenHandler)
to store some data that will be required and that we don't want
to put in the parametersstyles - fontRenderContext - expander - out - wrapMargin - physicalLineOffset - offset of the physical lines which these chunks belong to required for implementing elastic tabstopspublic java.util.List<Chunk> getChunkList()
public void handleToken(javax.swing.text.Segment seg,
byte id,
int offset,
int length,
TokenMarker.LineContext context)
handleToken in interface TokenHandlerhandleToken in class DefaultTokenHandlerseg - The segment containing the textid - The token type (one of the constants in the
Token class).offset - The start offset of the tokenlength - The number of characters in the tokencontext - The line context