Open GoogleCodeExporter opened 9 years ago
Hi Mike,
I was thinking about this issue.
There are next solutions:
1) use the way you described, but it will work so slowly in case there are thousands/millions wheel elements.
2) calculate the width each time elements are changed, to be as long as the longest visible item. In this case the wheel will be "dancing"
3) use the same width for all wheel items
4) specify the wheel width manually
I think, the 1st and 2nd ways are not good.
If you know the wheel contains not too much items the 1st way is acceptable.
This functionality can be moved to separated method that can be overridden by
subclasses.
Original comment by yuri.kan...@gmail.com
on 31 Mar 2011 at 11:22
Hi,
I would suggest option 2 where the size can only grow + an option to manually
force-set the initial width (option 3).
Original comment by oferr.em...@gmail.com
on 1 Apr 2011 at 6:37
This bug can be seen even in the Demo Wheel application:
Open the "time 2" example and scroll the hour wheel all the way down.
Original comment by andreas....@gmail.com
on 13 Sep 2011 at 12:46
Any suggestions for getting around this? I am hoping to use the Wheel in a
similar fashion as Time2-example. How can I force each item to be visible,
somehow forcing the hour wheel (in my case 0->23) to the width of the "23"-item?
Original comment by asmo.soi...@gmail.com
on 29 Nov 2011 at 5:03
Just found one simple workaround: just set the width of the hours-item
manually, instead of "wrap_content".
Original comment by asmo.soi...@gmail.com
on 29 Nov 2011 at 5:06
Yuri, both JList and JComboBox in Swing solved this problem by letting you
define a "prototype" value that is used to compute the cell width: the
framework doesn't know what would be good width but the programmer often does!
That would be a special case of your option 3). That works very well for us
Swing programmers; no need to complicate things.
Original comment by lefev...@gmail.com
on 5 Feb 2012 at 2:58
Original issue reported on code.google.com by
mike.hi...@gmail.com
on 25 Mar 2011 at 7:11