-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8343170: java/awt/Cursor/JPanelCursorTest/JPanelCursorTest.java does not show the default cursor #22055
Conversation
👋 Welcome back dnguyen! A progress list of the required criteria for merging this PR into |
@DamonGuy 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 1023 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
|
I notice one more cursor type (resize cursor?) in between the "move" panel and the panel containing the crosshair button and hand panel. I think it's caused by the JSplitPane resizing option. Since this test is about checking different cursor types while hovering parts of the frame, it might be worth either adding this cursor to the instructions or setting the JSplitPane to not be resizable to remove the cursor. |
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.
add frame title, probably add final to instructions field since you have it in all caps
I saw this when initially converting the test, but since the original bug description and the test summary is checking for the functionality of But I realized that the frame's wait cursor works on all OS's and the frame isn't part of the original test instructions anyway, so I repurposed the wait cursor for the pane instead. Simplifies the instructions too. |
The original reproducer didn't have test instructions so it's more likely the person who wrote the instructions just forgot about testing the wait cursor. The idea of the original test is that there was a bug where setCursor works for JComponent and JFrame but doesn't work for JPanel. So the left side of this test (move cursor) tests for JComponent, The test instructions probably missed the JFrame section of the test since the area on the test where the JFrame is tested is so small, but I think it is worth keeping it. To make the test area bigger you can set the JSplitPane to be added to the "North" of the frame instead of the "Center" and explicitly setSize(300,200) instead of pack(). If you choose to do this you should also add a step in the instructions to test the JFrame setCursor, something like |
If you want to simplify the test instructions between platforms I would rather change the move cursor to the text cursor and leave all the other cursors. |
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.
fix spacing error at line 107
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.
looks good once whitespaces removed
test/jdk/java/awt/Cursor/JPanelCursorTest/JPanelCursorTest.java
Outdated
Show resolved
Hide resolved
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.
LGTM
@DamonGuy Tested on windows and it works as expected, does the test instructions hold good on all platforms ? |
Yup! Changed the cursor types so they're applicable on all platforms. Thanks |
/integrate |
Going to push as commit c631719.
Your commit was automatically rebased without conflicts. |
Change test instructions and drawString to say "Text" instead of "Default" for cursor type. Added instructions to test
setCursor
for the frame as well. Also increased the column count to fit the instructions in linux, as it was mentioned that the instructions didn't fit there.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22055/head:pull/22055
$ git checkout pull/22055
Update a local copy of the PR:
$ git checkout pull/22055
$ git pull https://git.openjdk.org/jdk.git pull/22055/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22055
View PR using the GUI difftool:
$ git pr show -t 22055
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22055.diff
Using Webrev
Link to Webrev Comment