ArrayList<String> options = new ArrayList<String>();
options.add("Yes");
options.add("No");
alert = new Alert(MessageType.QUESTION, "Cancel shutdown?", options);
alert.open(display, new DialogCloseListener() {
public void dialogClosed(Dialog dialog, boolean modal) {
Alert alert = (Alert)dialog;
if (alert.getResult()) {
if (alert.getSelectedOption() == 1) {