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

8341670: [Text,TextFlow] Public API for Text Layout Info #1596

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andy-goryachev-oracle
Copy link
Contributor

@andy-goryachev-oracle andy-goryachev-oracle commented Oct 8, 2024

The RichTextArea control (JDK-8301121), or any custom control that needs non-trivial navigation within complex or wrapped text needs a public API to get information about text layout.

This change fixes the missing functionality by adding a new public method to the Text and TextFlow classes.:

    /**
     * Obtains the snapshot of the current text layout information.
     * @return the layout information
     * @since 24
     */
    public final LayoutInfo getLayoutInfo()

The immutable LayoutInfo structure contains information about:

  • text lines: offsets and bounds
  • overall layout bounds

TBD:

the platform can also report additional information such as:

  • individual text lines' left and right side bearings (what are those?)
  • text runs within each line

/reviewers 2
/csr


Progress

  • Change must not contain extraneous whitespace
  • Change requires a CSR request matching fixVersion jfx24 to be approved (needs to be created)
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8341670: [Text,TextFlow] Public API for Text Layout Info (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1596/head:pull/1596
$ git checkout pull/1596

Update a local copy of the PR:
$ git checkout pull/1596
$ git pull https://git.openjdk.org/jfx.git pull/1596/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1596

View PR using the GUI difftool:
$ git pr show -t 1596

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1596.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 8, 2024

👋 Welcome back angorya! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 8, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Oct 8, 2024

@andy-goryachev-oracle
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@openjdk openjdk bot added the csr Need approved CSR to integrate pull request label Oct 8, 2024
@openjdk
Copy link

openjdk bot commented Oct 8, 2024

@andy-goryachev-oracle has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@andy-goryachev-oracle please create a CSR request for issue JDK-8341670 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@andy-goryachev-oracle andy-goryachev-oracle marked this pull request as ready for review October 8, 2024 18:16
@openjdk openjdk bot added the rfr Ready for review label Oct 8, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 8, 2024

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csr Need approved CSR to integrate pull request rfr Ready for review
Development

Successfully merging this pull request may close these issues.

1 participant