Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: LayoutInfo API? #381

Open
andy-goryachev-oracle opened this issue Nov 20, 2024 · 0 comments
Open

Q: LayoutInfo API? #381

andy-goryachev-oracle opened this issue Nov 20, 2024 · 0 comments

Comments

@andy-goryachev-oracle
Copy link

Greetings!

In addition to #380, I have a more specific question. The JavaFX does not offer public APIs for introspection into text layout (in Text/TextFlow), making it difficult to provide e.g. navigation in a custom text component. Would you be interested in taking a look at the LayoutInfo API being proposed?

JEP: https://github.com/andy-goryachev-oracle/Test/blob/main/doc/Text/LayoutInfo.md
PR: openjdk/jfx#1596

  • JDK-8341670: [Text,TextFlow] Public API for Text Layout Info (Enhancement - P4)
  • JDK-8341672: [Text/TextFlow] getRangeInfo (Enhancement - P4)
  • JDK-8341671: [Text/TextFlow] getCaretInfo (Enhancement - P4)

I hope the new API will remove the need for hacks and workarounds you need to implement. If you are interested, I would like to find out

  • will it provide sufficient introspection into the text layout?
  • did you encounter JDK-8341438 TextFlow: incorrect caretShape(), hitTest(), rangeShape() with non-empty padding/border?
  • and how did you solve it? what's your recommendation for whether to fix it, or should we provide a temporary system property for ease of migration?

Thank you in advance,
-andy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant