diff options
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java index dcfe1dd4..54befd60 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java @@ -1,6 +1,7 @@ package org.openslx.dozmod.gui.window.layout; import org.openslx.dozmod.gui.Gui; +import org.openslx.dozmod.gui.control.ComboBox; import org.openslx.dozmod.gui.control.QLabel; import org.openslx.dozmod.gui.helper.GridManager; import org.openslx.dozmod.gui.helper.StatusHeader; @@ -22,22 +23,39 @@ public class ContainerBindMountWindowLayout extends JDialog { protected final JButton btnSave; protected final JButton btnCancel; + protected static final String EMPTY_MARKER = "-"; + protected static final String[] TAGS = { "USER_HOME", "USER_TMP" }; + protected static String[] SOURCE_MOUNT_POINTS = { EMPTY_MARKER, TAGS[0], TAGS[1], "D", "E", "F", "G", "H", + "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; + + protected final ComboBox<String> cboSourceMountPoint = new ComboBox<>( + new ComboBox.ComboBoxRenderer<String>() { + @Override public String renderItem(String letter) { + if (letter == null) + return null; + return letter; + } + }); + public ContainerBindMountWindowLayout(Window modalParent) { super(modalParent, title, ModalityType.APPLICATION_MODAL); setLayout(new BorderLayout()); - header = new StatusHeader(getContentPane() , "Source and Target Path Required"); + header = new StatusHeader(getContentPane(), "Source and Target Path Required"); JPanel contentPanel = new JPanel(); add(contentPanel, BorderLayout.CENTER); GridManager grid = new GridManager(contentPanel, 2, true, new Insets(2, 2, 2, 2)); lblBmSource = new QLabel("Source"); + txtBmSource = new JTextField(); + cboSourceMountPoint.setModel(new DefaultComboBoxModel<>(SOURCE_MOUNT_POINTS)); + cboSourceMountPoint.setSelectedItem(SOURCE_MOUNT_POINTS[0]); grid.add(lblBmSource); - grid.add(txtBmSource).fill(true, false).expand(true, false); + grid.add(cboSourceMountPoint).fill(true, false).expand(true, false); grid.nextRow(); lblBmTarget = new QLabel("Target"); |