OtherTabFOW

Proposal

An implementation of the Tabbed interface based on JTabbedPane that can be used as a replacement for TabbedContainer in order to have out of the box support for third-party look and feels in NetBeans.

Motivation for the feature:

NetBeans IDE and Platform is based on Swing and this is one of it's distinguishing features. Still it can't benefit from this, because of some non-standard Swing components that make it hard to use third-party look & feels. This is equally annoying for users of the IDE who want to change the look of NetBeans as it is for NetBeans Platform users, who want to use third-party look & feels to distinguish their application from others.

It is possible to write UI Delegates for existing plugins, but this is a time-consuming process, and it's harder to do so than it could be. Kirill Grouchnikov the creator of the popular Substance look & feel that 31 out of 33 winners in the NetBEans Look & feel competition have used has discontinued his NetBeans support for this reason.

There has been a discussion about making it easier to write UI delegates with no result ( issue 67463, issue 66335).

One proposed solution was to create an optional replacement for TabbedContainer using JTabbedPane, which since JDK 1.6 has some features, that will make it easy to support this:

http://www.netbeans.org/issues/show_bug.cgi?id=150393

With the proposed solution users can apply any swing look & feel to NetBeans without the need of writing UI Delegeates. It will be much easier to change the look and feel of NetBeans IDE and NetBeans Platform applications.

Link to FIP issue:

http://www.netbeans.org/issues/show_bug.cgi?id=150393

Planned usecases to be supported:

Use case 1: NetBeans user wants to customize the look & feel of NetBeans.

To change the look & feel of an application with a third party look & feel you can use these parameters when starting netbeans:

--cp:p C:\looks-1.2.2.jar --laf com.jgoodies.plaf.plastic.PlasticXPLookAndFeel

Currently the tabs look very bad with third party look & feels. With this proposal implemented it would look much better. Here's an example for the napkin Look & Feel without the Changes: http://eppleton.sharedhost.de/blog/wp-content/uploads/2009/07/bild-12.png

And here's the same build with the proposed solution in it's current state: http://eppleton.sharedhost.de/blog/wp-content/uploads/2009/07/bild-11.png

The tabs look much better like this (or at least they look as intended by the creator of the look and feel).

Use case 2: Platform user wants to customize the look & feel of an Application based on NetBeans Platform.

The platform user would have to create a Library Wrapper Module with the plaf and then do something like this in the installer:

 try {
            // select the Look and Feel
            UIManager.setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel");
//             UIManager.setLookAndFeel("de.javasoft.plaf.synthetica.SyntheticaBlueMoonLookAndFeel");
//            UIManager.setLookAndFeel("net.sourceforge.napkinlaf.NapkinLookAndFeel");
//            UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessLookAndFeel");
//            UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
        } catch (ClassNotFoundException ex) {
            Exceptions.printStackTrace(ex);
        } catch (InstantiationException ex) {
            Exceptions.printStackTrace(ex);
        } catch (IllegalAccessException ex) {
            Exceptions.printStackTrace(ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Exceptions.printStackTrace(ex);
        }  


No need to write and install UIDelegates...

Details of UI changes:

TBD

List of code changes:

Proposed API changes:

Kenai project

For building and running this, the required API changes need to be available as described in:

Issue 169099, Issue 150393

(Proof of concept available as a patch here)

Review

( Section for discussion about the proposal if comments in FIP issue need elaboration )

Functional documentation

( Section with final summary of the integrated code changes )

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo