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 238079 - OutlineView cell renderers drawn improperly when row selected (Aqua L&F)
Summary: OutlineView cell renderers drawn improperly when row selected (Aqua L&F)
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 7.4
Hardware: Macintosh Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Martin Entlicher
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2013-11-07 06:37 UTC by ebakke
Modified: 2015-03-14 02:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of an OutlineView exhibiting the bug (88.05 KB, image/png)
2013-11-07 06:37 UTC, ebakke
Details
Minimal example platform application exhibiting OutlineView rendering bug on MacOS (24.77 KB, application/octet-stream)
2013-11-08 21:30 UTC, ebakke
Details
Screenshot of attached minimal application exhibiting the bug (87.42 KB, image/png)
2013-11-08 21:37 UTC, ebakke
Details
Proposed Patch (1.27 KB, patch)
2014-01-28 15:14 UTC, Jaroslav Havlin
Details | Diff
Minimal example application, with POM versions bumped to compile on RELEASE801 (no other changes) (62.03 KB, application/zip)
2014-09-17 15:58 UTC, ebakke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ebakke 2013-11-07 06:37:31 UTC
Created attachment 141929 [details]
Screenshot of an OutlineView exhibiting the bug

See the attached image. I have an OutlineView which displays a tree of Nodes with a couple of property columns added using OutlineView.addPropertyColumn(). When any row is selected in the OutlineView, all the property value renderers are painted with a weird black background. In the example, I am using a standard boolean cell renderer, a custom dropdown renderer, and a standard string renderer. If you look closely, there is not only a black background, but also a change in color of the text in the string-based cell renderers (the text is supposed to be black on gray, but is light blue on black instead).

On my current Java version (see below), the bug happens entirely consistently. The bug does not appear on Windows, nor on the Nimbus L&F on MacOS, so it seems specific to the Aqua L&F. I have not seen this exact bug in earlier Java versions (I ran an earlier patch release of 1.7 until some weeks ago), although every now and then, after deleting a node, the same visual bug would happen on a single row even in earlier versions.

The platform app exhibiting this behavior was using the NetBeans RELEASE74 version of the OutlineView, but switching down to RELEASE72 did not make a difference.

I tried explicitly doing a repaint() on the OutlineView after selection, but this did not make any difference. Note that as soon as the OutlineView loses focus, the black backgrounds go away, and as soon as the OutlineView gains focus again, the black backgrounds reappear.

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.9 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/ebakke/Library/Application Support/NetBeans/7.4
Cache directory: /Users/ebakke/Library/Caches/NetBeans/7.4
Comment 1 ebakke 2013-11-08 21:30:45 UTC
Created attachment 142015 [details]
Minimal example platform application exhibiting OutlineView rendering bug on MacOS

Adding a sample NetBeans Platform application that opens a TopComponent with an OutlineView exhibiting the bug described in this report.
Comment 2 ebakke 2013-11-08 21:37:05 UTC
Created attachment 142017 [details]
Screenshot of attached minimal application exhibiting the bug
Comment 3 ebakke 2013-11-16 07:12:43 UTC
I just downgraded to Java 1.7.0_25, and the bug is still present there.
Comment 4 ebakke 2013-11-16 08:16:42 UTC
OK, some further investigation reveals that this bug was actually introduced in the transition from RELEASE731 to RELEASE74. Changing RELEASE74 to RELEASE731 in the attached minimal example application does indeed remove the bug.

(My earlier comment about the bug being present in RELEASE72 turned out to be wrong, so please disregard it. Sorry about my confusion.)

So this looks like a recently introduced NetBeans bug, not a JDK-related one.
Comment 5 ebakke 2013-11-26 17:38:40 UTC
I just upgraded to JDK 8 and can confirm that the bug is still present there. It seems to be a NetBeans Platform problem.

(Java Version: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b59.)
Comment 6 Jaroslav Havlin 2014-01-24 15:24:50 UTC
> So this looks like a recently introduced NetBeans bug, not a JDK-related one.
Thank you very much for the info and for the sample application.

The bug was introduced in changeset core-main #d13de90cb854 (bug 233210).
Comment 7 Jaroslav Havlin 2014-01-24 16:08:50 UTC
Default cell renderer has black background:
defaultRendererComponent.getBackground() = (com.apple.laf.AquaImageFactory$SystemColorProxy) com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0]
Comment 8 Jaroslav Havlin 2014-01-28 15:14:32 UTC
Created attachment 144475 [details]
Proposed Patch
Comment 9 ebakke 2014-01-28 16:18:48 UTC
Thanks for fixing this! My OutlineView-based navigator window will once more look beautiful... :-)
Comment 10 Jaroslav Havlin 2014-02-06 06:47:54 UTC
Patch applied as http://hg.netbeans.org/core-main/rev/7905b13625af.
Thank you, Martin, for reviewing.
Comment 11 Quality Engineering 2014-02-07 02:38:13 UTC
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/7905b13625af
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #238079: OutlineView cell renderers drawn improperly when row selected (Aqua L&F)
Comment 12 ebakke 2014-09-17 15:54:29 UTC
I just upgraded my platform application from RELEASE80 to RELEASE801, and this exact bug, which was previously fixed in 8.0, reappeared. The minimal example platform application that I attached earlier still triggers the bug when netbeans.version is changed from RELEASE74 to RELEASE801 in pom.xml.

Did the patch get lost somewhere?
Comment 13 ebakke 2014-09-17 15:58:55 UTC
Created attachment 149310 [details]
Minimal example application, with POM versions bumped to compile on RELEASE801 (no other changes)

I've bumped the version of the minimal example exhibiting the bug so that it will build with RELEASE801. I've made no other changes. This example application shows the reappearance of the bug in RELEASE801. If netbeans.version is set back to RELEASE80 in the top-level pom.xml, the bug will disappear (it was first observed in RELEASE74, then fixed in RELEASE80, then reappeared in RELEASE801).
Comment 14 Jaroslav Havlin 2014-09-18 08:54:52 UTC
> Did the patch get lost somewhere?
Version 8.0.1 still contains the patch.

Martin, can you please check the reopened bug? Any ideas why the problem could reappeared?
Comment 15 kajos 2015-03-14 02:33:55 UTC
I have noticed that in RELEASE801 there are two new lines in

DefaultOutlineCellRenderer.getTableCellRendererComponent

   setForeground(null);
   setBackground(null);

Could this prevent previous patch from working?