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 83943 - [Vista LnF] icons in java project are not taken from Vista LnF
Summary: [Vista LnF] icons in java project are not taken from Vista LnF
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: L&F
Depends on: 121010
Blocks:
  Show dependency tree
 
Reported: 2006-08-31 15:23 UTC by Tomas Danek
Modified: 2008-12-22 13:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (21.44 KB, image/jpeg)
2006-08-31 15:25 UTC, Tomas Danek
Details
PATCH (8.15 KB, application/octet-stream)
2007-11-01 08:34 UTC, _ theanuradha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2006-08-31 15:23:41 UTC
Windows Vista LnF

NetBeans IDE Dev (Build 200608291800)
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b97
Windows Vista version 6.0 running on x86
cs_CZ (nb); Cp1250

Icons in java project are not taken from LnF. cf. screenshot.
Comment 1 Tomas Danek 2006-08-31 15:25:29 UTC
Created attachment 33478 [details]
screenshot
Comment 2 Tomas Zezula 2007-10-31 15:03:05 UTC
Checking in org/netbeans/modules/java/j2seproject/ui/LibrariesNode.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/LibrariesNode.java,v  <--  LibrariesNode.java
new revision: 1.24; previous revision: 1.23
done

Checking in org/netbeans/spi/java/project/support/ui/PackageRootNode.java;
/cvs/java/project/src/org/netbeans/spi/java/project/support/ui/PackageRootNode.java,v  <--  PackageRootNode.java
new revision: 1.28; previous revision: 1.27
done
Comment 3 _ theanuradha 2007-11-01 08:33:39 UTC
TreeRootNode.java missed for fix 

I have create patch and I have signed Contributor Agreement.

Please integrate the patch.
Comment 4 _ theanuradha 2007-11-01 08:34:18 UTC
Created attachment 52218 [details]
PATCH
Comment 5 Tomas Zezula 2007-11-01 09:14:15 UTC
I've forgot about the TreeRootNode, I will fix it. 
Comment 6 Tomas Zezula 2007-11-01 10:59:48 UTC
Checking in org/netbeans/spi/java/project/support/ui/TreeRootNode.java;
/cvs/java/project/src/org/netbeans/spi/java/project/support/ui/TreeRootNode.java,v  <--  TreeRootNode.java
new revision: 1.9; previous revision: 1.8
done
Comment 7 Jan Lahoda 2007-11-02 18:43:25 UTC
The changes in PackageRootNode and TreeRootNode caused issue #121010 (the error and VCS badges do not appear correctly
for the "root" nodes).
Comment 8 Jan Lahoda 2007-11-02 18:50:28 UTC
The changes in PackageRootNode and TreeRootNode caused issue #121010 (the error and VCS badges do not appear correctly
for the "root" nodes).
Comment 9 Jan Lahoda 2007-11-02 18:54:29 UTC
Sorry for the duplicated comment. I wanted to submit this:
BTW: I though that the RTN and PTN inherit the icon from the DataFolder's node (issue #120799), so if the icon from the
DF's node would be correct, no changes in java/project should be necessary. Am I mistaken?
Comment 10 Tomas Zezula 2007-11-02 19:00:53 UTC
When it provides good icon yes, but look on the attached screen shot on windows vista.
Comment 11 Tomas Zezula 2007-11-02 19:04:17 UTC
From the last Honza comments, it seems that the badging depends on the fact that the node returns icon of underlying node.
Right?
Comment 12 Jan Lahoda 2007-11-02 19:14:22 UTC
Well, the FolderNode (DF's node) does the badging, so reusing its icon provides the badging for free. However, it should
(I think) be possible to do the badging separately, by calling:
DataObject obj = getDataObject();
img = obj.getPrimaryFile().getFileSystem().getStatus().annotateIcon(img, type, obj.files());
(where img is the propose icon, copied from DF.FN.getIcon).

Normally, one would need to do some listening and call fireIconChanged() when necessary, so the icons are updated
correctly, but in this case this may be provided by the underlying nodes - needs to be tested.
Comment 13 Tomas Zezula 2007-11-02 19:22:43 UTC
Where are all the looks and other tries to make at least the view part extensible? The simplest fix is "posleme ho na
plicni". I will keep only the fix in Libraries node, revert changes to package root node & tree node node, reopen the
issue and assign it to core to provide good icon for DataFolder.
Comment 14 Tomas Zezula 2007-11-02 19:48:19 UTC
I've fixed the LibrariesNode (j2seproject). The PackageView needs to return the icon of underlaying data folder (the
only tested way how to preserve filesystem badges) => DataFolder should provide correct icon on Vista.
Comment 15 Tomas Zezula 2007-11-02 20:51:50 UTC
Seems to be already fixed in current build.