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 | 27 |
1 files changed, 22 insertions, 5 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 5fcc6dcd..0496261f 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 @@ -24,6 +24,8 @@ public class ContainerUploadPageLayout extends WizardPage { protected final QLabel lblImageName; protected final JTextArea txtInfoText; + protected final JTextField txtImageRepo; + protected final JTabbedPane tpInput; protected final JTextField txtGitRepo; @@ -38,8 +40,24 @@ public class ContainerUploadPageLayout extends WizardPage { setDescription(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.description")); GridManager grid = new GridManager(this, 3, false); + 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")); + lblImageRepo.setToolTipText( + I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ImageRepository.ToolTipText")); + txtImageRepo = new JTextField(); + txtImageRepo.setEditable(true); + txtImageRepo.setToolTipText( + I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ImageRepository.ToolTipText")); + tmpGrid.add(lblImageRepo); + tmpGrid.add(txtImageRepo).fill(true, false).expand(true, false); + tmpGrid.finish(false); + + JPanel p1 = new JPanel(); - p1.setVisible(true); + p1.setVisible(false); GridManager g1 = new GridManager(p1, 3, true, new Insets(5, 0, 5, 0)); QLabel imageFileCaption = new QLabel( I18n.PAGE_LAYOUT.getString("ContainerUploadPage.DockerFile.label")); @@ -68,13 +86,12 @@ public class ContainerUploadPageLayout extends WizardPage { tpInput = new JTabbedPane(); tpInput.addTab("Dockerfile", p1); tpInput.addTab("Git Repository", p2); - tpInput.setSelectedIndex(ContainerBuildContextMethod.FILE.ordinal()); + tpInput.addTab("Image Repository", imageRepoPanel); + // set "Image Repository" as selected + tpInput.setSelectedIndex(2); grid.add(tpInput, 3).fill(true, false); - // Start as with Dockerfile as input! - tpInput.setSelectedIndex(0); - lblImageName = new QLabel(I18n.PANEL.getString("ContainerPanel.Label.ImageName.text")); txtImageName = new JTextField(); grid.add(lblImageName); |