+ Text.DELIMITER);
return;
}
if (name.equals(ControlExample.getResourceString("PrintDialog"))) {
PrintDialog dialog = new PrintDialog(shell, style);
dialog.setText(ControlExample.getResourceString("Title"));
PrinterData result = dialog.open();
textWidget.append(ControlExample.getResourceString("PrintDialog") + Text.DELIMITER);
textWidget.append(ControlExample.getResourceString("Result", new String[] { "" + result }) + Text.DELIMITER
+ Text.DELIMITER);
return;
}
if (name.equals(ControlExample.getResourceString("MessageBox"))) {
MessageBox dialog = new MessageBox(shell, style);
dialog.setMessage(ControlExample.getResourceString("Example_string"));
dialog.setText(ControlExample.getResourceString("Title"));
int result = dialog.open();
textWidget.append(ControlExample.getResourceString("MessageBox") + Text.DELIMITER);
/*
* The resulting integer depends on the original dialog style. Decode the result and display it.
*/
switch (result) {