}
});
}
Row topRow = new Row();
topRow.setCellSpacing(new JbsExtent(DIALOG_INSETS));
topRow.add(iconLabel);
topRow.add(messageColumn);
KeyStrokeListener ks = new KeyStrokeListener();
ArrayList<JbsButton> buttons = new ArrayList<JbsButton>();
if (optionType == DEFAULT_OPTION) {
buttons.add(defaultButton = createButton(JbsL10N.getString("Generic.ok"), OK_OPTION));
ks.addKeyCombination(KeyStrokeListener.VK_RETURN, OK_OPTION);
} else if (optionType == YES_NO_OPTION) {
buttons.add(defaultButton = createButton(JbsL10N.getString("Generic.yes"), YES_OPTION));
ks.addKeyCombination(KeyStrokeListener.VK_RETURN, YES_OPTION);
buttons.add(createButton(JbsL10N.getString("Generic.no"), NO_OPTION));
ks.addKeyCombination(KeyStrokeListener.VK_ESCAPE, NO_OPTION);
} else if (optionType == YES_NO_CANCEL_OPTION) {
buttons.add(defaultButton = createButton(JbsL10N.getString("Generic.yes"), YES_OPTION));
ks.addKeyCombination(KeyStrokeListener.VK_RETURN, YES_OPTION);
buttons.add(createButton(JbsL10N.getString("Generic.no"), NO_OPTION));
buttons.add(createButton(JbsL10N.getString("Generic.cancel"), CANCEL_OPTION));
ks.addKeyCombination(KeyStrokeListener.VK_ESCAPE, CANCEL_OPTION);
} else if (optionType == OK_CANCEL_OPTION) {
buttons.add(defaultButton = createButton(JbsL10N.getString("Generic.ok"), OK_OPTION));
ks.addKeyCombination(KeyStrokeListener.VK_RETURN, OK_OPTION);
buttons.add(createButton(JbsL10N.getString("Generic.cancel"), CANCEL_OPTION));
ks.addKeyCombination(KeyStrokeListener.VK_ESCAPE, CANCEL_OPTION);
}
if (btnDetails!=null)
buttons.add(btnDetails);
ks.addActionListener(this);
topRow.add(ks);
ButtonPanel buttonPanel = new ButtonPanel();
ColumnLayoutData buttonPanelLayout = new ColumnLayoutData();
buttonPanelLayout.setAlignment(new Alignment(Alignment.CENTER, Alignment.TOP));
buttonPanel.setLayoutData(buttonPanelLayout);