Rectangle r = a.getBounds(); childAllocation(childIndex, r); Shape result = child.modelToView(pos, r, bias); if (result == null) throw new AssertionError("" + child.getClass().getName() + ".modelToView() must not return null"); return result;
Shape childAlloc = getChildAllocation(childIndex, a); if (childAlloc == null) ret = createDefaultLocation(a, bias); Shape result = child.modelToView(pos, childAlloc, bias); if (result != null) ret = result; else ret =  createDefaultLocation(a, bias);
  public Shape modelToView(int pos, Shape a, Position.Bias bias)    throws BadLocationException  {    int childIndex = getViewIndex(pos, bias);    if (childIndex != -1)      {        View child = getView(childIndex);        Rectangle r = a.getBounds();        childAllocation(childIndex, r);        Shape result = child.modelToView(pos, r, bias);        if (result == null)          throw new AssertionError("" + child.getClass().getName()                                   + ".modelToView() must not return null");        return result;      }    else      throw new BadLocationException("No child view for the specified location",                                     pos);  }