Re: event at xulinput (map)

Gerald Bauer <[email protected]> Fri, 27 Feb 2004 01:31:00 -0800 (PST)
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
Hello Steffen,

> how can I create an event at  a map of  xulinput
> element to select an item?
> a listener is at the every form, and a single
> listener at the element on 
> the form?
> 
> Iterator it = _removeForm.getInputControls();
>       while(it.hasNext())
>       {
>         XulInput input = (XulInput)it.next();
>         JComponent comp =
> (JComponent)input.getJComponent();
>         if (JComboBox instanceof comp)
>         .....?
>       }

   I suggest using a "Swing-style" lookup using the
widget id and walking the widget tree to get a handle
onto the Swing JComponent instead of using XulForms
and XulInput.getJComponent(). Please search the
mailarchive for details and code samples.

   Once you have a handle onto the Swing widget
(JComponent) you can attach whatever event listener
you like.

   Let me know if this makes sense to you.

   - Gerald


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click