1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
244 /** |
244 /** |
245 * Returns the closest model position to <code>x</code>. |
245 * Returns the closest model position to <code>x</code>. |
246 * <code>rowIndex</code> gives the index of the view that corresponds |
246 * <code>rowIndex</code> gives the index of the view that corresponds |
247 * that should be looked in. |
247 * that should be looked in. |
248 * @param pos position into the model |
248 * @param pos position into the model |
|
249 * @param b the bias |
249 * @param a the allocated region to render into |
250 * @param a the allocated region to render into |
250 * @param direction one of the following values: |
251 * @param direction one of the following values: |
251 * <ul> |
252 * <ul> |
252 * <li><code>SwingConstants.NORTH</code> |
253 * <li><code>SwingConstants.NORTH</code> |
253 * <li><code>SwingConstants.SOUTH</code> |
254 * <li><code>SwingConstants.SOUTH</code> |
254 * </ul> |
255 * </ul> |
255 * @param biasRet an array containing the bias that were checked |
256 * @param biasRet an array containing the bias that were checked |
256 * in this method |
257 * in this method |
257 * @param rowIndex the index of the view |
258 * @param rowIndex the index of the view |
258 * @param x the x coordinate of interest |
259 * @param x the x coordinate of interest |
|
260 * @throws BadLocationException if a bad location is encountered |
259 * @return the closest model position to <code>x</code> |
261 * @return the closest model position to <code>x</code> |
260 */ |
262 */ |
261 // NOTE: This will not properly work if ParagraphView contains |
263 // NOTE: This will not properly work if ParagraphView contains |
262 // other ParagraphViews. It won't raise, but this does not message |
264 // other ParagraphViews. It won't raise, but this does not message |
263 // the children views with getNextVisualPositionFrom. |
265 // the children views with getNextVisualPositionFrom. |