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 - Allow customization of whether quick search field should dismiss on focus lost, or not.
Summary: Allow customization of whether quick search field should dismiss on focus los...
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2012-07-18 13:52 UTC by Martin Entlicher
Modified: 2012-07-31 14:40 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
The proposed patch (3.92 KB, patch)
2012-07-18 14:33 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.