diff options
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java | 27 | ||||
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java | 4 |
2 files changed, 17 insertions, 14 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java index ab1e1153..6f0e0afc 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java @@ -22,6 +22,7 @@ public abstract class ImageUploadPageLayout extends WizardPage { protected final JTextField txtImageFile; protected final JCheckBox chkLicenseRestricted; protected final QLabel lblImageName; + protected final JTextArea txtInfoText; /** * Page for uploading an imagefile @@ -57,18 +58,20 @@ public abstract class ImageUploadPageLayout extends WizardPage { grid.add(Box.createVerticalGlue(), 3).expand(true, true); - // -- info text field -- - JTextArea infoText = new JTextArea(); - infoText.setBorder(BorderFactory.createTitledBorder("Hinweis")); - infoText.setLineWrap(true); - infoText.setWrapStyleWord(true); - infoText.setEditable(false); - infoText.setFocusable(false); - infoText.setOpaque(false); - infoText.setText("Haben Sie noch keine eigene Virtuelle Maschine erstellt, " - + "können Sie sich in der Übersicht eine Virtuelle Maschine als Vorlage herunterladen, " - + "diese an Ihre Bedürfnisse anpassen und anschließend über diesen Assistenten hochladen."); - grid.add(infoText, 3).fill(true, false).expand(true, false); + txtInfoText = new JTextArea(); + txtInfoText.setBorder(BorderFactory.createTitledBorder("Hinweis")); + txtInfoText.setLineWrap(true); + txtInfoText.setWrapStyleWord(true); + txtInfoText.setEditable(false); + txtInfoText.setFocusable(false); + txtInfoText.setOpaque(false); + txtInfoText.setText("Haben Sie noch keine eigene Virtuelle Maschine erstellt," + + " können Sie sich in der Übersicht eine Virtuelle Maschine als Vorlage herunterladen," + + " diese an Ihre Bedürfnisse anpassen und anschließend über diesen Assistenten hochladen." + + "\n\nWenn Sie die VM einer bestehenden Veranstaltung aktualisieren möchten," + + " öffnen Sie die Detailansicht der bestehenden VM und wählen Sie 'Neue VM-Version hochladen'." + + " Dadurch bleiben bestehende Berechtigungen, sowie Verknüpfungen zu Veranstaltungen erhalten."); + grid.add(txtInfoText, 3).fill(true, false).expand(true, false); grid.nextRow(); grid.finish(false); diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java index b580ce5e..f5a10b44 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java @@ -7,7 +7,6 @@ import java.awt.event.MouseEvent; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.util.List; import javax.swing.JFileChooser; @@ -28,9 +27,9 @@ import org.openslx.dozmod.thrift.ThriftError; import org.openslx.dozmod.thrift.UploadInitiator; import org.openslx.dozmod.thrift.WrappedException; import org.openslx.dozmod.thrift.cache.MetaDataCache; +import org.openslx.util.vm.DiskImage; import org.openslx.util.vm.DiskImage.UnknownImageFormatException; import org.openslx.util.vm.VmMetaData.HardDisk; -import org.openslx.util.vm.DiskImage; import org.openslx.util.vm.VmwareMetaData; /** @@ -55,6 +54,7 @@ public class ImageUploadPage extends ImageUploadPageLayout { lblImageName.setVisible(existingImage == null); txtImageName.setVisible(existingImage == null); + txtInfoText.setVisible(existingImage == null); // show the licenced software checkbox since we are uploading new version chkLicenseRestricted.setVisible(existingImage != null); chkLicenseRestricted.setSelected(existingImage != null); // TODO selected by default? |
