JDK-6452493 : Regression: JToolBar's separator is wrongly rendered using GTK L&F on Linux and Solaris
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: generic
  • Submitted: 2006-07-25
  • Updated: 2011-03-09
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u1Fixed 7 b03Fixed
Related Reports
Relates :  
Description
JToolBar's separator is wrongly rendered using GTK L&F on Linux and Solaris. When a JToolBar is docked in a horizontal position, the separator is rendered as if in a vertical position. Using Solaris10 implicit GTK L&F the separator is also wrongly positioned on the top of the JToolBar instead of being rendered in the middle of the toolbar. See attached images for detailed info.

Steps to reproduce:
Run any java program with JToolBar's separator and GTK L&F set.

Regression: Yes, the separator is rendered as vertical bar on horizontally docked JToolbar on Tiger

Versions tested:
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b92)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b92, mixed mode, sharing)

bundles tested:
jdk-6-rc-bin-b92-linux-amd64-20_jul_2006.bin
jdk-6-rc-bin-b92-solaris-i586-20_jul_2006.sh
jdk-6-rc-bin-b91-solaris-sparc-13_jul_2006.sh
jdk-6-rc-bin-b91-solaris-sparcv9-13_jul_2006.sh

Locale: C, de_DE.UTF-8
OS: Linux, Solaris

Comments
EVALUATION There are actually three types of separators that we need to worry about: - Region.SEPARATOR - Region.POPUP_MENU_SEPARATOR - Region.TOOL_BAR_SEPARATOR There are some problems that affect all 3 of these, and others that are specific to just JToolBar.Separator. This bug report will deal with the latter, but all the issues will be fixed together under this bugid (as well as related bug 6365773). The general problem is that GTKPainter.paintSeparatorBackground() currently only deals with horizontal separators, and has no logic for vertical ones. So we need to add some code there that checks the orientation of the separator and, depending on the result, calls one of paintHline() or paintVline(). For JToolBar.Separators, as described in this bug report, we need to do some special calculations to position the visible separator properly. The native GtkToolBar code uses some hardcoded values to do this, so we don't have much choice but to simulate that code in GTKPainter.paintSeparatorBackground(). The size of the separator is dependent on the "space-size" style property of the GtkToolBar class. For all other separators, we need to use the "x/y thickness" properties to determine the proper dimensions/insets of the separator, and then account for those properly in GTKPainter.paintSeparatorBackground().
29-09-2006