int (Graphics g, Color backColor, CharSequence text, Point position, int fontType) { int w = getTextSegmentWidth(text, position.x, fontType); if (backColor != null) { Color savedColor = g.getColor(); g.setColor(backColor); g.fillRect(position.x, position.y, w, getLineHeight()); g.setColor(savedColor); } return position.x + w; }