Text.getImpl_caretShape returns strange results under certain conditions

Tom Schindl tom.schindl at bestsolution.at
Sun Nov 23 19:04:33 UTC 2014


I was debugging a problem in my StyledText-Source editor today and found
one of my layout problems is that ListCells (the inner representation of
the editor lines is simply ListView) sometime get really strange heights

To display a caret in the UI I'm creating a caret-Shape using
Text.getImpl_caretShape but this is causeing my layout problems because
under certain conditions the returned cursor is completely wrong.

Look for example at the following example. The first line is the bounds
of the Text-Element with the content (privata) and the 2nd is the Path
created by Text.getImpl_caretShape

> BoundingBox [minX:0.0, minY:0.0, minZ:0.0, width:81.01318359375, height:15.0, depth:0.0, maxX:81.01318359375, maxY:15.0, maxZ:0.0]
>   privata ===> [MoveTo[x=9.00146484375, y=120.0], LineTo[x=9.00146484375, y=135.0]]

the correct path is [MoveTo[x=9.00146484375, y=0.0],
LineTo[x=9.00146484375, y=15.0]]

I've been able to work around this problem for the time being. Anyone an
idea what is causing this completely invalid caretShape?


Thomas Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7, A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck

More information about the openjfx-dev mailing list