Bug 351935

Summary: FEATURE - GridLayout - reorder components by GridData
Product: [Eclipse Project] Platform Reporter: Ludwig Moser <luke2000>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: luke2000, markus.kell.r, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
modyfied GridData to work with index
none
modyfied GridLayout to work with index
none
the Comparator to sort the Array of Components by index none

Description Ludwig Moser CLA 2011-07-13 05:44:35 EDT
Build Identifier: 20110218-0911

reordering the components is currently not possible (only excluding them)
ordering the components by an index would be fine.
(i implemented it: files will get attached)

Reproducible: Always
Comment 1 Ludwig Moser CLA 2011-07-13 05:45:49 EDT
Created attachment 199555 [details]
modyfied GridData to work with index
Comment 2 Ludwig Moser CLA 2011-07-13 05:46:14 EDT
Created attachment 199556 [details]
modyfied GridLayout to work with index
Comment 3 Ludwig Moser CLA 2011-07-13 05:46:39 EDT
Created attachment 199557 [details]
the Comparator to sort the Array of Components by index
Comment 4 Markus Keller CLA 2011-07-13 06:46:34 EDT
Control#moveAbove/Below(Control) can already be used to reorder the controls.

Setting indexes in GridData is a bit problematic, since there's no guarantee that  indexes are unique. This can be a subtle source of bugs. If anything is really necessary here, then I'd prefer something like Composite#setOrder(Control[]).