@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: { okPressed(); return; } case IDialogConstants.CANCEL_ID: { cancelPressed(); return; } case IDialogConstants.HELP_ID: { helpPressed(); return; } } }
/** * Notifies that the window's close button was pressed, the close menu was selected, or the ESCAPE * key pressed. * * <p>The default implementation of this framework method sets the window's return code to <code> * CANCEL</code> and closes the window using <code>close</code>. Subclasses may extend or * reimplement. */ @Override protected void handleShellCloseEvent() { // handle the same as pressing cancel cancelPressed(); }