javafx.scene.text.HitInfo Java Examples
The following examples show how to use
javafx.scene.text.HitInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FxHacksJava9.java From FxDock with Apache License 2.0 | 5 votes |
public CHitInfo getHit(TextFlow t, double x, double y) { HitInfo h = getHitInfo(t, x, y); int ix = h.getCharIndex(); boolean leading = h.isLeading(); return new CHitInfo(ix, leading); }
Example #2
Source File: FxHacksJava9.java From FxDock with Apache License 2.0 | 4 votes |
protected HitInfo getHitInfo(TextFlow t, double x, double y) { Point2D p = new Point2D(x, y); return t.hitTest(p); }
Example #3
Source File: FxHacksJava9.java From FxDock with Apache License 2.0 | 4 votes |
public int getTextPos(TextFlow t, double x, double y) { HitInfo h = getHitInfo(t, x, y); return h.getInsertionIndex(); }