Hi Jeanette,

The doc never assumes amountPerStep = 1. I am quoting it here -
“The wrapAround property is used to specify whether the value factory should be 
circular. For example, should an integer-based value model increment from the 
maximum value back to the minimum value (and vice versa).”

The word “circular” clarifies that once we exceed maximum value, we should 
start from minimum.
I think, the doc is OK in it’s current form, but implementation needs to be 
corrected.

Regards,
Ajit  


> On 14-Apr-2020, at 8:01 PM, Jeanette Winzenburg <faste...@swingempire.de> 
> wrote:
> 
> 
> Hi Ajit,
> 
> thought the doc was simply bad (in specifying the behavior for amountPerStep 
> = 1 and not thinking of larger amounts) - my expection is a calculated wrap, 
> that is the target as you suggest via modulo the difference from current 
> value. Don't know if anybody took the doc literally ..
> 
> -- Jeanette
> 
> Zitat von Ajit Ghaisas <ajit.ghai...@oracle.com>:
> 
>> Hi,
>> 
>>   Once I fix JDK-8193286, I would like to take up JDK-8242553 
>> (IntegerSpinner does not wrap around values correctly if amountToStepBy is 
>> larger than total numbers between Max and Min)
>> 
>>   The current implementation is not as per what is documented.
>>   Refer : 
>> https://openjfx.io/javadoc/14/javafx.controls/javafx/scene/control/SpinnerValueFactory.html#wrapAroundProperty
>> 
>>   I propose to fix the current buggy behavior of IntegerSpinner.
>>   Although it is a corner case, I would like to know if anybody relies on 
>> this buggy behavior?
>> 
>> Regards,
>> Ajit
> 
> 
> 

Reply via email to