Rectangle b = a.getBounds(); int pos = getBoundedPosition(v, v.getStartOffset(), b.x, x - b.x); return pos;
Rectangle r = a instanceof Rectangle ? (Rectangle) a : a.getBounds(); int p0 = v.getStartOffset(); int p1 = v.getEndOffset(); TabExpander te = v.getTabExpander(); Segment s = v.getText(p0, p1); int offset = Utilities.getTabbedTextOffset(s, fontMetrics, r.x, (int) x, te, p0); int ret = p0 + offset; if (ret == p1) ret--; biasRet[0] = Position.Bias.Forward; return ret;
    public int viewToModel(GlyphView v, float x, float y, Shape a,                           Bias[] biasRet)    {      Rectangle b = a.getBounds();      int pos = getBoundedPosition(v, v.getStartOffset(), b.x, x - b.x);      return pos;    }