public final void init() {
Form localForm = getForm();
localForm.setButtonAlign(Form.ALIGN_RIGHT);
localForm.setErrorsPosition(Form.POSITION_MIDDLE);
previous = new Submit("previous");
previous.setLabel("< Previous");
getPreviousButton().setActionListener(new ActionListener() {
public boolean onAction(Control source) {
return onPrevious();
}
});
localForm.add(previous);
if (!getWizardPage().hasPreviousStep()) {
previous.setDisabled(true);
}
next = new Submit("next");
next.setLabel("Next >");
getNextButton().setActionListener(new ActionListener() {
public boolean onAction(Control source) {
return onNext();
}
});
localForm.add(next);
if (!getWizardPage().hasNextStep()) {
next.setDisabled(true);
}
finish = new Submit("Finish");
getFinishButton().setActionListener(new ActionListener() {
public boolean onAction(Control source) {
return onFinish();
}
});
localForm.add(finish);
if (!getWizardPage().isLastStep()) {
finish.setDisabled(true);
}
cancel = new Submit("Cancel");
getCancelButton().setActionListener(new ActionListener() {
public boolean onAction(Control source) {
return onCancel();
}
});