229 |
public Shape modelToView(int position, Shape a, Position.Bias bias) |
public Shape modelToView(int position, Shape a, Position.Bias bias) |
230 |
throws BadLocationException |
throws BadLocationException |
231 |
{ |
{ |
|
if (view == null) |
|
|
return null; |
|
|
|
|
232 |
return ((View) view).modelToView(position, a, bias); |
return ((View) view).modelToView(position, a, bias); |
233 |
} |
} |
234 |
|
|
235 |
/** |
/** |
236 |
|
* Maps coordinates from the <code>View</code>'s space into a position |
237 |
|
* in the document model. |
238 |
|
* |
239 |
|
* @param x the x coordinate in the view space |
240 |
|
* @param y the y coordinate in the view space |
241 |
|
* @param a the allocation of this <code>View</code> |
242 |
|
* @param b the bias to use |
243 |
|
* |
244 |
|
* @return the position in the document that corresponds to the screen |
245 |
|
* coordinates <code>x, y</code> |
246 |
|
*/ |
247 |
|
public int viewToModel(float x, float y, Shape a, Position.Bias b) |
248 |
|
{ |
249 |
|
return view.viewToModel(x, y, a, b); |
250 |
|
} |
251 |
|
|
252 |
|
/** |
253 |
* Notification about text insertions. These are forwarded to the |
* Notification about text insertions. These are forwarded to the |
254 |
* real root view. |
* real root view. |
255 |
* |
* |