summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java27
1 files changed, 17 insertions, 10 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java
index 86ae6dad..018c0206 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java
@@ -1,9 +1,5 @@
package org.openslx.dozmod.gui.wizard;
-import java.awt.Window;
-
-import javax.swing.JOptionPane;
-
import org.apache.log4j.Logger;
import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
import org.openslx.bwlp.thrift.iface.LectureWrite;
@@ -13,16 +9,16 @@ import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.UiFeedback;
import org.openslx.dozmod.gui.window.LectureListWindow;
-import org.openslx.dozmod.gui.wizard.page.LectureCreationPage;
-import org.openslx.dozmod.gui.wizard.page.LectureCustomPermissionPage;
-import org.openslx.dozmod.gui.wizard.page.LectureImageListPage;
-import org.openslx.dozmod.gui.wizard.page.LectureLocationSelectionPage;
-import org.openslx.dozmod.gui.wizard.page.LectureOptionsPage;
+import org.openslx.dozmod.gui.wizard.page.*;
import org.openslx.dozmod.state.LectureWizardState;
import org.openslx.dozmod.thrift.Session;
import org.openslx.dozmod.thrift.ThriftActions;
import org.openslx.dozmod.thrift.cache.LectureCache;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
+import org.openslx.dozmod.util.ContainerUtils;
+
+import javax.swing.*;
+import java.awt.*;
public class LectureWizard extends Wizard implements UiFeedback {
@@ -37,7 +33,7 @@ public class LectureWizard extends Wizard implements UiFeedback {
/**
* Wizard for creating or editing a lecture.
- *
+ *
* @param parent window of this wizard
* @param image ImageSummaryRead of the image to link this lecture to,
* if this is null it will add the LectureImageListPage to
@@ -64,6 +60,17 @@ public class LectureWizard extends Wizard implements UiFeedback {
}
}
+ @Override public void setVisible(boolean b) {
+ if (state.image != null && state.imageVersionId != null) {
+ if (ContainerUtils.isContainerImageLinked(state.image)) {
+ dispose();
+ super.setVisible(false);
+ return;
+ }
+ }
+ super.setVisible(true);
+ }
+
@Override
public String getWindowTitle() {
return I18n.WIZARD.getString("Lecture.Wizard.title");