org.gjt.sp.jedit.syntax
Class SoftWrapTokenHandler

java.lang.Object
  |
  +--org.gjt.sp.jedit.syntax.DefaultTokenHandler
        |
        +--org.gjt.sp.jedit.syntax.DisplayTokenHandler
              |
              +--org.gjt.sp.jedit.syntax.SoftWrapTokenHandler
All Implemented Interfaces:
TokenHandler

public class SoftWrapTokenHandler
extends DisplayTokenHandler

Splits token lists to fit within a specified margin.


Field Summary
 
Fields inherited from class org.gjt.sp.jedit.syntax.DisplayTokenHandler
charWidth, expander, fontRenderContext, seg, styles, x
 
Fields inherited from class org.gjt.sp.jedit.syntax.DefaultTokenHandler
firstToken, lastToken
 
Constructor Summary
SoftWrapTokenHandler()
           
 
Method Summary
 java.util.List getChunkList()
          Returns the list of chunks.
 void handleToken(byte id, int offset, int length, TokenMarker.LineContext context)
          Called by the token marker when a syntax token has been parsed.
 void init(javax.swing.text.Segment seg, SyntaxStyle[] styles, java.awt.font.FontRenderContext fontRenderContext, javax.swing.text.TabExpander expander, java.util.List out, float wrapMargin)
           
 
Methods inherited from class org.gjt.sp.jedit.syntax.DisplayTokenHandler
createToken, getChunks, init, setMonospacedCharWidth
 
Methods inherited from class org.gjt.sp.jedit.syntax.DefaultTokenHandler
addToken, getParserRuleSet, getTokens, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoftWrapTokenHandler

public SoftWrapTokenHandler()
Method Detail

init

public void init(javax.swing.text.Segment seg,
                 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(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:
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.1pre1