Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335071

Summary: TableItem.getBounds returns overlapping regions for table items
Product: [Eclipse Project] Platform Reporter: Kevin Tapperson <kevintap>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ericwill
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
sample code fragment demonstrating the issue none

Description Kevin Tapperson CLA 2011-01-21 18:37:28 EST
Build Identifier: M20100909-0800

The TableItem.getBounds method is returning overlapping regions for the items in a table.  The attached sample code generates output like the following:

BOUNDS: Rectangle {3, 0, 38, 24}
BOUNDS: Rectangle {3, 23, 38, 24}
BOUNDS: Rectangle {3, 46, 38, 24}
BOUNDS: Rectangle {3, 69, 38, 24}

The first item in the table starts at a vertical position of 0 and has a height of 24.  The second item in the table starts at a vertical position of 23 and has a height of 24.  This starting position for the second item overlaps with the region returned for the first item.  Likewise for the other items in the table.

Reproducible: Always

Steps to Reproduce:
1. run the attached sample code
Comment 1 Kevin Tapperson CLA 2011-01-21 18:40:24 EST
Created attachment 187347 [details]
sample code fragment demonstrating the issue
Comment 2 Kevin Tapperson CLA 2011-01-21 18:51:36 EST
I should add that this behavior is different on linux vs. Windows.  On Windows the regions are non-overlapping whereas on linux the regions do overlap.
Comment 3 Eric Williams CLA 2017-03-14 14:16:30 EDT
No SWT snippet provided, and based on bug 512984, everything is working correctly.