if (shell.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
// make the default button the right-most button
Button defaultButton = shell.getDefaultButton();
if (defaultButton != null
&& isContained(buttonBar, defaultButton)) {
defaultButton.moveBelow(null);
((Composite) buttonBar).layout();
}
}
}