RFR: 8364146: JList getScrollableUnitIncrement return 0
Prasanta Sadhukhan
psadhukhan at openjdk.org
Fri Aug 1 07:16:55 UTC 2025
On Fri, 1 Aug 2025 06:45:37 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> It seems JList.getScrollableUnitIncrement can sometime return 0 instead of positive number which is not specified in the javadoc which can lead to confusion. Clarified javadoc as to when it can return 0.
>
> src/java.desktop/share/classes/javax/swing/JList.java line 2512:
>
>> 2510: * @return the "unit" increment for scrolling in the specified direction;
>> 2511: * which is usually positive. But it can return 0
>> 2512: * if {@code visibleRect} points to that row
>
> should it be `the` or `that` ?
> Suggestion:
>
> * if {@code visibleRect} points to the row
>
>
> Requires a CSR too ?
it is "that" row being pointed to by visibleRect
and yes CSR is needed but I want to finalise the wordings first.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26500#discussion_r2247175728
More information about the client-libs-dev
mailing list