summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageTypePageLayout.java
blob: 7dac11034f17df6fdcec1e17b9c807dd0f6fcc56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package org.openslx.dozmod.gui.wizard.layout;

import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;

import javax.swing.*;

public abstract class ImageTypePageLayout extends WizardPage {

	protected final JTextArea txtInfoText;
	protected final JButton btnNewVmImage;
	protected final JButton btnNewDockerImage;

	/**
	 * Page to choose between new VM-Image or Docker Image
	 */
	public ImageTypePageLayout(Wizard wizard) {

		super(wizard, "Wähle Image Type");
		setDescription("Möchten Sie eine VM oder ein Docker Image definieren?");
		GridManager grid = new GridManager(this, 4, false);

		// Choose between new vm or new docker-image
		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("Hier haben Sie die Möglichkeit ein neues Image als VM oder Container (Docker) "
				+ "zu definieren.\n\n"
				+ "Sie besitzen derzeit eine Entwicklungsstand der bwLehrpool Suite, in der sämtliche "
				+ "Funktionalitäten zur Erstellung und Verwaltung von Container Images in Entwicklung sind. "
				+ "Diese Funktionen können sich in späteren Versionen ändern und somit ihre erstellten Images "
				+ "inkompatibel machen.");
		grid.add(txtInfoText, 4).fill(true, false).expand(true, false);
		grid.nextRow();
		grid.nextRow();

		// -- New VM Pick--
		btnNewVmImage = new JButton("New VM");
		grid.add(btnNewVmImage, 2, 2).fill(true, true).expand(true, true);
		// -- New Docker-Image Pick--
		btnNewDockerImage = new JButton("new Docker-Image");
		grid.add(btnNewDockerImage, 2, 2).fill(true, true).expand(true, true);

		grid.finish(false);

	}
}