RFR: 5021949: JSplitPane setEnabled(false) shouldn't be partially functional [v3]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Wed Jun 26 08:46:12 UTC 2024
On Tue, 18 Jun 2024 12:17:41 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Omit gtk
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java line 376:
>
>> 374: leftButton.setEnabled(enabled);
>> 375: }
>> 376: }
>
> Is it possible to override `isEnabled` in `rightButton` and `leftButton` so that it returns the state of `JSplitPane`?
>
> Alternatively, the buttons could install a `PropertyChangeListener` for `"enabled"` property and align their state to the host split pane.
Right now, the buttons are always enabled and rendered when isOneTouchExpandable is enabled without any scope to disable...We need this code anyway to set/reset buttons state..I guess on top of this code, we can add isEnabled if it is needed but for this issue, isEnabled is not needed..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19695#discussion_r1654393332
More information about the client-libs-dev
mailing list