public int viewToModel(GlyphView v,float x,float y,Shape a,Position.Bias[] biasReturn){
  Rectangle2D alloc=(a instanceof Rectangle2D) ? (Rectangle2D)a : a.getBounds2D();
  TextHitInfo hit=layout.hitTestChar(x - (float)alloc.getX(),0);
  int pos=hit.getInsertionIndex();
  if (pos == v.getEndOffset()) {
    pos--;
  }
  biasReturn[0]=hit.isLeadingEdge() ? Position.Bias.Forward : Position.Bias.Backward;
  return pos + v.getStartOffset();
}

public int viewToModel ( GlyphView v , float x , float y , Shape a , Position . Bias [ ] biasReturn ) { Rectangle2D alloc = ( a instanceof Rectangle2D ) ? ( Rectangle2D ) a : a . getBounds2D ( ) ; TextHitInfo hit = layout . hitTestChar ( x - ( float ) alloc . getX ( ) , 0 ) ; int pos = hit . getInsertionIndex ( ) ; if ( pos == v . getEndOffset ( ) ) { pos -- ; } biasReturn [ 0 ] = hit . isLeadingEdge ( ) ? Position . Bias . Forward : Position . Bias . Backward ; return pos + v . getStartOffset ( ) ; }
provides a mapping from the view coordinate space to the logical coordinate space of the model .
