/** * Constructor. * * @param line The segment from which to get the token. * @param beg The first character's position in <code>line</code>. * @param end The last character's position in <code>line</code>. * @param startOffset The offset into the document at which this * token begins. * @param type A token type listed as "generic" above. * @param languageIndex The language index for this token. */ public TokenImpl(char[] line, int beg, int end, int startOffset, int type, int languageIndex) { this(); set(line, beg,end, startOffset, type); setLanguageIndex(languageIndex); }
/** * {@inheritDoc} */ @Override public void addNullToken() { if (firstToken==null) { firstToken = tokenFactory.createToken(); currentToken = firstToken; } else { TokenImpl next = tokenFactory.createToken(); currentToken.setNextToken(next); previousToken = currentToken; currentToken = next; } currentToken.setLanguageIndex(languageIndex); }
/** * Adds the token specified to the current linked list of tokens. * * @param array The character array. * @param start The starting offset in the array. * @param end The ending offset in the array. * @param tokenType The token's type. * @param startOffset The offset in the document at which this token * occurs. * @param hyperlink Whether this token is a hyperlink. */ public void addToken(char[] array, int start, int end, int tokenType, int startOffset, boolean hyperlink) { if (firstToken==null) { firstToken = tokenFactory.createToken(array, start, end, startOffset, tokenType); currentToken = firstToken; // previous token is still null. } else { TokenImpl next = tokenFactory.createToken(array, start,end, startOffset, tokenType); currentToken.setNextToken(next); previousToken = currentToken; currentToken = next; } currentToken.setLanguageIndex(languageIndex); currentToken.setHyperlink(hyperlink); }
/** * Constructor. * * @param line The segment from which to get the token. * @param beg The first character's position in <code>line</code>. * @param end The last character's position in <code>line</code>. * @param startOffset The offset into the document at which this * token begins. * @param type A token type listed as "generic" above. * @param languageIndex The language index for this token. */ public TokenImpl(char[] line, int beg, int end, int startOffset, int type, int languageIndex) { this(); set(line, beg,end, startOffset, type); setLanguageIndex(languageIndex); }
tempToken.set(drawSeg.array, tokenOffset-start, p-1-start, tokenOffset, token.getType()); tempToken.setLanguageIndex(token.getLanguageIndex()); boolean paintBG = host.getPaintTokenBackgrounds(line, y); painter.paint(tempToken, g, x,y, host, this, 0, paintBG);
/** * {@inheritDoc} */ @Override public void addNullToken() { if (firstToken==null) { firstToken = tokenFactory.createToken(); currentToken = firstToken; } else { TokenImpl next = tokenFactory.createToken(); currentToken.setNextToken(next); previousToken = currentToken; currentToken = next; } currentToken.setLanguageIndex(languageIndex); }
/** * Adds the token specified to the current linked list of tokens. * * @param array The character array. * @param start The starting offset in the array. * @param end The ending offset in the array. * @param tokenType The token's type. * @param startOffset The offset in the document at which this token * occurs. * @param hyperlink Whether this token is a hyperlink. */ public void addToken(char[] array, int start, int end, int tokenType, int startOffset, boolean hyperlink) { if (firstToken==null) { firstToken = tokenFactory.createToken(array, start, end, startOffset, tokenType); currentToken = firstToken; // previous token is still null. } else { TokenImpl next = tokenFactory.createToken(array, start,end, startOffset, tokenType); currentToken.setNextToken(next); previousToken = currentToken; currentToken = next; } currentToken.setLanguageIndex(languageIndex); currentToken.setHyperlink(hyperlink); }
tempToken.set(drawSeg.array, tokenOffset-start, p-1-start, tokenOffset, token.getType()); tempToken.setLanguageIndex(token.getLanguageIndex()); boolean paintBG = host.getPaintTokenBackgrounds(line, y); painter.paint(tempToken, g, x,y, host, this, 0, paintBG);