summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java104
1 files changed, 0 insertions, 104 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java
index 68beb655..f2010da1 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java
@@ -4,19 +4,6 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.Collections;
import java.util.List;
-import java.awt.Color;
-
-import javax.swing.Action;
-import javax.swing.text.BadLocationException;
-import javax.swing.text.StyledEditorKit;
-import javax.swing.text.html.HTML;
-import javax.swing.text.html.HTMLDocument;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.io.IOException;
import org.apache.log4j.Logger;
import org.openslx.bwlp.thrift.iface.OperatingSystem;
@@ -89,97 +76,6 @@ import java.util.List;
reactToUserInput();
}
});
-
- 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)));
- }
- });
-
- 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");
-
- 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();
- }
- }
- }
- });
}