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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
package org.openslx.dozmod.gui.wizard.layout;
import java.awt.event.KeyEvent;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JProgressBar;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@SuppressWarnings("serial")
public abstract class ImageOvfConversionPageLayout extends WizardPage {
public final JButton btnStartConversion;
protected final JTextArea txtInfoText;
protected final JProgressBar conversionProgressBar;
protected final JButton btnBrowseForOvftool;
protected final JTextField ovfToolFile;
/**
* Page converting an ovf to a vmx image.
*/
public ImageOvfConversionPageLayout(Wizard wizard) {
super(wizard, I18n.PAGE_LAYOUT.getString("ImageOvfConversion.WizardPage.title"));
setDescription(I18n.PAGE_LAYOUT.getString("ImageOvfConversion.WizardPage.description"));
GridManager grid = new GridManager(this, 3);
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(I18n.PAGE_LAYOUT.getString("ImageOvfConversion.WizardPage.InformationBox.text"));
grid.add(txtInfoText, 3).fill(true, false).expand(true, false);
grid.nextRow();
// -- Browse for ovfTool --
QLabel imageFileCaption = new QLabel(I18n.PAGE_LAYOUT.getString("ImageOvfConversion.Toolpath.text"));
ovfToolFile = new JTextField();
ovfToolFile.setEditable(false);
ovfToolFile.setText(I18n.PAGE_LAYOUT.getString("ImageOvfConversion.Toolpath.defaultpath.text"));
btnBrowseForOvftool = new JButton(
I18n.PAGE_LAYOUT.getString("ImageOvfConversion.Toolpath.BrowseButton.text"));
btnBrowseForOvftool.setMnemonic(KeyEvent.VK_B);
grid.add(imageFileCaption);
grid.add(ovfToolFile).fill(true, false).expand(true, false);
grid.add(btnBrowseForOvftool);
grid.nextRow();
grid.add(Box.createVerticalGlue(), 3).expand(true, true);
grid.nextRow();
btnStartConversion = new JButton(
I18n.PAGE_LAYOUT.getString("ImageOvfConversion.Button.StartConversion.text"));
btnStartConversion.setMnemonic(KeyEvent.VK_B);
grid.add(btnStartConversion, 1).fill(false, false).expand(false, false);
grid.add(Box.createVerticalGlue(), 2).expand(false, false);
grid.nextRow();
conversionProgressBar = new JProgressBar();
conversionProgressBar.setMinimum(0);
conversionProgressBar.setMaximum(100);
conversionProgressBar.setStringPainted(true);
grid.add(conversionProgressBar, 3).fill(true, false).expand(true, false);
grid.nextRow();
grid.finish(false);
}
}
|