> > I've run into a situation where occasionally I have thousands of possible > > options supplied to a SuggestionPopup. As soon as I make the > > SuggestionPopup visible, the EDT sometimes locks up for more the 600ms. > ... > > Does anyone have any suggested workarounds / solutions? > > Have you tried setting an explicit preferred or maximum width on the popup > itself? > How would I go about doing that?
See http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html: setPreferredWidth(), setPreferredHeight(), setPreferredSize() (preferred size) setMinimumWidth(), setMaximumWidth(), setWidthLimits() (width constraints) setMinimumHeight(), setMaximumHeight(), setHeightLimits() (height constraints) setWidth(), setHeight(), setSize() (actual size; don't use this unless you are writing a layout manager or performing layout manually) > > In the meantime, I'll have to resort to displaying suggestions only once a > > sufficient number have been filtered out. > > From a user interaction standpoint, that might be a better alternative > anyways. A typical user is probably not going to have the patience to scroll > through thousands of suggestions. :-) > Fair point, though in terms of consistency, it might be nice to indicate to > the user that each of his/her actions (keystrokes in this case) has > corresponding results. You might cap the size of the list to some smaller value but append an ellipsis to the end of the list to indicate that more results were actually returned.
