RFR: 8331214: Doc: update spec for SpinnerFactory classes

Andy Goryachev angorya at openjdk.org
Mon May 6 16:31:57 UTC 2024


On Mon, 6 May 2024 15:39:02 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> This PR updates the javadoc for the SpinnerFactory wrap-around behavior introduced in #1431.
>
> 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

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1450#discussion_r1591262735


More information about the openjfx-dev mailing list