returnValue = Utilities.getTabbedTextWidth(lineSegment, fm,0,painter,0);
returnValue = x + Utilities.getTabbedTextWidth(lineSegment, fm,x,painter,0);
	public int offsetToX(int line, int offset)	{		TokenMarker tokenMarker = getTokenMarker();		int returnValue;		/* Use painter's cached info for speed */		TextAreaPainter painter = textArea.getPainter();		FontMetrics fm = painter.getFontMetrics();		Segment lineSegment = painter.currentLine;		if(painter.currentLineIndex != line)		{			getLineText(line,lineSegment);		}		/* Because this is called in the middle of paintLine(),		 * we need to save the segment's state.		 */		int segmentOffset = lineSegment.offset;		int segmentCount = lineSegment.count;		/* If syntax coloring is disabled, do simple translation */		if(tokenMarker == null)		{			lineSegment.count = offset;			returnValue = Utilities.getTabbedTextWidth(lineSegment,				fm,0,painter,0);		}		/* If syntax coloring is enabled, we have to do this because		 * tokens can vary in width */		else		{			// XXX: token list is computed twice for lines			// that are highlighted			Token tokens = tokenMarker.markTokens(lineSegment,line);			int x = 0;			Toolkit toolkit = painter.getToolkit();			Font defaultFont = painter.getFont();			SyntaxStyle[] styles = painter.getStyles();			for(;;)			{				byte id = tokens.id;				if(id == Token.END)				{					returnValue = x;					break;				}				if(id == Token.NULL)					fm = toolkit.getFontMetrics(defaultFont);				else				{					fm = toolkit.getFontMetrics(styles[id]						.getStyledFont(defaultFont));				}				int length = tokens.length;				if(offset + segmentOffset < lineSegment.offset + length)				{					lineSegment.count = offset - (lineSegment.offset - segmentOffset);					returnValue = x + Utilities.getTabbedTextWidth(						lineSegment,fm,x,painter,0);					break;				}				else				{					lineSegment.count = length;					x += Utilities.getTabbedTextWidth(						lineSegment,fm,x,painter,0);					lineSegment.offset += length;				}				tokens = tokens.next;			}		}		lineSegment.offset = segmentOffset;		lineSegment.count = segmentCount;		return returnValue + textArea.getHorizontalOffset();	}