Package org.fife.ui.rsyntaxtextarea
Interface TokenFactory
-
- All Known Implementing Classes:
DefaultTokenFactory
interface TokenFactoryInterface for a class that generates tokens somehow.- Version:
- 0.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TokenImplcreateToken()Returns a null token.TokenImplcreateToken(char[] line, int beg, int end, int startOffset, int type)Returns a token.TokenImplcreateToken(javax.swing.text.Segment line, int beg, int end, int startOffset, int type)Returns a token.voidresetAllTokens()Resets the state of this token maker.
-
-
-
Method Detail
-
createToken
TokenImpl createToken()
Returns a null token.- Returns:
- A null token.
-
createToken
TokenImpl createToken(javax.swing.text.Segment line, int beg, int end, int startOffset, int type)
Returns a token.- Parameters:
line- The segment from which to get the token's text.beg- The starting offset of the token's text in the segment.end- The ending offset of the token's text in the segment.startOffset- The offset in the document of the token.type- The type of token.- Returns:
- The token.
-
createToken
TokenImpl createToken(char[] line, int beg, int end, int startOffset, int type)
Returns a token.- Parameters:
line- The char array from which to get the token's text.beg- The starting offset of the token's text in the char array.end- The ending offset of the token's text in the char array.startOffset- The offset in the document of the token.type- The type of token.- Returns:
- The token.
-
resetAllTokens
void resetAllTokens()
Resets the state of this token maker. This method should be called by theTokenMakerevery time a token list is generated for a new line so the tokens can be reused.
-
-