summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java106
1 files changed, 0 insertions, 106 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java
index dbbdec5e..b98023b0 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java
@@ -8,9 +8,6 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import java.io.IOException;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
@@ -20,18 +17,11 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import javax.swing.Action;
import javax.swing.DefaultComboBoxModel;
-import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
-import javax.swing.text.BadLocationException;
-import javax.swing.text.StyledEditorKit;
-import javax.swing.text.html.HTML;
-import javax.swing.text.html.HTMLDocument;
-import org.apache.commons.codec.language.ColognePhonetic;
import org.apache.log4j.Logger;
import org.apache.thrift.TException;
import org.openslx.bwlp.thrift.iface.ImageDetailsRead;
@@ -277,102 +267,6 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
}
});
- cbTxtSize.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- int size = Integer.parseInt((String) cbTxtSize.getSelectedItem());
- Action act = new StyledEditorKit.FontSizeAction(String.valueOf(size),size);
- act.actionPerformed(new ActionEvent(act,ActionEvent.ACTION_PERFORMED,
- (String)act.getValue(Action.ACTION_COMMAND_KEY)));
- }
- });
-
- cbTxtColor.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- String color = (String) cbTxtColor.getSelectedItem();
- Action act = null;
-
- switch(color) {
- case "Black":
- act = new StyledEditorKit.ForegroundAction("Black", Color.black);
- break;
- case "Blue":
- act = new StyledEditorKit.ForegroundAction("Blue", Color.blue);
- break;
- case "Yellow":
- act = new StyledEditorKit.ForegroundAction("Yellow", Color.yellow);
- break;
- case "Red":
- act = new StyledEditorKit.ForegroundAction("Red", Color.red);
- break;
- case "Green":
- act = new StyledEditorKit.ForegroundAction("Green", Color.green);
- break;
- }
-
- act.actionPerformed(new ActionEvent(act,ActionEvent.ACTION_PERFORMED,
- (String)act.getValue(Action.ACTION_COMMAND_KEY)));
- }
- });
-
- // change button for html to Wysiwyg
- btnWysiwyg.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- String tmp = txtDescription.getText();
- if (txtDescription.getContentType().equals("text/html")) {
- txtDescription.setContentType("text/plain");
- txtDescription.setText(tmp);
- btnWysiwyg.setText("Wysiwyg");
- if (ImagePerms.canEdit(image) || ImagePerms.canAdmin(image)) {
- btnSaveChanges.setEnabled(true);
- }
-
- btnBold.setEnabled(false);
- btnUnderline.setEnabled(false);
- btnItalic.setEnabled(false);
- cbTxtColor.setEnabled(false);
- cbTxtSize.setEnabled(false);
- } else {
- txtDescription.setContentType("text/html");
- txtDescription.setText(tmp);
- btnWysiwyg.setText("Html");
-
- btnBold.setEnabled(true);
- btnUnderline.setEnabled(true);
- btnItalic.setEnabled(true);
- cbTxtColor.setEnabled(true);
- cbTxtSize.setEnabled(true);
- }
- }
- });
-
- txtDescription.addKeyListener(new KeyListener() {
- @Override
- public void keyPressed(KeyEvent e) {
- }
-
- @Override
- public void keyTyped(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- if (e.getKeyCode() == KeyEvent.VK_ENTER && txtDescription.getContentType().equals("text/html")) {
- try {
- kit.insertHTML((HTMLDocument) txtDescription.getDocument(), txtDescription.getCaretPosition(),
- "<br>", 0, 0, HTML.Tag.BR);
- txtDescription.setCaretPosition(txtDescription.getCaretPosition()); // This moves caret to next
- // line
- } catch (BadLocationException | IOException ex) {
- ex.printStackTrace();
- }
- }
- }
- });
-
-
// Update default permissions in the permission manager immediately, so it
// affects
// newly added users