diff options
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout')
2 files changed, 30 insertions, 9 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java index 0496261f..5e6769e8 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java @@ -42,9 +42,8 @@ public class ContainerUploadPageLayout extends WizardPage { JPanel imageRepoPanel = new JPanel(); imageRepoPanel.setVisible(true); - GridManager tmpGrid = new GridManager(imageRepoPanel, 2, true, new Insets(5, 0, 5, 0)); - QLabel lblImageRepo = new QLabel( - I18n.PAGE_LAYOUT.getString("ContainerUploadPage.DockerFile.label")); + GridManager tmpGrid = new GridManager(imageRepoPanel, 2, true, new Insets(0, 5, 0, 5)); + QLabel lblImageRepo = new QLabel(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ImageRepo.label")); lblImageRepo.setToolTipText( I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ImageRepository.ToolTipText")); txtImageRepo = new JTextField(); @@ -55,10 +54,9 @@ public class ContainerUploadPageLayout extends WizardPage { tmpGrid.add(txtImageRepo).fill(true, false).expand(true, false); tmpGrid.finish(false); - JPanel p1 = new JPanel(); p1.setVisible(false); - GridManager g1 = new GridManager(p1, 3, true, new Insets(5, 0, 5, 0)); + GridManager g1 = new GridManager(p1, 3, true, new Insets(0, 5, 0, 5)); QLabel imageFileCaption = new QLabel( I18n.PAGE_LAYOUT.getString("ContainerUploadPage.DockerFile.label")); txtImageFile = new JTextField(); @@ -72,7 +70,7 @@ public class ContainerUploadPageLayout extends WizardPage { JPanel p2 = new JPanel(); p2.setVisible(false); - GridManager g2 = new GridManager(p2, 2, true, new Insets(5, 0, 5, 0)); + GridManager g2 = new GridManager(p2, 2, true, new Insets(0, 5, 0, 5)); QLabel lblGitRepo = new QLabel(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.GitRepository.label")); lblGitRepo.setToolTipText( I18n.PAGE_LAYOUT.getString("ContainerUploadPage.GitRepository.toolTipText")); @@ -91,6 +89,7 @@ public class ContainerUploadPageLayout extends WizardPage { tpInput.setSelectedIndex(2); grid.add(tpInput, 3).fill(true, false); + grid.nextRow(); lblImageName = new QLabel(I18n.PANEL.getString("ContainerPanel.Label.ImageName.text")); txtImageName = new JTextField(); @@ -105,12 +104,11 @@ public class ContainerUploadPageLayout extends WizardPage { txtContainerImageFile = new JTextField(); txtContainerImageFile.setEnabled(false); txtContainerImageFile.setToolTipText( - I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ContainerImageFile.ToolTipText") - ); + I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ContainerImageFile.ToolTipText")); grid.add(lblContainerImageFile); grid.add(txtContainerImageFile, 2).fill(true, false).expand(true, false); grid.nextRow(); - + grid.add(Box.createVerticalGlue(), 3).expand(true, true); txtInfoText = new JTextArea(); txtInfoText.setBorder(BorderFactory.createTitledBorder( diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java index 63089274..63b7f498 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java @@ -9,6 +9,7 @@ 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; +import org.openslx.dozmod.model.ContainerMeta; import org.openslx.thrifthelper.Comparators; import javax.swing.*; @@ -26,6 +27,9 @@ public abstract class ImageMetaDataPageLayout extends WizardPage { protected final JCheckBox chkLicenseRestricted; protected final JCheckBox chkIsTemplate; + protected final QLabel lblContainerImageType; + protected final ComboBox<ContainerMeta.ContainerImageType> cboContainerImageType; + /** * wizard page for entering image data at creating or editing an image * @@ -70,6 +74,25 @@ public abstract class ImageMetaDataPageLayout extends WizardPage { grid.add(chkLicenseRestricted, 2); grid.nextRow(); + lblContainerImageType = new QLabel("Container Image Type"); + cboContainerImageType = new ComboBox<>( + new ComboBox.ComboBoxRenderer<ContainerMeta.ContainerImageType>() { + @Override public String renderItem(ContainerMeta.ContainerImageType item) { + if (item == null) + return "null"; + return item.name(); + } + }, ContainerMeta.ContainerImageType.class); + for (ContainerMeta.ContainerImageType type : ContainerMeta.ContainerImageType.values()) { + cboContainerImageType.addItem(type); + } + cboContainerImageType.setSelectedItem(ContainerMeta.ContainerImageType.LECTURE); + grid.add(lblContainerImageType); + grid.add(cboContainerImageType).fill(true, false).expand(true, false); + lblContainerImageType.setVisible(false); + cboContainerImageType.setVisible(false); + grid.nextRow(); + // -- end permissions group -- chkIsTemplate = new JCheckBox(I18n.PAGE_LAYOUT.getString("ImageMetaData.CheckBox.isTemplate.text")); grid.add(chkIsTemplate, 2); |