How to catch lost focus for popup in DateComboBox?

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

How to catch lost focus for popup in DateComboBox?

Postby vkravets » Tue Aug 11, 2009 12:19 am

Hi, everybody

I need to catch event when the datetime popup window lost the focus and do the same if the ok button was clicked in popup. How I can do this?

BTW how to catch also change date in text field of combobox?

Thanks,
Vladimir
vkravets
 
Posts: 1
Joined: Tue Aug 11, 2009 12:12 am

Re: How to catch lost focus for popup in DateComboBox?

Postby JIDE Support » Tue Aug 11, 2009 6:23 am

Please try the following code to catch the popup window cancellation event.
Code: Select all
        DateComboBox dateComboBox = new DateComboBox() {
            @Override
            protected JidePopup createPopupWindow() {
                JidePopup jidePopup = super.createPopupWindow();
                jidePopup.addPopupMenuListener(new PopupMenuListener() {
                    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {

                    }

                    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
                        System.out.println("To invisible");
                    }

                    public void popupMenuCanceled(PopupMenuEvent e) {
                        System.out.println("Cancelled");
                    }
                });
                return jidePopup;
            }
        };

Please try listen to the property change of the ComboBox#PROPERTY_SELECTED_ITEM to catch any change from either text field or mouse clicking.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: Google [Bot] and 81 guests