RFR: 8331214: Doc: update spec for SpinnerFactory classes [v2]
drmarmac
duke at openjdk.org
Mon May 6 21:32:07 UTC 2024
On Mon, 6 May 2024 16:27:52 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/SpinnerValueFactory.java line 420:
>>
>>> 418: * the minimum value to the maximum value (and vice versa). As a consequence of that, the number
>>> 419: * of steps required to wrap around to the same value is N+1, where N is the number of steps between
>>> 420: * {@link #min} (inclusive) and {@link #max} (inclusive).
>>
>> Suggestion: It might be helpful to show the equation:
>>
>>
>> val = (val + delta) % (max - min + 1)
>
> a good idea
agreed, I used "amountToStepBy" instead of "delta" here.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1450#discussion_r1591576774
More information about the openjfx-dev
mailing list