summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java35
1 files changed, 31 insertions, 4 deletions
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 c184b3e2..07a4887f 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
@@ -1,16 +1,19 @@
package org.openslx.dozmod.gui.wizard.layout;
import java.util.Calendar;
+import java.awt.FlowLayout;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTextField;
import javax.swing.JPanel;
import javax.swing.JButton;
+import javax.swing.JComboBox;
import javax.swing.JEditorPane;
import javax.swing.SpinnerDateModel;
import javax.swing.text.DateFormatter;
import javax.swing.text.StyledEditorKit;
+import javax.swing.text.html.HTMLEditorKit;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.QDatePickerImpl;
@@ -36,6 +39,12 @@ public abstract class LectureCreationPageLayout extends WizardPage {
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;
+
/**
* Page for creating lectures
@@ -55,27 +64,45 @@ public abstract class LectureCreationPageLayout extends WizardPage {
// buttons for text editing
JPanel editingPanel = new JPanel();
- editingPanel.setLayout(new GridLayout(1, 3));
+ 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", 24, this));
+ 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", 24, this));
+ 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", 24, this));
+ 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
txtDescription = new JEditorPane();
+ kit = new HTMLEditorKit();
+ txtDescription.setEditorKit(kit);
txtDescription.setContentType("text/html");
txtDescription.setPreferredSize(new Dimension(600,800));
JScrollPane descPane = new JScrollPane(txtDescription, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,