spinner component

Alexandre (Shura) Iline alexandre.iline at oracle.com
Tue Dec 27 07:49:25 PST 2011


On 12/27/2011 01:51 AM, Jonathan Giles wrote:
> @Shura:
>
> This was discussed earlier in the thread. If you joined the mailing list
> only recently you may have missed this discussion. Essentially, the
> thinking is that there is a form of 'data provider' that encapsulates
> the functionality to step between values, and that can also convert
> String input into an Object that can be understood and subsequently
> stepped from.
>
> So yes, there is likely to be a form of wrapping. Whether this is done
> by the developer explicitly setting an '(Enumeration | List | Integer |
> Float | Boolean | etc)DataProvider' into a Spinner.setDataProvider(..)
> method, or whether we have EnumerationSpinner, etc, hasn't been
> discussed. I'd lean towards the former however, but I'm only saying that
> as it is the way we tend to provide similar functionality (e.g.
> pre-built cell factories, pre-build string converters, etc).

When should I expect the spec to be updated with this?

>
>  From an automated test point of view, you can initialise the spinner
> with a value, say "February" by calling spinner.setValue("February")

This is the most basic test, yes.

>(or
> by having the string 'typed' in), then either call spinner.increment()
> or click on the 'increment' button, and assert that the value returned
> by spinner.getValue() is "March".

That is what most of the tests will do - play with the button and verify 
the value displayed.

Similar functionality needed for testing apps which use spinner - to be 
able to scroll (by mouse clicks) to a desired value.

For that I need to know what value to expect and which way to scroll - 
hence my question.

Shura.

>
> At least, this is my thinking on general API. Tom is the current owner
> of it and I have not yet taken a look deeply at it. I hope to do that soon.
>
> -- Jonathan
>
> On Monday, 26 December 2011 9:54:58 p.m., Alexandre (Shura) Iline wrote:
>> Hi.
>>
>> What I am missing from the spec is how "other values, such as text or
>> images" are iterated through.
>>
>> Will there be a comparator interface of some sort or will the data
>> need to be wrapped into some kind of container or what?
>>
>> This is where the question is coming from:
>>
>> If an automated test needs to scroll ("spin" ?) to a particular value,
>> how does it figure out which way to scroll and what value to expect
>> next after scrolling one time?
>>
>> Shura.
>>


More information about the openjfx-dev mailing list