RFR: 6817009: Action.SELECTED_KEY not toggled when using key binding [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Thu Mar 23 07:41:11 UTC 2023


> When the Action.SELECTED_KEY property action is assigned to ToggleButton and an accelerator key binding is mapped to the action, then pressing the accelerator key binding does not toggle the toggle button.
> This is because SwingUtilities.notifyAction does not fire itemStateChanged event for such action related to SELECTED_KEY.
> Fix is to get the Action.SELECTED_KEY command/action and fire itemStateChanged Event via JToggleButton.setSelected() call to notify propertyChange listener of the toggled property.

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  Review comment

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/12253/files
  - new: https://git.openjdk.org/jdk/pull/12253/files/4219c5c7..875d85e5

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=12253&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12253&range=00-01

  Stats: 6 lines in 2 files changed: 1 ins; 1 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/12253.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/12253/head:pull/12253

PR: https://git.openjdk.org/jdk/pull/12253



More information about the client-libs-dev mailing list