Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325241 - Table checkbox column moves on drag & drop
Summary: Table checkbox column moves on drag & drop
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-14 08:50 EDT by Lakshmi P Shanmugam CLA
Modified: 2011-02-11 12:20 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lakshmi P Shanmugam CLA 2010-09-14 08:50:12 EDT
public class Snippet_bug {
public static void main (String [] args) {
	Display display = new Display ();
	String[] titles = {"Information", "Error", "Question", "Warning"};
	String[] questions = {"who?", "what?", "where?", "when?", "why?"};
	Shell shell = new Shell (display);
	shell.setLayout(new GridLayout());
	Table table = new Table (shell, SWT.MULTI | SWT.CHECK|SWT.BORDER);
	GridData data = new GridData (SWT.FILL, SWT.FILL, true, true);
	data.heightHint = 200;
	table.setLayoutData (data);
	table.setLinesVisible (true);
	table.setHeaderVisible (true);
	for (int i=0; i<titles.length; i++) {
		TableColumn column = new TableColumn (table, SWT.NONE);
		column.setText (titles [i]);
		column.setMoveable(true);
	}	
	int count = 128;
	for (int i=0; i<count; i++) {
		TableItem item = new TableItem (table, SWT.NONE);
		item.setText (0, "some info");
		item.setText (1, "error #" + i);
		item.setText (2, questions [i % questions.length]);
		item.setText (3, "look out!");
	}
	for (int i=0; i<titles.length; i++) {
		table.getColumn (i).pack ();
	}	
	shell.pack ();
	shell.open ();
	while (!shell.isDisposed ()) {
		if (!display.readAndDispatch ()) display.sleep ();
	}
	display.dispose ();
}
} 

Steps:
1) Run the snippet
2) Try to drag the first column header (by clicking above check box column). I'm unable to drag, but the cursor changes to hand cursor.
3) Now try to drag & drop any column over the first column, the dropped column gets inserted before the checkbox column.
Comment 1 Scott Kovatch CLA 2011-02-11 12:20:19 EST
Fixed > 20110211, in Tree and Table. Check column can no longer be moved, or attempted to be moved, and nothing can go to the left of the check column.