blob: c77616aabc444be4002ce49746a9ec873cfedc5a (
plain) (
tree)
|
|
package org.openslx.dozmod.gui.wizard.page;
import org.apache.log4j.Logger;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.layout.LectureOptionsPageLayout;
import org.openslx.dozmod.state.LectureWizardState;
@SuppressWarnings("serial")
public class LectureOptionsPage extends LectureOptionsPageLayout {
private final static Logger LOGGER = Logger.getLogger(LectureOptionsPage.class);
private LectureWizardState state = null;
/**
* Page for lecture options
*/
public LectureOptionsPage(Wizard wizard, LectureWizardState state) {
super(wizard);
this.state = state;
setPageComplete(true);
//TODO Temporarily disabled until implemented
examCheck.setEnabled(false);
networkAccessCheck.setEnabled(false);
}
@Override
protected boolean wantNextOrFinish() {
return updateState();
}
/**
* Set the selected options in state
*/
private boolean updateState() {
state.isExam = examCheck.isSelected();
state.autoUpdate = autoUpdate.isSelected();
state.internetAccess = networkAccessCheck.isSelected();
state.isEnabled = enabledCheck.isSelected();
setDescription("Klicken Sie auf 'Weiter' für Berechtigungen oder 'Fertigstellen'.");
return true;
}
}
|