United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6661618 Nimbus L&F: JToolBar - Issues
JDK-6661618 : Nimbus L&F: JToolBar - Issues

Details
Type:
Bug
Submit Date:
2008-02-11
Status:
Closed
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2008-03-05
Component:
client-libs
OS:
windows_vista,generic,windows_xp
Sub-Component:
javax.swing
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u5,6u10
Fixed Versions:
6u10 (b13)

Related Reports
Duplicate:
Duplicate:
Relates:

Sub Tasks

Description
Nimbus L&F: JToolBar - Separator line is short when position left/right

1. JToolBar - Separator line is short when position left/right. Refer JToolbar-Left
2. JToolBar - Outline line is missing when place at the bottom/right. Compare the JToolBar-Top and JToolBar-Bottom.

Screen Shot got using Laffy.
3. Inserting Box.createHorizontalGlue() to JTollBar on Nimbus doesn't work
4. Spinner & Editable JCombobox touches the border of the JToolbar

                                    

Comments
EVALUATION

1. JToolBar - Separator line is short when position left/right

This was fixed by adding a custom painter for toolbar separators. The problem is that our designer tool doesn't allow for tiled painting yet, so we needed a custom painter to do this.

2. JToolBar - Outline line is missing when place at the bottom/right

And the line is in the wrong place when positioned left. To fix this bug I had to add 4 custom states for JToolBar to dectect which side of the screen it is on, so that I could then render the border on the correct side of the toolbar.

3. Inserting Box.createHorizontalGlue() to JTollBar on Nimbus doesn't work

This is not strictly a bug, but an RFE. We decided to support this feature. JToolBar, by default, uses a BoxLayout as its layout manager. Synth uses a custom layout manager. In some ways we prefer the synth one (by default, it looks better). However, in many ways we'd like Nimbus to be a drop-in replacement for Metal.

In this case we decided that since by default it looks hideous in Metal, that we'd rather that new apps by default look good in Nimbus. Therefore, we compromised. While we are not going to make the Synth layout manager the same as that used in Metal and the other LAFs, we are going to support "glue" created via Box.createHorizontalGlue(). This support was added directly to the Synth layout manager for toolbars.

4. Spinner & Editable JCombobox touches the border of the JToolbar

Simply added some insets to the toolbar. I had to mess with a few fiddly bits in NimbusIcon to get the icon to paint properly with the insets and border, but it should all now paint properly and look decent.
                                     
2008-02-15



Hardware and Software, Engineered to Work Together