United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6465603 GTKLAF: Menu item selection bar hieght is not consistant in the menu and popupmenu across the items.
6465603 : GTKLAF: Menu item selection bar hieght is not consistant in the menu and popupmenu across the items.

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

Related Reports
Backport:
Relates:

Sub Tasks

Description
Bug Info:
=========
The following variations I found in the JMenu & JPopupMenu while comparing with native menu and popupmenu.

1. The height of the menu highlighted bar is varying while navigate on different menu items in the menu by using java application but in native menu,the highlighted bar is consistent across all the menu items in the menu.

2.The highlighted bar touches the menu separator in java application but in native,the highlighted bar is not touches the separator and it shows some clear gap between the separator and highlighted bar.

I observed the same behavior on both popupmenu and menu.

JDK HOME:
=========
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b97)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b97, mixed mode)

Steps to Reproduce:
===================
Download the attached java code and execute.
For Menu:
---------
1. Click on Menu
2. Navigate either through mouse or keyboard arrows.

For PopupMenu:
-------------
1. Right click on frame and it shows the popupmenu.
2. Navigate either through mouse or keyboard arrows.

Expected Result:
================
1. The highlighted bar height should consistent across all the menu items.
2. The highlighted bar should not touches the separator.

Actual Result:
==============
1. The highlighted bar height is varying while navigate on menu items in the menu.
2. The highlighted bar touches the separator.

Please find the attached images.

In Native Application:
---------------------
If you compare the following two gif files which have captured at different menu item selection and you don't find any difference in the height of selection bar.
1. native_selectionbar_state1.gif
2. native_selectionbar_state2.gif

In Java Application:
--------------------
If you compare the following two gif file which have capture at different menu item selections and you find the clear difference in the height of the selection bar.
1.java_menu_selectionbar_state1.gif
2.java_menu_selectionbar_state2.gif
3.java_popup_selectionbar_state1.gif
4.java_popup_selectionbar_state2.gif

                                    

Comments
EVALUATION

If we use separators inserted in Menu or Toolbar we have to return correct WidgetType for them. When we use JMenu.addSeparator or similar methods the correct WidgetType is returned accroding to the correct Region which is assigned to the correct uiClassID.
                                     
2006-10-30
EVALUATION

We should interpret Menu as a MenuItem in GTKStyle when we extract x/y thicknesses.
We should also return CheckBoxMenuItem and RadioButtonMenuItem insets as insets for a menu item rather than for a button.
                                     
2006-10-24
EVALUATION

If you want to have correct insets for separators in Menu you should use JMenu.addSeparator() or JPopupMenu.addSeparator() rather than JMenu.add(new JSeparator()).
                                     
2006-10-24
EVALUATION

There is a problem with different kind of insets.
                                     
2006-09-04



Hardware and Software, Engineered to Work Together