diff options
author | Stephan Schwär | 2021-04-23 11:51:12 +0200 |
---|---|---|
committer | Stephan Schwär | 2021-04-23 11:51:12 +0200 |
commit | ef289359d4e958f1e5bc4f67e633f8e73138c6ec (patch) | |
tree | 5f2340a72d2d8b18f7d5ec7d699fc1f5bb63ff60 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard | |
parent | [client] Wording (diff) | |
download | tutor-module-ef289359d4e958f1e5bc4f67e633f8e73138c6ec.tar.gz tutor-module-ef289359d4e958f1e5bc4f67e633f8e73138c6ec.tar.xz tutor-module-ef289359d4e958f1e5bc4f67e633f8e73138c6ec.zip |
[client] Revert decription fields to JTextArea
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard')
2 files changed, 14 insertions, 12 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 f607e3da..48b88627 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 @@ -22,7 +22,7 @@ public abstract class ImageMetaDataPageLayout extends WizardPage { protected final QLabel lblOperatingSystem; protected final JComboBox<OperatingSystem> cboOperatingSystem; - protected final JEditorPane txtDescription; + protected final JTextArea txtDescription; protected final JTextArea startCommand; protected final QLabel sCommandCaption; protected final JScrollPane startCommandPane; @@ -69,7 +69,9 @@ public abstract class ImageMetaDataPageLayout extends WizardPage { // description QLabel descriptionCaption = new QLabel( I18n.PAGE_LAYOUT.getString("ImageMetaData.Label.description.text")); - txtDescription = new JEditorPane(); + txtDescription = new JTextArea(3, 50); + txtDescription.setLineWrap(true); + txtDescription.setWrapStyleWord(true); txtDescription.setMinimumSize(Gui.getScaledDimension(0, 70)); JScrollPane descPane = new JScrollPane(txtDescription, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java index eee4f533..b7608f58 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java @@ -4,11 +4,12 @@ import java.util.Calendar; import javax.swing.JScrollPane; import javax.swing.JSpinner; +import javax.swing.JTextArea; import javax.swing.JTextField; -import javax.swing.JEditorPane; import javax.swing.SpinnerDateModel; import javax.swing.text.DateFormatter; + import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.control.QDatePickerImpl; import org.openslx.dozmod.gui.control.QLabel; @@ -17,7 +18,6 @@ import org.openslx.dozmod.gui.helper.I18n; import org.openslx.dozmod.gui.wizard.Wizard; import org.openslx.dozmod.gui.wizard.WizardPage; -import java.awt.Dimension; public abstract class LectureCreationPageLayout extends WizardPage { @@ -27,7 +27,7 @@ public abstract class LectureCreationPageLayout extends WizardPage { private static final long serialVersionUID = 422592252404059239L; protected final JTextField txtName; - protected final JEditorPane txtDescription; + protected final JTextArea txtDescription; protected final QDatePickerImpl dtpStartDate; protected final QDatePickerImpl dtpEndDate; protected final JSpinner spnStartTime; @@ -51,14 +51,14 @@ public abstract class LectureCreationPageLayout extends WizardPage { grid.nextRow(); // description - txtDescription = new JEditorPane(); - txtDescription.setPreferredSize(new Dimension(600,800)); - JScrollPane descPane = new JScrollPane(txtDescription, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, - JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - txtDescription.setMinimumSize(Gui.getScaledDimension(0, 60)); - descPane.setMinimumSize(txtDescription.getMinimumSize()); + txtDescription = new JTextArea(3, 50); + txtDescription.setLineWrap(true); + txtDescription.setWrapStyleWord(true); + txtDescription.setMinimumSize(Gui.getScaledDimension(0, 70)); grid.add(new QLabel(I18n.PAGE_LAYOUT.getString("LectureCreation.Label.description.text"))); - grid.add(descPane, 2).fill(true, false).expand(true, false); + JScrollPane descPane = new JScrollPane(txtDescription, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, + JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); + grid.add(descPane, 2).fill(true, true).expand(true, true); grid.nextRow(); // Start date/time |