Integrated: 6817009: Action.SELECTED_KEY not toggled when using key binding

Prasanta Sadhukhan psadhukhan at openjdk.org
Thu Mar 23 07:53:58 UTC 2023


On Fri, 27 Jan 2023 10:26:10 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: e2cfcfbf
Author:    Prasanta Sadhukhan <psadhukhan at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e2cfcfbfa90017b1b4ecbf6fb2f0f782c88456a3
Stats:     139 lines in 2 files changed: 139 ins; 0 del; 0 mod

6817009: Action.SELECTED_KEY not toggled when using key binding

Reviewed-by: tr, jdv

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

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



More information about the client-libs-dev mailing list