-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8268145: [macos] Rendering artifacts is seen when text inside the JTable with TableCellEditor having JTextfield #22416
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
…ble with TableCellEditor having JTextfield
|
👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into |
|
@prsadhuk 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 218 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
| "inactive forever"}}, | ||
| new Object[] {"1", "2"}); | ||
|
|
||
| JFrame frame = new JFrame(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JFrame title is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
| } else { | ||
| x = alloc.x; | ||
| y = alloc.y; | ||
| width = alloc.width; | ||
| height = alloc.height; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the test case tests the else branch (no border case), since the if branch is also modified, would it be better to test both cases - with and without border?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is already being tested by existing testcases in CI and if I am not wrong by SwingSet2 too and there is no change in logic in the if branch, when it enters the branch..
kumarabhi006
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test verified and it works as expected.
honkar-jdk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestCaretArtifact (no-border case) and SwingSet2 (with border) work as expected with the fix.
| Do this few times. | ||
| If artifact is seen, press Fail else press Pass."""; | ||
|
|
||
| public static void main(String[] args) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nitpick but I think there's an extra whitespace here after void
| } | ||
|
|
||
|
|
||
| public static JFrame createUI() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra whitespace here too
|
/integrate |
|
Going to push as commit 8403285.
Your commit was automatically rebased without conflicts. |
When a textfield is embedded in a TableCellEditor in a JTable in Aqua L&F and space is entered and caret moved back and forth by pressing left/right arrow button, an artifact is seen, which is basically the caret is not properly repainted leaving behind its trails.
When caret is moved, it is repainted every time by "damaging" the area surrounding the caret to cause it to be repainted in a new location. AquaCaret overrides the default "damage" code to intersect the caret area with the border insets so that it does not damage the AquaBorder area..
For TextField case, AquaTextFieldBorder insets is removed from AquaTextField and then intersected with AquaCaret to get the dirry region which is then repainted, so as to not damage the border but it is done irrespective of whether border is shown or not, so proper dirty region is not repainted leaving behind artifacts when the caret is moved around...
Fix is to see if border to be painted is not opaque in which case the proper dirty region is calculated which is then used in repaint logic to repaint the component..
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22416/head:pull/22416$ git checkout pull/22416Update a local copy of the PR:
$ git checkout pull/22416$ git pull https://git.openjdk.org/jdk.git pull/22416/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22416View PR using the GUI difftool:
$ git pr show -t 22416Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22416.diff
Using Webrev
Link to Webrev Comment