diff options
author | Jonathan Bauer | 2016-08-15 15:11:10 +0200 |
---|---|---|
committer | Jonathan Bauer | 2016-08-15 15:11:10 +0200 |
commit | 0baa4e2641cf699fc8679c3a90ecb0e70852667d (patch) | |
tree | 2c2cd897bb794de6b928e837674d3bb380714189 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard | |
parent | [server] Improve template help texts (diff) | |
download | tutor-module-0baa4e2641cf699fc8679c3a90ecb0e70852667d.tar.gz tutor-module-0baa4e2641cf699fc8679c3a90ecb0e70852667d.tar.xz tutor-module-0baa4e2641cf699fc8679c3a90ecb0e70852667d.zip |
[client] ImageUploadWizard: hide the "create lecture for that VM" button until the download is complete instead of just disabling it
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard')
2 files changed, 6 insertions, 5 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java index ecad4d36..c53fd907 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java @@ -16,7 +16,7 @@ public class ImageUploadSummaryPageLayout extends WizardPage { protected final JCheckBox chkCreateLecture; protected final JLabel lblHelpText; - public ImageUploadSummaryPageLayout(Wizard wizard, boolean allowCreateLecture) { + public ImageUploadSummaryPageLayout(Wizard wizard) { super(wizard, "Fertig!"); setDescription("Assistent abgeschlossen"); GridManager grid = new GridManager(this, 1); @@ -37,8 +37,7 @@ public class ImageUploadSummaryPageLayout extends WizardPage { grid.nextRow(); chkCreateLecture = new JCheckBox("Veranstaltung zu dieser VM erstellen"); - chkCreateLecture.setVisible(allowCreateLecture); - chkCreateLecture.setEnabled(false); + chkCreateLecture.setVisible(false); grid.add(chkCreateLecture); grid.nextRow(); diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java index b5db050b..6370e204 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java @@ -26,6 +26,7 @@ public class ImageUploadSummaryPage extends ImageUploadSummaryPageLayout { private boolean pageIsVisible = false; private boolean uploadListenerAdded = false; + private boolean allowCreateLecture = false; private final UploadWizardState state; private final TransferEventListener uploadListener = new TransferEventListener() { @@ -116,7 +117,7 @@ public class ImageUploadSummaryPage extends ImageUploadSummaryPageLayout { setPageComplete(true); } if (state.upload.getUploadTask() != null && state.upload.getUploadTask().isComplete()) { - chkCreateLecture.setEnabled(true); + chkCreateLecture.setVisible(allowCreateLecture); } } @@ -124,8 +125,9 @@ public class ImageUploadSummaryPage extends ImageUploadSummaryPageLayout { } public ImageUploadSummaryPage(Wizard wizard, UploadWizardState state, boolean allowCreateLecture) { - super(wizard, allowCreateLecture); + super(wizard); this.state = state; + this.allowCreateLecture = allowCreateLecture; setPageComplete(false); } |