Class DisplayTokenHandler

    • Field Detail

      • MAX_CHUNK_LEN

        public static int MAX_CHUNK_LEN
    • 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<Chunk> out,
                         float wrapMargin,
                         int physicalLineOffset)
        Init some variables that will be used when marking tokens. This is called before JEditBuffer.markTokens(int, TokenHandler) to store some data that will be required and that we don't want to put in the parameters
        Parameters:
        styles -
        fontRenderContext -
        expander -
        out -
        wrapMargin -
        physicalLineOffset - offset of the physical lines which these chunks belong to required for implementing elastic tabstops
      • getChunkList

        public java.util.List<Chunk> getChunkList()
        Returns the list of chunks. Each element is a head of linked chunks and represents a screen line.
        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