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

JDK-7154070: in SwingSet2, switching between LaFs it's easy to lose JTable dividers #12385

Closed
wants to merge 6 commits into from

Conversation

prsadhuk
Copy link
Contributor

@prsadhuk prsadhuk commented Feb 2, 2023

In SwingSet2 in TableDemo, we can see grid dividers in Metal L&F but
if we Switch to the Nimbus LaF which has no grid dividers by default and then if we switch to Java (Metal): it will show no dividers.

Issue is Nimbus call JTable.showGrid(false) in installDefaults but fail to reset in uninstallDefaults which is now rectified.

No regression test is added as it can be verified by SwingSet2 Tabledemo..


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issues

  • JDK-7154070: in SwingSet2, switching between LaFs it's easy to lose JTable dividers
  • JDK-6788475: Changing to Nimbus LAF and back doesn't reset look and feel of JTable completely

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12385

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12385.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 2, 2023

👋 Welcome back psadhukhan! 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 openjdk bot added the rfr Pull request is ready for review label Feb 2, 2023
@openjdk
Copy link

openjdk bot commented Feb 2, 2023

@prsadhuk The following label will be automatically applied to this pull request:

  • client

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.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Feb 2, 2023
@mlbridge
Copy link

mlbridge bot commented Feb 2, 2023

Webrevs

@openjdk openjdk bot removed the rfr Pull request is ready for review label Feb 2, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 2, 2023
Copy link
Contributor

@TejeshR13 TejeshR13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix works as expected.

Copy link
Contributor

@kumarabhi006 kumarabhi006 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test verified with current fix.

Copy link
Contributor

@honkar-jdk honkar-jdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright year for SynthTableUI requires an update.

@openjdk
Copy link

openjdk bot commented Feb 6, 2023

@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:

7154070: in SwingSet2, switching between LaFs it's easy to lose JTable dividers
6788475: Changing to Nimbus LAF and back doesn't reset look and feel of JTable completely

Reviewed-by: tr, abhiscxk, honkar, jdv

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 640 new commits pushed to the master branch:

  • 8eed7de: 8304146: Refactor VisibleMemberTable (LocalMemberTable)
  • a487a27: 8303150: DCmd framework unnecessarily creates a DCmd instance on registration
  • 2e987d7: 8304360: Test to ensure ConstantDescs fields work
  • 2f23c80: 8304225: Remove javax/script/Test7.java from ProblemList
  • 96889bf: 8191565: Last-ditch Full GC should also move humongous objects
  • f629152: 8304055: G1: Remove OldGCAllocRegion::release
  • b5108b4: 8303749: Serial: Use more strict card table API
  • 7dbab81: 8304161: Add TypeKind.from to derive from TypeDescriptor.OfField
  • d4eb395: 8303684: Lift upcall sharing mechanism to AbstractLinker (mainline)
  • dfc7214: 8304283: Modernize the switch statements in jdk.internal.foreign
  • ... and 630 more: https://git.openjdk.org/jdk/compare/d269ebbad2286b57802a075091b0cc32110dfcc7...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 6, 2023
Copy link
Member

@aivanov-jdk aivanov-jdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should save the old values and always set the new value. In uninstall, you should restore the previous values.

For what it's worth, each Look and Feel must do it, otherwise there are other combinations of L&Fs where the property isn't restored.

The default value for showHorizontalLines and showVerticalLines is false. So it's changed by a L&F and is not restored.

@prsadhuk
Copy link
Contributor Author

/issue add JDK-6788475

@openjdk
Copy link

openjdk bot commented Mar 17, 2023

@prsadhuk
Adding additional issue to issue list: 6788475: Changing to Nimbus LAF and back doesn't reset look and feel of JTable completely.

@prsadhuk
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 17, 2023

Going to push as commit 6b42275.
Since your change was applied there have been 640 commits pushed to the master branch:

  • 8eed7de: 8304146: Refactor VisibleMemberTable (LocalMemberTable)
  • a487a27: 8303150: DCmd framework unnecessarily creates a DCmd instance on registration
  • 2e987d7: 8304360: Test to ensure ConstantDescs fields work
  • 2f23c80: 8304225: Remove javax/script/Test7.java from ProblemList
  • 96889bf: 8191565: Last-ditch Full GC should also move humongous objects
  • f629152: 8304055: G1: Remove OldGCAllocRegion::release
  • b5108b4: 8303749: Serial: Use more strict card table API
  • 7dbab81: 8304161: Add TypeKind.from to derive from TypeDescriptor.OfField
  • d4eb395: 8303684: Lift upcall sharing mechanism to AbstractLinker (mainline)
  • dfc7214: 8304283: Modernize the switch statements in jdk.internal.foreign
  • ... and 630 more: https://git.openjdk.org/jdk/compare/d269ebbad2286b57802a075091b0cc32110dfcc7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 17, 2023
@openjdk openjdk bot closed this Mar 17, 2023
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Mar 17, 2023
@openjdk openjdk bot removed the rfr Pull request is ready for review label Mar 17, 2023
@openjdk
Copy link

openjdk bot commented Mar 17, 2023

@prsadhuk Pushed as commit 6b42275.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@prsadhuk prsadhuk deleted the JDK-7154070 branch March 17, 2023 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

6 participants