Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335071 - TableItem.getBounds returns overlapping regions for table items
Summary: TableItem.getBounds returns overlapping regions for table items
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-21 18:37 EST by Kevin Tapperson CLA
Modified: 2017-03-14 14:16 EDT (History)
1 user (show)

See Also:


Attachments
sample code fragment demonstrating the issue (748 bytes, text/plain)
2011-01-21 18:40 EST, Kevin Tapperson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.