blob: 28c04d811c046f26d470f4a3b40fccc3323434e7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
package org.openslx.dozmod.gui.wizard.layout;
import javax.swing.Box;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@SuppressWarnings("serial")
public abstract class LectureOptionsPageLayout extends WizardPage {
protected static String title = I18n.PAGE_LAYOUT.getString("LectureOptions.WizardPage.title");
protected final JCheckBox chkUsbEnabled;
protected final JCheckBox chkInternetEnabled;
protected final JCheckBox chkIsExam;
protected final JCheckBox chkAutoUpdate;
protected final JCheckBox chkIsActive;
/**
* Page for additional options of lecture
*/
public LectureOptionsPageLayout(Wizard wizard) {
super(wizard, title);
setDescription(I18n.PAGE_LAYOUT.getString("LectureOptions.WizardPage.description"));
GridManager grid = new GridManager(this, 2);
// first column for labels hopefully clearing up some of the mess...
// first category for general options
JLabel lblGeneral = new JLabel(I18n.PAGE_LAYOUT.getString("LectureOptions.Label.general.text"));
grid.add(lblGeneral);
chkAutoUpdate = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.autoUpdate.text"), true);
grid.add(chkAutoUpdate);
grid.nextRow();
chkIsActive = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.isActive.text"), true);
grid.skip();
grid.add(chkIsActive);
grid.nextRow();
chkIsExam = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.isExam.text"), false);
grid.skip();
grid.add(chkIsExam);
grid.nextRow();
grid.add(Box.createVerticalStrut(10), 2);
grid.nextRow();
// second category for restrictions options
JLabel lblRestriction = new JLabel(I18n.PAGE_LAYOUT.getString("LectureOptions.Label.restrictions.text"));
grid.add(lblRestriction);
chkInternetEnabled = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.internetEnabled.text"),
true);
// TODO: Hint at exception editor in lecture details window, or include here...
grid.add(chkInternetEnabled).fill(true, false).expand(true, false);
grid.nextRow();
chkUsbEnabled = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.USBEnabled.text"), true);
grid.skip();
grid.add(chkUsbEnabled);
grid.nextRow();
grid.finish(true);
}
}
|