Yeah, I like providing access to the Window better. Seems more general and still meets this use case.
-T On Sat, Jan 2, 2010 at 5:56 PM, Greg Brown <[email protected]> wrote: > Just thinking out loud...we could provide a ListButton.Skin method that > provides access to the list: > > public class ListButton { > public interface Skin { > public Component getListComponent(); > } > ... > } > > The method wouldn't return an actual ListView instance since that would > allow the caller to modify the list view's state directly, violating > encapsulation. However, it would allow the caller to register component > event listeners on the list. > > Alternatively, the method could be defined to return the Window that > contains the list, rather than the list itself (e.g. getListViewPopup()). > This might be cleaner (and more useful, since a caller could then listen on > window events such as windowOpened() and windowClosed()). > > G > > > On Jan 2, 2010, at 1:18 PM, Todd Volkert wrote: > > > Forwarding to the dev list - see message below. How might we allow > callers > > to get notified when the user presses keys once the list button's popup > is > > open? The popup isn't exposed directly -- it's managed by the skin... > > > > -T > > > > ---------- Forwarded message ---------- > > From: Todd Volkert <[email protected]> > > Date: Sat, Jan 2, 2010 at 12:52 PM > > Subject: Re: ListButton Lookup > > To: [email protected] > > > > > > Hi Marcos, > > > > No, the ListButton component doesn't automatically jump to a particular > list > > item upon the user typing because the list data is of type List<Object>. > > You can implement this manually by registering a ComponentKeyListener on > > the component and calling listButton.setSelectedIndex() based on what the > > user typed. > > > > However, you won't have the option of registering that listener on the > list > > button's popup... let me ask this of the developer list and see what > they > > say about how we could address this in a future release. > > > > Cheers, > > -T > > > > > > On Sat, Jan 2, 2010 at 12:08 PM, Marcos Jordão <[email protected] > >wrote: > > > >> Boa tarde. > >> > >> The ListButton component haven't lookup on typing? > >> How to do it? > >> > >> Thanks. > >> > >> *Marcos Antonio Campos Jordão''* > >> > >
