summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java64
1 files changed, 5 insertions, 59 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
index 68b680c8..8d53cba5 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
@@ -1,17 +1,12 @@
package org.openslx.dozmod.gui.wizard.layout;
-import java.awt.FlowLayout;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JEditorPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
-import javax.swing.JButton;
-import javax.swing.text.StyledEditorKit;
-import javax.swing.text.html.HTMLEditorKit;
-import java.awt.Dimension;
import org.openslx.bwlp.thrift.iface.OperatingSystem;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.configurator.ContainerBindMountConfigurator;
@@ -37,16 +32,6 @@ import javax.swing.*;
protected final JCheckBox chkLicenseRestricted;
protected final JCheckBox chkIsTemplate;
- protected final JButton btnBold;
- protected final JButton btnItalic;
- protected final JButton btnUnderline;
- protected final JButton btnWysiwyg;
-
- protected final JComboBox cbTxtSize;
- protected final JComboBox cbTxtColor;
- protected final HTMLEditorKit kit;
-
-
protected final ContainerBindMountConfigurator bindMountConfigurator;
/**
@@ -58,7 +43,7 @@ import javax.swing.*;
super(wizard, I18n.PAGE_LAYOUT.getString("ImageMetaData.WizardPage.title"));
setDescription(I18n.PAGE_LAYOUT.getString("ImageMetaData.WizardPage.description"));
- GridManager grid = new GridManager(this, 3, false);
+ GridManager grid = new GridManager(this, 2, false);
lblOperatingSystem = new QLabel(I18n.PAGE_LAYOUT.getString("ImageMetaData.Label.OS.text"));
cboOperatingSystem = new ComboBox<>(Comparators.operatingSystem, new ComboBoxRenderer<OperatingSystem>() {
@@ -71,7 +56,7 @@ import javax.swing.*;
});
cboOperatingSystem.setEditable(false);
grid.add(lblOperatingSystem);
- grid.add(cboOperatingSystem, 2);
+ grid.add(cboOperatingSystem);
grid.nextRow();
sCommandCaption = new QLabel(I18n.PAGE_LAYOUT.getString("ImageMetaData.Label.startCommand.text"));
@@ -84,62 +69,23 @@ import javax.swing.*;
startCommandPane.setMinimumSize(startCommand.getMinimumSize());
grid.add(sCommandCaption);
grid.add(startCommandPane).fill(true, false).expand(true, false);
- grid.add(new JPanel());
grid.nextRow();
- // buttons for text editing
- JPanel editingPanel = new JPanel();
- editingPanel.setLayout(new FlowLayout(FlowLayout.LEADING));
- JPanel emptyPanel = new JPanel();
- grid.add(emptyPanel);
- btnBold = new JButton(new StyledEditorKit.BoldAction());
- btnBold.setIcon(Gui.getScaledIconResource("/img/bold.png", "B", 15, this));
- btnBold.setText("");
- btnItalic = new JButton(new StyledEditorKit.ItalicAction());
- btnItalic.setIcon(Gui.getScaledIconResource("/img/italic.png", "B", 15, this));
- btnItalic.setText("");
- btnUnderline = new JButton(new StyledEditorKit.UnderlineAction());
- btnUnderline.setIcon(Gui.getScaledIconResource("/img/underline.png", "B", 15, this));
- btnUnderline.setText("");
- editingPanel.add(btnBold);
- editingPanel.add(btnItalic);
- editingPanel.add(btnUnderline);
-
- String[] textsizes = {"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29"};
- cbTxtSize = new JComboBox<>(textsizes);
- cbTxtSize.setPreferredSize(new Dimension(65,25));
- editingPanel.add(cbTxtSize);
-
- Object[] colors = {"Black", "Blue", "Red", "Yellow", "Green"};
- cbTxtColor = new JComboBox<>(colors);
- cbTxtColor.setPreferredSize(new Dimension(95,25));
- editingPanel.add(cbTxtColor);
-
- grid.add(editingPanel);
- emptyPanel.setLayout(new FlowLayout());
- btnWysiwyg = new JButton("HTML");
- btnWysiwyg.setPreferredSize(new Dimension(100,25));
- emptyPanel.add(btnWysiwyg);
- grid.add(emptyPanel);
- grid.nextRow();
// description
QLabel descriptionCaption = new QLabel(I18n.PAGE_LAYOUT.getString("ImageMetaData.Label.description.text"));
txtDescription = new JEditorPane();
txtDescription.setMinimumSize(Gui.getScaledDimension(0, 70));
- kit = new HTMLEditorKit();
- txtDescription.setEditorKit(kit);
- txtDescription.setContentType("text/html");
JScrollPane descPane = new JScrollPane(txtDescription, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
grid.add(descriptionCaption);
- grid.add(descPane, 2).fill(true, true).expand(true, true);
+ grid.add(descPane).fill(true, true).expand(true, true);
grid.nextRow();
chkLicenseRestricted = new JCheckBox(
I18n.PAGE_LAYOUT.getString("ImageMetaData.CheckBox.licenseRestricted.text"));
chkLicenseRestricted.setSelected(true);
- grid.add(chkLicenseRestricted, 3);
+ grid.add(chkLicenseRestricted, 2);
grid.nextRow();
bindMountConfigurator = new ContainerBindMountConfigurator();
@@ -150,7 +96,7 @@ import javax.swing.*;
// -- end permissions group --
chkIsTemplate = new JCheckBox(I18n.PAGE_LAYOUT.getString("ImageMetaData.CheckBox.isTemplate.text"));
- grid.add(chkIsTemplate, 3);
+ grid.add(chkIsTemplate, 2);
grid.nextRow();
grid.finish(true);