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.
Summary: | OutlineView forgets to set selection colors before FocusListener is invoked the first time | ||
---|---|---|---|
Product: | platform | Reporter: | ebakke |
Component: | Outline&TreeTable | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | NETFIX, PATCH_AVAILABLE |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | PC | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
OutlineView appears focused even though focus is in the search bar
Suggested fix (two-line change to OutlineView.java) Simple example platform application that exhibits the bug |
Created attachment 142031 [details]
Suggested fix (two-line change to OutlineView.java)
Created attachment 142032 [details]
Simple example platform application that exhibits the bug
Note that while I've only tested this on MacOS, the bug should be present on Windows as well.
The patch works fine. Thank you very much, good job. Patch was integrated as http://hg.netbeans.org/core-main/rev/7f1a9e50b8df. Integrated into 'main-silver', will be available in build *201402070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/7f1a9e50b8df User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #238197: OutlineView forgets to set selection colors before FocusListener is invoked the first time |
Created attachment 142030 [details] OutlineView appears focused even though focus is in the search bar Here's another OutlineView bug--this one should be easy to fix. If the OutlineView shows any selected nodes before receiving focus for the first time, the background color of the selected nodes is wrong--it looks as if the OutlineView is focused even though it is not. See the attached screenshot. I had a look at the source code for OutlineView, and the reason for the bug is that the following two lines are only executed when a focus event is received, but not when the component is first created: outline.setSelectionBackground(SheetCell.getNoFocusSelectionBackground()); outline.setSelectionForeground(SheetCell.getNoFocusSelectionForeground()); The solution is to include these two lines in the OutlineView constructor along with the registering of the FocusListener.