diff options
author | Stephan Schwär | 2020-10-28 00:54:02 +0100 |
---|---|---|
committer | Stephan Schwär | 2020-10-28 00:54:02 +0100 |
commit | 886e56f73f492161785db5913e6205ce27799eac (patch) | |
tree | f4e9db75588fc91c4d1d4328250ff9d00643892f | |
parent | [client] Set OVF Tool path for different Windows versions (diff) | |
download | tutor-module-886e56f73f492161785db5913e6205ce27799eac.tar.gz tutor-module-886e56f73f492161785db5913e6205ce27799eac.tar.xz tutor-module-886e56f73f492161785db5913e6205ce27799eac.zip |
[client] Make conversion possible in update wizard
Feature: #3771
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java index 8152b019..3b606f57 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java @@ -11,6 +11,7 @@ import org.openslx.dozmod.gui.helper.MessageType; import org.openslx.dozmod.gui.helper.QuitNotification; import org.openslx.dozmod.gui.helper.UiFeedback; import org.openslx.dozmod.gui.wizard.page.DockerfileUploadPage; +import org.openslx.dozmod.gui.wizard.page.ImageOvfConversionPage; import org.openslx.dozmod.gui.wizard.page.ImageUploadPage; import org.openslx.dozmod.gui.wizard.page.ImageUploadSummaryPage; import org.openslx.dozmod.state.UploadWizardState; @@ -39,7 +40,10 @@ public class ImageUpdateWizard extends Wizard implements UiFeedback, QuitNotific case TConst.VIRT_QEMU: case TConst.VIRT_VIRTUALBOX: case TConst.VIRT_VMWARE: - addPage(new ImageUploadPage(this, state, image)); + imageUploadPage = new ImageUploadPage(this, state, image); + addPage(imageUploadPage); + state.conversionPage = new ImageOvfConversionPage(this, state); + addOutOfOrderPage(state.conversionPage); break; } } @@ -116,4 +120,24 @@ public class ImageUpdateWizard extends Wizard implements UiFeedback, QuitNotific } } + @Override + protected final void doPrevious() { + if (outOfOrderPage != null) { + outOfOrderPage = null; + returnAfterOutOfOrderPage(imageUploadPage, state.conversionPage); + } else { + super.doPrevious(); + } + } + + @Override + public final void doNext() { + if (outOfOrderPage != null) { + outOfOrderPage = null; + returnAfterOutOfOrderPage(imageUploadPage, state.conversionPage); + } else { + super.doNext(); + } + } + } |