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 79401 - Netbeans 6.0 DEV jGoodes look and feel issue
Summary: Netbeans 6.0 DEV jGoodes look and feel issue
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: David Simonek
URL:
Keywords: L&F
Depends on:
Blocks:
 
Reported: 2006-06-29 04:40 UTC by waynezhang
Modified: 2008-12-22 10:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screen shot (95.82 KB, application/octet-stream)
2006-06-29 05:16 UTC, waynezhang
Details
With flag nb.forceui=xp set, JGoodies Lnf works just fine! (132.84 KB, image/gif)
2006-08-03 04:27 UTC, waynezhang
Details
Fixed source code (16.40 KB, application/octet-stream)
2006-08-09 03:32 UTC, waynezhang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description waynezhang 2006-06-29 04:40:06 UTC
When use jGoodies (www.jgoodies.com) windows look and feel in looks-2.0.4.jar on
Windows XP, tabs and file folder seems be Windows 2000 look and feel. Other
compenents are OK.

ENV:
NetBeans IDE Dev (Build 200605101800)
1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-b03
Windows XP version 5.1 running on x86
en_AU (nb); Cp1252

Look and Feel:
com.jgoodies.looks.windows.WindowsLookAndFeel   (version 2.0.4)
Comment 1 waynezhang 2006-06-29 05:16:55 UTC
Created attachment 31496 [details]
screen shot
Comment 2 Jiri Kovalsky 2006-07-03 10:11:23 UTC
Can somebody please take a look at this Look&Feel problem ?
Comment 3 Jiri Kovalsky 2006-07-03 10:12:03 UTC
Assigning hopefully correct subcomponent.
Comment 4 David Simonek 2006-07-20 18:00:06 UTC
This is as designed, although it may seem odd.

The reason is that we are painting these tabs ourselves, because of various
limitations of standard Swing JTabbedPane tabs. We concentrate on drawing
"native" LFs perfectly and we have one generic tab look for other LFs, so
JGoodies tabs will look a bit differently. 
Comment 5 waynezhang 2006-07-28 05:08:48 UTC
This is a bug actually. Mr. Golovnin(@dev.java.net), may be the author of
JGoodies looks has give the detailed information about this bug. Would you
please fix it? JGoodies looks is really cool, it has menu shadow and many more
which is lack in Sun JDK/JRE, even in Mustang. The following is golovnin's
suggestion:

====
This is a bug (if any) in NetBeans Core (to be exactly in the method
org.netbeans.swing.plaf.util.UIUtil#isWindowsLF()). Please file a bug report
against NetBeans. As workaround you can force NetBeans to use a WindowsXP
customizations by defining the following system property: -Dnb.forceui=XP
Be aware, this property is not documented and may be changed or removed at any time!
Comment 6 waynezhang 2006-07-28 05:09:05 UTC
This is a bug actually. Mr. Golovnin(@dev.java.net), may be the author of
JGoodies looks has give the detailed information about this bug. Would you
please fix it? JGoodies looks is really cool, it has menu shadow and many more
which is lack in Sun JDK/JRE, even in Mustang. The following is golovnin's
suggestion:

====
This is a bug (if any) in NetBeans Core (to be exactly in the method
org.netbeans.swing.plaf.util.UIUtil#isWindowsLF()). Please file a bug report
against NetBeans. As workaround you can force NetBeans to use a WindowsXP
customizations by defining the following system property: -Dnb.forceui=XP
Be aware, this property is not documented and may be changed or removed at any time!
Comment 7 David Simonek 2006-07-28 11:54:47 UTC
We simply don't support JGoodies LF directly as we don't have resources to do
so, so we are using default painting of our tabs, which is similar to Win2000
LF, because Win2000 LF is simple and that way it won't clash with other LFs that
much.

Of course it would be nice if we were able to paint our tabs exactly in JGoodies
style when JGoodies LF is set, but we can't do this because of resources and
priorities. Sorry, but no way to have this fixed unless somebody from the
community writes support for JGoodies LF into our core/swing/tabcontrol module.
Comment 8 waynezhang 2006-07-31 04:36:22 UTC
Hi, 
It's not so critical since Golovin's solution works, and I am happy with that.
But as Golovin's sugguestion, this issue is SUCH EASY can be fixed by just
cheating netbeans that JGoodies Windows is Windows by the following change in
org.netbeans.swing.plaf.util.UIUtil.java:

    public static boolean isWindowsLF () {
        if (Boolean.getBoolean("netbeans.winsys.forceclassic")) {
            return false;
        }
        String lfID = UIManager.getLookAndFeel().getID();

        // >>> Change the following line FROM
        return lfID.equals("Windows"); //NOI18N
        // TO
        return lfId.endsWith("Windows"); // NOI18N
    }

Because MOST components of JGoodies Windows is SAME as Windows (XP) look and
feel and it's unnecessary to write a set of tab controls.

Don't you think so?

Regards,
Wayne
Comment 9 waynezhang 2006-08-03 04:27:25 UTC
Created attachment 32477 [details]
With flag nb.forceui=xp set, JGoodies Lnf works just fine!
Comment 10 David Simonek 2006-08-07 11:37:43 UTC
OK, now I understand what is expected from me and I modified isWindowsLF method
as suggested. Reporter, please verify that the fix works, thanks.

Checking in UIUtils.java;
/cvs/core/swing/plaf/src/org/netbeans/swing/plaf/util/UIUtils.java,v  <-- 
UIUtils.java
new revision: 1.8; previous revision: 1.7
Comment 11 waynezhang 2006-08-09 03:29:33 UTC
Hi Dismonek,
It should change other 2 line to fix this issue:

IN:
org.netbeans.swing.plaf.Startup.findCustoms()

Line 348:
### CHANGED FROM
                default :
                        result = new WindowsLFCustoms();

### TO
                default :
                    // #79401 check if it's XP style LnF, for example jGoodies
WindowsLookAndFeel
                    if (UIUtils.isXPLF()) {
                        result = new XPLFCustoms();
                    } else {
                        result = new WindowsLFCustoms();
                    }

I have build and test, it works in JGoodies, Windows (XP and Classic), Metal,
Motif, but I didn't test GTK (on Li(U)nux).

Sorry about that.

Regards,
Wayne
Comment 12 waynezhang 2006-08-09 03:32:52 UTC
Created attachment 32674 [details]
Fixed source code
Comment 13 David Simonek 2006-08-09 16:44:09 UTC
integrated into main trunk, I hope this is last related change :-)

/cvs/core/swing/plaf/src/org/netbeans/swing/plaf/Startup.java,v  <--  Startup.java
new revision: 1.17; previous revision: 1.16
Comment 14 Petr Chytil 2008-09-30 10:36:31 UTC
closed