Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gjt.sp.jedit.syntax
Class DisplayTokenHandler

    java.lang.Object
      org.gjt.sp.jedit.syntax.DefaultTokenHandler
          org.gjt.sp.jedit.syntax.DisplayTokenHandler

All Implemented Interfaces:
  TokenHandler

public class DisplayTokenHandler
extends DefaultTokenHandler

Creates `Chunk` objects that can be painted on screen.

Field Summary
`static int` | `MAX_CHUNK_LEN`

Fields inherited from class org.gjt.sp.jedit.syntax.DefaultTokenHandler
`firstToken, lastToken, lineContext`

Constructor Summary
`DisplayTokenHandler()`

Method Summary
`java.util.List` | `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 out, float wrapMargin)`
`protected void` | `initChunk(Chunk chunk, javax.swing.text.Segment seg)`

Methods inherited from class org.gjt.sp.jedit.syntax.DefaultTokenHandler
`addToken, createToken, getLineContext, getParserRuleSet, getTokens, init, setLineContext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAX_CHUNK_LEN

    public static final int MAX_CHUNK_LEN

See Also:
  Constant Field Values

Constructor Detail

### DisplayTokenHandler

    public DisplayTokenHandler()

Method Detail

### init

    public void init(SyntaxStyle[] styles,
                     java.awt.font.FontRenderContext fontRenderContext,
                     javax.swing.text.TabExpander expander,
                     java.util.List out,
                     float wrapMargin)

### getChunkList

    public java.util.List getChunkList()

  Returns the list of chunks.

  Since:
    jEdit 4.1pre7

### handleToken

    public 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.

  Specified by:
    `handleToken` in interface `TokenHandler`
  Overrides:
    `handleToken` in class `DefaultTokenHandler`
  Parameters:
    `seg` - The segment containing the text
    `id` - The token type (one of the constants in the `Token` class).
    `offset` - The start offset of the token
    `length` - The number of characters in the token
    `context` - The line context
  Since:
    jEdit 4.2pre3

### initChunk

    protected void initChunk(Chunk chunk,
                             javax.swing.text.Segment seg)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD