Bug 351935 - FEATURE - GridLayout - reorder components by GridData
Summary: FEATURE - GridLayout - reorder components by GridData
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-13 05:44 EDT by Ludwig Moser CLA
Modified: 2011-07-13 07:46 EDT (History)
3 users (show)

See Also:


Attachments
modyfied GridData to work with index (21.29 KB, text/x-java-source)
2011-07-13 05:45 EDT, Ludwig Moser CLA
no flags Details
modyfied GridLayout to work with index (25.58 KB, text/x-java-source)
2011-07-13 05:46 EDT, Ludwig Moser CLA
no flags Details
the Comparator to sort the Array of Components by index (451 bytes, text/x-java-source)
2011-07-13 05:46 EDT, Ludwig Moser CLA
no flags Details

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