474 * Provides a way to determine the next visually represented model |
474 * Provides a way to determine the next visually represented model |
475 * location at which one might place a caret. |
475 * location at which one might place a caret. |
476 * Some views may not be visible, |
476 * Some views may not be visible, |
477 * they might not be in the same order found in the model, or they just |
477 * they might not be in the same order found in the model, or they just |
478 * might not allow access to some of the locations in the model. |
478 * might not allow access to some of the locations in the model. |
479 * |
479 * This method enables specifying a position to convert |
480 * @param pos the position to convert >= 0 |
480 * within the range of >=0. If the value is -1, a position |
|
481 * will be calculated automatically. If the value < -1, |
|
482 * the {@code BadLocationException} will be thrown. |
|
483 * |
|
484 * @param pos the position to convert |
481 * @param a the allocated region in which to render |
485 * @param a the allocated region in which to render |
482 * @param direction the direction from the current position that can |
486 * @param direction the direction from the current position that can |
483 * be thought of as the arrow keys typically found on a keyboard. |
487 * be thought of as the arrow keys typically found on a keyboard. |
484 * This will be one of the following values: |
488 * This will be one of the following values: |
485 * <ul> |
489 * <ul> |
488 * <li>SwingConstants.NORTH |
492 * <li>SwingConstants.NORTH |
489 * <li>SwingConstants.SOUTH |
493 * <li>SwingConstants.SOUTH |
490 * </ul> |
494 * </ul> |
491 * @return the location within the model that best represents the next |
495 * @return the location within the model that best represents the next |
492 * location visual position |
496 * location visual position |
493 * @exception BadLocationException |
497 * @exception BadLocationException the given position is not a valid |
|
498 * position within the document |
494 * @exception IllegalArgumentException if <code>direction</code> |
499 * @exception IllegalArgumentException if <code>direction</code> |
495 * doesn't have one of the legal values above |
500 * doesn't have one of the legal values above |
496 */ |
501 */ |
497 public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, |
502 public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, |
498 int direction, Position.Bias[] biasRet) |
503 int direction, Position.Bias[] biasRet) |