United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6452493 Regression: JToolBar's separator is wrongly rendered using GTK L&F on Linux and Solaris
JDK-6452493 : Regression: JToolBar's separator is wrongly rendered using GTK L&F on Linux and Solaris

Details
Type:
Bug
Submit Date:
2006-07-25
Status:
Closed
Updated Date:
2011-03-09
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
client-libs
OS:
solaris
Sub-Component:
javax.swing
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

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().
                                     
2006-09-29



Hardware and Software, Engineered to Work Together