mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 23:29:34 +00:00
First attempt at setting appropriate default button. Added getDialog.
This commit is contained in:
parent
72a4dd01cd
commit
c3cee4f38b
@ -182,12 +182,14 @@ public abstract class Wizard {
|
|||||||
*/
|
*/
|
||||||
public void enableNextButton(boolean state) {
|
public void enableNextButton(boolean state) {
|
||||||
nextButton.setEnabled(state);
|
nextButton.setEnabled(state);
|
||||||
|
if (!finishButton.isEnabled()) dialog.setDefaultButton(nextButton);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Enable/disable the finish button.
|
* Enable/disable the finish button.
|
||||||
*/
|
*/
|
||||||
public void enableFinishButton(boolean state) {
|
public void enableFinishButton(boolean state) {
|
||||||
finishButton.setEnabled(state);
|
finishButton.setEnabled(state);
|
||||||
|
dialog.setDefaultButton(finishButton);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Get the content pane.
|
* Get the content pane.
|
||||||
@ -195,4 +197,11 @@ public abstract class Wizard {
|
|||||||
protected Composite getContentPane() {
|
protected Composite getContentPane() {
|
||||||
return contentPane;
|
return contentPane;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Get the Wizard dialog Shell object. Used by WizardPanes if a popup
|
||||||
|
* window is needed.
|
||||||
|
*/
|
||||||
|
public Shell getDialog() {
|
||||||
|
return dialog;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user