This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 215688

Summary: Allow customization of whether quick search field should dismiss on focus lost, or not.
Product: platform Reporter: Martin Entlicher <mentlicher>
Component: -- Other --Assignee: Martin Entlicher <mentlicher>
Status: RESOLVED WONTFIX    
Severity: normal CC: mentlicher, theofanis
Priority: P2 Keywords: API, API_REVIEW_FAST
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: The proposed patch

Description Martin Entlicher 2012-07-18 13:52:24 UTC
The current implementation of org.openide.awt.QuickSearch dismiss the search field, after it loses focus. It's removed from the UI, when the user changes the context and selects a different component.
However, this automatic behavior is not practical for some usages (e.g. options dialog). Therefore, we should add a way how to turn this behavior off.
Comment 1 Martin Entlicher 2012-07-18 14:33:50 UTC
Created attachment 122162 [details]
The proposed patch
Comment 2 Martin Entlicher 2012-07-18 14:36:24 UTC
Please review the simple API change...
Comment 3 Theofanis Oikonomou 2012-07-18 15:26:49 UTC
Seems good to me. In the case of a focusLost event, if the focus lost is temporary or the dismissOnFocusLost flag is set to false then the focus should return to the search text-field. So please add one line before the return statement: searchTextField.requestFocus();

If this is added it works as expected, at least for the options case :)
Comment 4 Martin Entlicher 2012-07-31 14:40:58 UTC
I'm abandoning this API change, since there's a similar issue #215833, which solves the problem in a more suitable way for use in Options dialog.