From 1a610bc773863a3c93893e398d50448f75e35a2a Mon Sep 17 00:00:00 2001 From: ralph isenmann Date: Thu, 24 Jun 2021 10:45:19 +0200 Subject: [client] Use the label of ContainerImageType it the GUI --- .../src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java | 3 ++- .../org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'dozentenmodul/src') diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java index e37494ce..b2201239 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java @@ -89,13 +89,14 @@ public class ContainerPanel extends JPanel { scrollableTextArea.setPreferredSize(Gui.getScaledDimension(0, 200)); grdContainer.add(scrollableTextArea, 2).fill(true, true).expand(true, true); + // TODO copy-paste in ImageMetaDataPageLayout for this ContainerImageType component lblContainerImageType = new QLabel("Container Image Type"); cboContainerImageType = new ComboBox<>( new ComboBox.ComboBoxRenderer() { @Override public String renderItem(ContainerMeta.ContainerImageType item) { if (item == null) return "null"; - return item.name(); + return item.toString(); // shows the provided label } }, ContainerMeta.ContainerImageType.class); for (ContainerMeta.ContainerImageType type : ContainerMeta.ContainerImageType.values()) { 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 db7284c3..bec7e3dc 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 @@ -75,13 +75,14 @@ public abstract class ImageMetaDataPageLayout extends WizardPage { grid.add(chkLicenseRestricted, 2); grid.nextRow(); + // TODO copy-paste in ContainerPanel for this ContainerImageType component lblContainerImageType = new QLabel("Container Image Type"); cboContainerImageType = new ComboBox<>( new ComboBox.ComboBoxRenderer() { @Override public String renderItem(ContainerMeta.ContainerImageType item) { if (item == null) return "null"; - return item.name(); + return item.toString(); // shows the provided label } }, ContainerMeta.ContainerImageType.class); for (ContainerMeta.ContainerImageType type : ContainerMeta.ContainerImageType.values()) { -- cgit v1.2.3-55-g7522