Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342721 - "Select from context menu" (Swing) on tables always opens the menu in the middle of the table
Summary: "Select from context menu" (Swing) on tables always opens the menu in the mid...
Status: CLOSED FIXED
Alias: None
Product: Jubula
Classification: Technology
Component: RC (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows Vista
: P3 critical (vote)
Target Milestone: Indigo RC3   Edit
Assignee: Zeb Ford-Reitz CLA
QA Contact: Oliver Goetz CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-13 10:30 EDT by Alexandra Schladebeck CLA
Modified: 2011-05-30 05:32 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandra Schladebeck CLA 2011-04-13 10:30:31 EDT
Our actions for "select from context menu" are designed so that the context menu is opened from the current mouse position (if the mouse is currently in the component). 

I have noticed in two separate applications recently (unfortunately not available to be posted here) that the opening of context menus on tables seems to happen in the middle of the table.

Both times I was trying to open the context menu for a Swing table on the header row (row count 0).

The mouse is moved to the row header during the select (0 or 1 clicks) but then the context menu gets opened on the middle of the table. However, if the table itself has a context menu, it is not the same one as is available for the headers. 

This behaviour can be reproduced using the DVD Tool that is installed with Jubula. There are no context menus available for the headers in the table, but after selecting one of them the context menu is nevertheless opened in the middle of the table. 

I have so far only tested Swing AUTs to reproduce the behaviour.
Comment 1 Achim Loerke CLA 2011-05-24 04:51:00 EDT
try adding the table header bounds to the table bounds.
Comment 2 Zeb Ford-Reitz CLA 2011-05-24 10:36:30 EDT
fixed with http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=47a5bb846307adfa2029c6f4cea25a079968618a

Although it came up during discussion as a possible solution, I was reluctant to extend the calculated table bounds (as suggested above). I instead decided to add special handling for opening a context menu on a JTable header.
Comment 3 Oliver Goetz CLA 2011-05-30 05:32:41 EDT
Verified manually using DVD Tool.