Point listSize = list.computeSize (rect.width, SWT.DEFAULT);
Point listSize = list.computeSize (rect.width, SWT.DEFAULT, false);
public String open (Rectangle rect) {	Point listSize = list.computeSize (rect.width, SWT.DEFAULT);	Rectangle screenSize = shell.getDisplay().getBounds();	// Position the dialog so that it does not run off the screen and the largest number of items are visible	int spaceBelow = screenSize.height - (rect.y + rect.height) - 30;	int spaceAbove = rect.y - 30;	int y = 0;	if (spaceAbove > spaceBelow && listSize.y > spaceBelow) {		// place popup list above table cell		if (listSize.y > spaceAbove){			listSize.y = spaceAbove;		} else {			listSize.y += 2;		}		y = rect.y - listSize.y;			} else {		// place popup list below table cell		if (listSize.y > spaceBelow){			listSize.y = spaceBelow;		} else {			listSize.y += 2;		}		y = rect.y + rect.height;	}		// Make dialog as wide as the cell	listSize.x = rect.width;	// dialog width should not be les than minimumwidth	if (listSize.x < minimumWidth)		listSize.x = minimumWidth;		// Align right side of dialog with right side of cell	int x = rect.x + rect.width - listSize.x;		shell.setBounds(x, y, listSize.x, listSize.y);		shell.open();	list.setFocus();	Display display = shell.getDisplay();	while (!shell.isDisposed () && shell.isVisible ()) {		if (!display.readAndDispatch()) display.sleep();	}		String result = null;	if (!shell.isDisposed ()) {		String [] strings = list.getSelection ();		shell.dispose();		if (strings.length != 0) result = strings [0];	}	return result;}