static int viewToIndex(TextLayout textLayout, double x, Shape alloc, Position.Bias[] biasReturn) {
Rectangle2D bounds = ViewUtils.shapeAsRect(alloc);
TextHitInfo hitInfo = x2Index(textLayout, (float)(x - bounds.getX()));
if (biasReturn != null) {
biasReturn[0] = hitInfo.isLeadingEdge() ? Position.Bias.Forward : Position.Bias.Backward;
}
return hitInfo.getInsertionIndex();
}
HighlightsViewUtils.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录