diff options
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java | 92 |
1 files changed, 92 insertions, 0 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 new file mode 100644 index 00000000..26425813 --- /dev/null +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java @@ -0,0 +1,92 @@ +package org.openslx.dozmod.gui.wizard.layout; + +import org.openslx.dozmod.gui.control.QLabel; +import org.openslx.dozmod.gui.helper.GridManager; +import org.openslx.dozmod.gui.wizard.Wizard; +import org.openslx.dozmod.gui.wizard.WizardPage; + +import javax.swing.*; +import java.awt.event.KeyEvent; + +public class ContainerUploadPageLayout extends WizardPage { + + protected final JTextField txtImageName; + protected final JButton btnBrowseForImage; + protected final JTextField txtImageFile; + protected final JCheckBox chkLicenseRestricted; + protected final QLabel lblImageName; + protected final JTextArea txtInfoText; + + protected final JTextField txtContainerRun; + protected final QLabel lblContainerRun; + protected final QLabel lblMountUserDir; + protected final JCheckBox chkMountUserDir; + + // TODO set proper Text labels + /** + * Page for uploading an imagefile + */ + public ContainerUploadPageLayout(Wizard wizard) { + + super(wizard, "Neue VM anlegen"); + setDescription("Bitte wählen Sie eine Virtuelle Maschine zum Hochladen aus."); + GridManager grid = new GridManager(this, 3, false); + + // -- Browse for VM -- + QLabel imageFileCaption = new QLabel("Virtuelle Maschine"); + txtImageFile = new JTextField(); + txtImageFile.setEditable(false); + btnBrowseForImage = new JButton("Durchsuchen"); + btnBrowseForImage.setMnemonic(KeyEvent.VK_B); + grid.add(imageFileCaption); + grid.add(txtImageFile).fill(true, false).expand(true, false); + grid.add(btnBrowseForImage); + grid.nextRow(); + + lblImageName = new QLabel("Name"); + txtImageName = new JTextField(); + grid.add(lblImageName); + grid.add(txtImageName, 2, 1).fill(true, false).expand(true, false); + grid.nextRow(); + + // -- Software license changed - shown only in UploadWizard -- + chkLicenseRestricted = new JCheckBox("enthält lizenzpflichtige Software"); + chkLicenseRestricted.setVisible(false); + grid.skip(); + grid.add(chkLicenseRestricted, 2, 1).fill(false, false).expand(true, false); + grid.nextRow(); + + grid.add(new JSeparator(),3); + grid.nextRow(); + + lblContainerRun = new QLabel("Container Start Optionen"); + lblContainerRun.setToolTipText("Geben Sie die Container Run Optionen an (Port, Name, Env,...)"); + txtContainerRun = new JTextField(); + lblMountUserDir = new QLabel("Mount User Directory"); + chkMountUserDir = new JCheckBox(); + grid.add(lblContainerRun); + grid.add(txtContainerRun, 2, 1).fill(true, false).expand(true, false); + grid.add(lblMountUserDir); + grid.add(chkMountUserDir,2,1).fill(false, false).expand(true, false); + grid.nextRow(); + + + + + grid.add(Box.createVerticalGlue(), 3).expand(true, true); + + 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("Container Info Text"); + grid.add(txtInfoText, 3).fill(true, false).expand(true, false); + grid.nextRow(); + + grid.finish(false); + } + +} |