-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8337287: Update image in javax.swing.text.Document.insert #20376
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
Conversation
Replace the image which illustrates insertion of a string from GIF format to SVG. Mark up class and method references with {@code}.
👋 Welcome back aivanov! A progress list of the required criteria for merging this PR into |
@aivanov-jdk This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
@aivanov-jdk The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
@prrace Does it make sense to add a sentence which describes the image? I added one for Inserting a string is more straightforward: all the |
I missed this question. Yes, sure. |
Just curious why the chars are not in the middle of the boxes? |
They're aligned according to CSS rules: text-anchor: middle;
dominant-baseline: middle; The text is positioned in the middle of the box -0.5 pixels. However, I agree the text looks visually unbalanced. Indeed, at 200% scale and Arial font, there are 6 pixels on top of ‘T’ and ‘h’, but there are 8 pixels on the bottom of ‘q’. If I use Calibri font, the values are 8 and 9 pixels correspondingly. So it depends on the font used. The situation is similar on macOS. |
Moving the text position by 0.5 seems to help, and the values become equal: 7 on either side. This needs to be done for the image in At this time, the diagrams for |
Submitted JDK-8340580: Characters in Document diagrams not in the middle. |
@prrace I updated the PR with an example, look for “For example, if the document contains the text…”. |
@mrserb Do you have any other questions? I'll update the position of text in |
@prrace Did you have a chance to look at the updated text? The newly added paragraph starts at line 482. |
/integrate |
Going to push as commit caf053b.
Your commit was automatically rebased without conflicts. |
@aivanov-jdk Pushed as commit caf053b. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This changeset updates the image in the documentation for the
Document.insert
method. The image inDocument.remove
was updated by JDK-4622866 in PR #15701.Now the illustration of inserting looks similar to removing. The new image is in SVG format.
For reference:
Document.insert
in JDK 22;As in the case with
remove
, I marked up to classes and members with{@code}
.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20376/head:pull/20376
$ git checkout pull/20376
Update a local copy of the PR:
$ git checkout pull/20376
$ git pull https://git.openjdk.org/jdk.git pull/20376/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20376
View PR using the GUI difftool:
$ git pr show -t 20376
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20376.diff
Using Webrev
Link to Webrev Comment