First attempt at setting appropriate default button. Added getDialog.

This commit is contained in:
Robert Greene 2003-02-11 04:43:23 +00:00
parent 72a4dd01cd
commit c3cee4f38b

View File

@ -182,12 +182,14 @@ public abstract class Wizard {
*/
public void enableNextButton(boolean state) {
nextButton.setEnabled(state);
if (!finishButton.isEnabled()) dialog.setDefaultButton(nextButton);
}
/**
* Enable/disable the finish button.
*/
public void enableFinishButton(boolean state) {
finishButton.setEnabled(state);
dialog.setDefaultButton(finishButton);
}
/**
* Get the content pane.
@ -195,4 +197,11 @@ public abstract class Wizard {
protected Composite getContentPane() {
return contentPane;
}
/**
* Get the Wizard dialog Shell object. Used by WizardPanes if a popup
* window is needed.
*/
public Shell getDialog() {
return dialog;
}
}