christmo / macwidgets

Automatically exported from code.google.com/p/macwidgets
0 stars 0 forks source link

HudComboBoxUI blowing away maximum row count? #60

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. construct large combox box menu
2. setMaximumRowCount (N)
3. setUI (new HudComboBoxUI ( )) on that menu

What is the expected output? What do you see instead?

 I have a combo box menu which lists 80+ possible map projection choices.
 The default JComboBox behavior is to display 8 menu items, plus scroller, if
 there are more than 8 menu items. So normally I call setMaximumRowCount(24)
 to get a reasonable number of visible items when one clicks on the combo box.

 Applying HudComboBoxUI to a JComboBox such as this seems to blow away
 the max row count. Or perhaps I should say, the renderer ends up ignoring
 the row count value, whether it's the default or manually set. Consequently,
 the combo box tries to display _all_ of the menu items.

 See attached image for example.

What version of the product are you using? On what operating system?

 0.9.4 using Java 1.5 on Mac OS X 10.5.6

Original issue reported on code.google.com by rbs10025@gmail.com on 18 Feb 2009 at 1:51

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by kenneth....@gmail.com on 18 Feb 2009 at 1:47

GoogleCodeExporter commented 8 years ago
Ken, Although you've recently updated the HudComboBoxUI and related 
EPComboPopup, there is still a problem 
in that they don't deal well with a combo popup which has too many items to fit 
the screen vertically. The 
attached two files are hacked versions that make the necessary changes. Really 
it's just EPComboPopup that 
needs the changes; the other is just a slightly modified HudComboBoxUI that can 
be installed on a combo box to 
visually test the results.

Original comment by rbs10025@gmail.com on 15 Sep 2009 at 10:38

Attachments:

GoogleCodeExporter commented 8 years ago
I'll try and get this integrated soon -- it looks like you've done most of the 
work for me, which I appreciate!

Original comment by kenneth....@gmail.com on 15 Sep 2009 at 10:44

GoogleCodeExporter commented 8 years ago
The big question may be how to handle visual feedback when the user moves the 
mouse over one of the scroll 
arrows I've added to the combo popup. I opted to make the arrows blink, but 
that wasn't based on any example 
in an app. I just couldn't find an example with a cursory look around.

The thing that drove me to distraction was having to figure out that the combo 
popup needed to be marked 
completely between uses if its size and position did not change, and to force a 
repaint. Otherwise, it seemed to 
be pulling a cached version of its earlier appearance out of the ether.

Original comment by rbs10025@gmail.com on 16 Sep 2009 at 3:15

GoogleCodeExporter commented 8 years ago
Marked complete _dirty_ I meant to say.

Original comment by rbs10025@gmail.com on 16 Sep 2009 at 3:25