summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/GUI
diff options
context:
space:
mode:
authorunknown2014-02-19 12:41:49 +0100
committerunknown2014-02-19 12:41:49 +0100
commitbe5d86c202129b841ef448f7f02d3661597ecc24 (patch)
treecc1552e4cd02a91e4164144fc2d50ed60e3356bc /Dozentenmodul/src/GUI
parentSQL für VL funktioniert (diff)
downloadtutor-module-be5d86c202129b841ef448f7f02d3661597ecc24.tar.gz
tutor-module-be5d86c202129b841ef448f7f02d3661597ecc24.tar.xz
tutor-module-be5d86c202129b841ef448f7f02d3661597ecc24.zip
Es ist nun möglich auf der Datenbank basierend VLs sowie Veranstaltungen neu anzulegen
Diffstat (limited to 'Dozentenmodul/src/GUI')
-rw-r--r--Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java15
-rw-r--r--Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java337
-rw-r--r--Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java320
-rw-r--r--Dozentenmodul/src/GUI/FTPUploader_GUI.java2
-rw-r--r--Dozentenmodul/src/GUI/LinkImage_GUI.java457
-rw-r--r--Dozentenmodul/src/GUI/MainMenue_GUI.java8
-rw-r--r--Dozentenmodul/src/GUI/SearchImage_GUI.java151
-rw-r--r--Dozentenmodul/src/GUI/Summary.java26
8 files changed, 1255 insertions, 61 deletions
diff --git a/Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java b/Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java
index 6926bc90..7af8f595 100644
--- a/Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java
+++ b/Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java
@@ -1,6 +1,5 @@
package GUI;
-
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Toolkit;
@@ -125,7 +124,7 @@ public class EditImageAllgemein_GUI extends JFrame {
Vorname = new JTextField();
Vorname.setBackground(Color.WHITE);
- Vorname.setText((String) null);
+ Vorname.setText(person.verantowrtlicher.getVorname());
Vorname.setColumns(10);
Vorname.setBounds(145, 183, 350, 20);
panel_1.add(Vorname);
@@ -137,7 +136,7 @@ public class EditImageAllgemein_GUI extends JFrame {
Nachname = new JTextField();
Nachname.setBackground(Color.WHITE);
- Nachname.setText((String) null);
+ Nachname.setText(person.verantowrtlicher.getName());
Nachname.setColumns(10);
Nachname.setBounds(145, 214, 350, 20);
panel_1.add(Nachname);
@@ -149,7 +148,7 @@ public class EditImageAllgemein_GUI extends JFrame {
Hochschule = new JTextField();
Hochschule.setBackground(Color.WHITE);
- Hochschule.setText((String) null);
+ Hochschule.setText(person.verantowrtlicher.getHochschule());
Hochschule.setColumns(10);
Hochschule.setBounds(145, 245, 350, 20);
panel_1.add(Hochschule);
@@ -161,7 +160,7 @@ public class EditImageAllgemein_GUI extends JFrame {
EMail = new JTextField();
EMail.setBackground(Color.WHITE);
- EMail.setText((String) null);
+ EMail.setText(person.verantowrtlicher.getEMail());
EMail.setColumns(10);
EMail.setBounds(145, 276, 350, 20);
panel_1.add(EMail);
@@ -173,7 +172,7 @@ public class EditImageAllgemein_GUI extends JFrame {
Tel = new JTextField();
Tel.setBackground(Color.WHITE);
- Tel.setText((String) null);
+ Tel.setText(person.verantowrtlicher.getTel());
Tel.setColumns(10);
Tel.setBounds(145, 307, 350, 20);
panel_1.add(Tel);
@@ -185,7 +184,7 @@ public class EditImageAllgemein_GUI extends JFrame {
Fak = new JTextField();
Fak.setBackground(Color.WHITE);
- Fak.setText((String) null);
+ Fak.setText(person.verantowrtlicher.getFakultät());
Fak.setColumns(10);
Fak.setBounds(145, 338, 350, 20);
panel_1.add(Fak);
@@ -197,7 +196,7 @@ public class EditImageAllgemein_GUI extends JFrame {
imagename = new JTextField();
imagename.setBackground(Color.WHITE);
- imagename.setText((String) null);
+ imagename.setText(Image.image.getImagename());
imagename.setColumns(10);
imagename.setBounds(145, 31, 350, 20);
panel_1.add(imagename);
diff --git a/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java b/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java
new file mode 100644
index 00000000..32cdd288
--- /dev/null
+++ b/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java
@@ -0,0 +1,337 @@
+package GUI;
+
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Toolkit;
+import javax.swing.JFrame;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.border.EmptyBorder;
+import java.awt.Color;
+import javax.swing.JLabel;
+import java.awt.Font;
+import javax.swing.JTextPane;
+import java.awt.SystemColor;
+import javax.swing.JTextField;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import javax.swing.JSeparator;
+import javax.swing.JMenuBar;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+
+import Models.Image;
+import Models.Lecture;
+import Models.person;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import javax.swing.border.TitledBorder;
+import javax.swing.JTextArea;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+@SuppressWarnings("serial")
+public class EingabeVeranstaltungAllgemein_GUI extends JFrame {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ private JTextField Vorname;
+ private JTextField Nachname;
+ private JTextField Hochschule;
+ private JTextField EMail;
+ private JTextField Tel;
+ private JTextField Fak;
+ private JTextField imagename;
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ EingabeVeranstaltungAllgemein_GUI dialog = new EingabeVeranstaltungAllgemein_GUI();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public EingabeVeranstaltungAllgemein_GUI() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent arg0) {
+ System.exit(0);
+ }
+ });
+ setResizable(false);
+
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setTitle("bwLehrpool Suite *Prototyp*");
+ Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+ int top=(screenSize.height - 603) / 2;
+ int left=(screenSize.width - 722) / 2;
+ setBounds(left, top, 603, 722);
+ //setBounds(100, 100, 603, 722);
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBackground(SystemColor.menu);
+ panel.setBounds(10, 11, 577, 57);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten");
+ lblNewLabel.setBounds(10, 11, 509, 22);
+ panel.add(lblNewLabel);
+ lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
+ }
+
+ JTextPane txtpnBitteWhlenSie = new JTextPane();
+ txtpnBitteWhlenSie.setEditable(false);
+ txtpnBitteWhlenSie.setBackground(SystemColor.menu);
+ txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an");
+ txtpnBitteWhlenSie.setBounds(10, 36, 509, 32);
+ panel.add(txtpnBitteWhlenSie);
+ }
+ contentPanel.setBounds(10, 85, 577, 493);
+ contentPanel.setBackground(SystemColor.menu);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ JPanel panel_1 = new JPanel();
+ panel_1.setBackground(SystemColor.menu);
+ panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null));
+ panel_1.setBounds(10, 66, 557, 369);
+ contentPanel.add(panel_1);
+ panel_1.setLayout(null);
+
+ JLabel label = new JLabel("Vorname: *");
+ label.setBackground(SystemColor.menu);
+ label.setBounds(10, 183, 125, 20);
+ panel_1.add(label);
+
+ Vorname = new JTextField();
+ Vorname.setBackground(Color.WHITE);
+ Vorname.setText((String) null);
+ Vorname.setColumns(10);
+ Vorname.setBounds(145, 183, 350, 20);
+ panel_1.add(Vorname);
+
+ JLabel label_7 = new JLabel("Nachname: *");
+ label_7.setBackground(SystemColor.menu);
+ label_7.setBounds(10, 214, 125, 20);
+ panel_1.add(label_7);
+
+ Nachname = new JTextField();
+ Nachname.setBackground(Color.WHITE);
+ Nachname.setText((String) null);
+ Nachname.setColumns(10);
+ Nachname.setBounds(145, 214, 350, 20);
+ panel_1.add(Nachname);
+
+ JLabel label_8 = new JLabel("Hochschule: *");
+ label_8.setBackground(SystemColor.menu);
+ label_8.setBounds(10, 245, 125, 20);
+ panel_1.add(label_8);
+
+ Hochschule = new JTextField();
+ Hochschule.setBackground(Color.WHITE);
+ Hochschule.setText((String) null);
+ Hochschule.setColumns(10);
+ Hochschule.setBounds(145, 245, 350, 20);
+ panel_1.add(Hochschule);
+
+ JLabel label_9 = new JLabel("E-Mail: *");
+ label_9.setBackground(SystemColor.menu);
+ label_9.setBounds(10, 276, 125, 20);
+ panel_1.add(label_9);
+
+ EMail = new JTextField();
+ EMail.setBackground(Color.WHITE);
+ EMail.setText((String) null);
+ EMail.setColumns(10);
+ EMail.setBounds(145, 276, 350, 20);
+ panel_1.add(EMail);
+
+ JLabel label_10 = new JLabel("Tel.-Nummer:");
+ label_10.setBackground(SystemColor.menu);
+ label_10.setBounds(10, 307, 125, 20);
+ panel_1.add(label_10);
+
+ Tel = new JTextField();
+ Tel.setBackground(Color.WHITE);
+ Tel.setText((String) null);
+ Tel.setColumns(10);
+ Tel.setBounds(145, 307, 350, 20);
+ panel_1.add(Tel);
+
+ JLabel lblFakulttinstitution = new JLabel("Fakult\u00E4t/Institution:");
+ lblFakulttinstitution.setBackground(SystemColor.menu);
+ lblFakulttinstitution.setBounds(10, 338, 125, 20);
+ panel_1.add(lblFakulttinstitution);
+
+ Fak = new JTextField();
+ Fak.setBackground(Color.WHITE);
+ Fak.setText((String) null);
+ Fak.setColumns(10);
+ Fak.setBounds(145, 338, 350, 20);
+ panel_1.add(Fak);
+
+ JLabel lblImagename = new JLabel("Veranstaltungsname: *");
+ lblImagename.setBackground(SystemColor.menu);
+ lblImagename.setBounds(10, 31, 125, 20);
+ panel_1.add(lblImagename);
+
+ imagename = new JTextField();
+ imagename.setBackground(Color.WHITE);
+ imagename.setText((String) null);
+ imagename.setColumns(10);
+ imagename.setBounds(145, 31, 350, 20);
+ panel_1.add(imagename);
+
+ JTextArea txtrGebenSieBitte = new JTextArea();
+ txtrGebenSieBitte.setBackground(SystemColor.menu);
+ txtrGebenSieBitte.setLineWrap(true);
+ txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12));
+ txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\"");
+ txtrGebenSieBitte.setBounds(145, 62, 350, 110);
+ panel_1.add(txtrGebenSieBitte);
+
+ JPanel panel = new JPanel();
+ panel.setBounds(10, 402, 577, 33);
+ contentPanel.add(panel);
+ panel.setLayout(null);
+ panel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ panel.setBackground(SystemColor.menu);
+
+ JLabel lblPflichtfelder = new JLabel("* Pflichtfelder");
+ lblPflichtfelder.setBounds(10, 442, 136, 14);
+ contentPanel.add(lblPflichtfelder);
+
+ JLabel lblHauptmen = new JLabel("Hauptmen\u00FC");
+ lblHauptmen.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent arg0) {
+
+ EingabeVeranstaltungAllgemein_GUI.this.setVisible(false);
+ MainMenue_GUI main=new MainMenue_GUI();
+ main.setVisible(true);
+ }
+ });
+ lblHauptmen.setForeground(Color.BLUE);
+ lblHauptmen.setBounds(10, 11, 61, 14);
+ contentPanel.add(lblHauptmen);
+
+ JLabel label_1 = new JLabel(">");
+ label_1.setBounds(69, 11, 13, 14);
+ contentPanel.add(label_1);
+
+ JLabel lblVlimage = new JLabel("VL-Image");
+ lblVlimage.setForeground(Color.BLUE);
+ lblVlimage.setBounds(81, 11, 45, 14);
+ contentPanel.add(lblVlimage);
+
+ JLabel label_2 = new JLabel(">");
+ label_2.setBounds(133, 11, 13, 14);
+ contentPanel.add(label_2);
+
+ JLabel lblNewLabel_1 = new JLabel("Neu");
+ lblNewLabel_1.setBounds(146, 11, 46, 14);
+ contentPanel.add(lblNewLabel_1);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 640, 597, 33);
+ buttonPane.setBackground(SystemColor.menu);
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ getContentPane().add(buttonPane);
+ {
+ JButton okButton = new JButton("Zur\u00FCck");
+ okButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ person.verantowrtlicher.setVorname(Vorname.getText());
+ person.verantowrtlicher.setName(Nachname.getText());
+ person.verantowrtlicher.setEMail(EMail.getText());
+ person.verantowrtlicher.setFakultät(Fak.getText());
+ person.verantowrtlicher.setHochschule(Hochschule.getText());
+ person.verantowrtlicher.setTel(Tel.getText());
+ Lecture.lecture.setName(imagename.getText());
+
+ MainMenue_GUI sr=new MainMenue_GUI();
+ sr.setVisible(true);
+ dispose();
+ }
+ });
+ okButton.setActionCommand("OK");
+ buttonPane.add(okButton);
+ getRootPane().setDefaultButton(okButton);
+ }
+ {
+ JButton cancelButton = new JButton("Weiter");
+ cancelButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ if(Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false)
+ {
+ person.verantowrtlicher.setVorname(Vorname.getText());
+ person.verantowrtlicher.setName(Nachname.getText());
+ person.verantowrtlicher.setEMail(EMail.getText());
+ person.verantowrtlicher.setFakultät(Fak.getText());
+ person.verantowrtlicher.setHochschule(Hochschule.getText());
+ person.verantowrtlicher.setTel(Tel.getText());
+ Lecture.lecture.setName(imagename.getText());
+ EingabeVeranstatlungTechnisch_GUI ea=new EingabeVeranstatlungTechnisch_GUI();
+ ea.setVisible(true);
+ dispose();
+ }
+ else{
+ JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!",
+ "Error", JOptionPane.ERROR_MESSAGE);
+ }
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 78, 597, 2);
+ getContentPane().add(separator);
+
+ JSeparator separator_1 = new JSeparator();
+ separator_1.setBounds(0, 627, 597, 2);
+ getContentPane().add(separator_1);
+
+ JMenuBar menuBar = new JMenuBar();
+ setJMenuBar(menuBar);
+
+ JMenu mnNewMenu = new JMenu("Suchen");
+ menuBar.add(mnNewMenu);
+
+ JMenuItem mntmVlSuche = new JMenuItem("VL Suche");
+ mnNewMenu.add(mntmVlSuche);
+
+ JMenu mnNewMenu_1 = new JMenu("Hilfe");
+ menuBar.add(mnNewMenu_1);
+
+ JMenuItem mntmFaq = new JMenuItem("FAQ");
+ mnNewMenu_1.add(mntmFaq);
+
+ JMenuItem mntmOtrs = new JMenuItem("OTRS");
+ mnNewMenu_1.add(mntmOtrs);
+
+ }
+}
diff --git a/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java b/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java
new file mode 100644
index 00000000..a8e581a5
--- /dev/null
+++ b/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java
@@ -0,0 +1,320 @@
+package GUI;
+
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Toolkit;
+import javax.swing.JFrame;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.border.EmptyBorder;
+import java.awt.Color;
+import javax.swing.JLabel;
+import java.awt.Font;
+import javax.swing.JTextPane;
+import java.awt.SystemColor;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import javax.swing.JSeparator;
+import javax.swing.JMenuBar;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import Models.Image;
+import Models.Lecture;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import javax.swing.border.TitledBorder;
+import javax.swing.JTextArea;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.JRadioButton;
+import javax.swing.ButtonGroup;
+import javax.swing.JSpinner;
+import javax.swing.SpinnerNumberModel;
+import javax.swing.JTextField;
+import java.awt.ScrollPane;
+import com.toedter.calendar.JDateChooser;
+
+@SuppressWarnings("serial")
+public class EingabeVeranstatlungTechnisch_GUI extends JFrame {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ private final ButtonGroup buttonGrouplicense = new ButtonGroup();
+ private final ButtonGroup buttonGroupInternet = new ButtonGroup();
+ private JTextField textFieldLaborname;
+ JRadioButton rdbtnJa;
+ JDateChooser dateChooserend;
+ JDateChooser dateChooserstart;
+ JTextArea textAreashort;
+ JTextArea textArealong;
+ private final ButtonGroup buttonGroup = new ButtonGroup();
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ EingabeVeranstatlungTechnisch_GUI dialog = new EingabeVeranstatlungTechnisch_GUI();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public EingabeVeranstatlungTechnisch_GUI() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent arg0) {
+ System.exit(0);
+ }
+ });
+ setResizable(false);
+
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setTitle("bwLehrpool Suite *Prototyp*");
+ Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+ int top=(screenSize.height - 603) / 2;
+ int left=(screenSize.width - 722) / 2;
+ setBounds(left, top, 603, 722);
+ //setBounds(100, 100, 603, 722);
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBackground(SystemColor.menu);
+ panel.setBounds(10, 11, 577, 57);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Dateneingabe f\u00FCr Veranstaltung");
+ lblNewLabel.setBounds(10, 11, 509, 22);
+ panel.add(lblNewLabel);
+ lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
+ }
+
+ JTextPane txtpnBitteWhlenSie = new JTextPane();
+ txtpnBitteWhlenSie.setEditable(false);
+ txtpnBitteWhlenSie.setBackground(SystemColor.menu);
+ txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an");
+ txtpnBitteWhlenSie.setBounds(10, 36, 509, 32);
+ panel.add(txtpnBitteWhlenSie);
+ }
+ contentPanel.setBounds(10, 85, 577, 531);
+ contentPanel.setBackground(SystemColor.menu);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ JLabel lblHauptmen = new JLabel("Hauptmen\u00FC");
+ lblHauptmen.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent arg0) {
+
+ EingabeVeranstatlungTechnisch_GUI.this.setVisible(false);
+ MainMenue_GUI main=new MainMenue_GUI();
+ main.setVisible(true);
+ }
+ });
+ lblHauptmen.setForeground(Color.BLUE);
+ lblHauptmen.setBounds(10, 11, 61, 14);
+ contentPanel.add(lblHauptmen);
+
+ JLabel label_1 = new JLabel(">");
+ label_1.setBounds(69, 11, 13, 14);
+ contentPanel.add(label_1);
+
+ JLabel lblVlimage = new JLabel("Veranstaltung ");
+ lblVlimage.setForeground(Color.BLUE);
+ lblVlimage.setBounds(81, 11, 74, 14);
+ contentPanel.add(lblVlimage);
+
+ JLabel label_2 = new JLabel(">");
+ label_2.setBounds(152, 11, 13, 14);
+ contentPanel.add(label_2);
+
+ JLabel lblNewLabel_1 = new JLabel("Neu");
+ lblNewLabel_1.setBounds(165, 11, 46, 14);
+ contentPanel.add(lblNewLabel_1);
+
+ JLabel lblLabornameanzeigename = new JLabel("Laborname (Anzeigename): *");
+ lblLabornameanzeigename.setBounds(10, 57, 250, 14);
+ contentPanel.add(lblLabornameanzeigename);
+
+ textFieldLaborname = new JTextField();
+ textFieldLaborname.setBounds(270, 54, 307, 20);
+ contentPanel.add(textFieldLaborname);
+ textFieldLaborname.setColumns(10);
+
+ JLabel lblKurzbeschreibung = new JLabel("Kurzbeschreibung: *");
+ lblKurzbeschreibung.setBounds(10, 109, 250, 14);
+ contentPanel.add(lblKurzbeschreibung);
+
+ ScrollPane scrollPane = new ScrollPane();
+ scrollPane.setBounds(270, 109, 307, 137);
+ contentPanel.add(scrollPane);
+
+ textAreashort = new JTextArea();
+ textAreashort.setLineWrap(true);
+ scrollPane.add(textAreashort);
+ textAreashort.setBounds(0, 0, 4, 22);
+
+ ScrollPane scrollPane_1 = new ScrollPane();
+ scrollPane_1.setBounds(270, 249, 307, 137);
+ contentPanel.add(scrollPane_1);
+
+ textArealong = new JTextArea();
+ textArealong.setLineWrap(true);
+ textArealong.setBounds(0, 0, 4, 22);
+ scrollPane_1.add(textArealong);
+
+ JLabel label = new JLabel("Kurzbeschreibung: *");
+ label.setBounds(0, 252, 250, 14);
+ contentPanel.add(label);
+
+ JLabel lblGltigkeitsdatum = new JLabel("G\u00FCltigkeitsdatum: *");
+ lblGltigkeitsdatum.setBounds(0, 397, 250, 14);
+ contentPanel.add(lblGltigkeitsdatum);
+
+ JLabel lblVon = new JLabel("von:");
+ lblVon.setBounds(270, 394, 30, 20);
+ contentPanel.add(lblVon);
+
+ dateChooserstart = new JDateChooser();
+ dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss");
+ dateChooserstart.setBounds(332, 391, 101, 20);
+ contentPanel.add(dateChooserstart);
+
+ JLabel lblBis = new JLabel("bis");
+ lblBis.setBounds(443, 394, 24, 20);
+ contentPanel.add(lblBis);
+
+ dateChooserend = new JDateChooser();
+ dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss");
+ dateChooserend.setBounds(477, 392, 100, 20);
+ contentPanel.add(dateChooserend);
+
+ JLabel lblAktiv = new JLabel("Aktiv:");
+ lblAktiv.setBounds(0, 450, 250, 14);
+ contentPanel.add(lblAktiv);
+
+ JLabel lblimVmchooserSichtbar = new JLabel("(Im VMChooser sichtbar)");
+ lblimVmchooserSichtbar.setBounds(0, 475, 250, 14);
+ contentPanel.add(lblimVmchooserSichtbar);
+
+ rdbtnJa = new JRadioButton("Ja");
+ rdbtnJa.setSelected(true);
+ buttonGroup.add(rdbtnJa);
+ rdbtnJa.setBounds(270, 446, 109, 23);
+ contentPanel.add(rdbtnJa);
+
+ JRadioButton rdbtnNein = new JRadioButton("Nein");
+ buttonGroup.add(rdbtnNein);
+ rdbtnNein.setBounds(381, 446, 109, 23);
+ contentPanel.add(rdbtnNein);
+ //contentPanel.add(textArea);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 640, 597, 33);
+ buttonPane.setBackground(SystemColor.menu);
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ getContentPane().add(buttonPane);
+ {
+ JButton okButton = new JButton("Zur\u00FCck");
+ okButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+
+ if(rdbtnJa.isSelected()==true)
+ {
+ Lecture.lecture.setActive(true);
+ }
+ else
+ {
+ Lecture.lecture.setActive(false);
+ }
+
+ Lecture.lecture.setName(textFieldLaborname.getText());
+ Lecture.lecture.setDesc(textArealong.getText());
+ Lecture.lecture.setEnddate(dateChooserend.getDate());
+ Lecture.lecture.setShortDesc(textAreashort.getText());
+ Lecture.lecture.setStartdate(dateChooserstart.getDate());
+
+
+ EingabeVeranstaltungAllgemein_GUI sr=new EingabeVeranstaltungAllgemein_GUI();
+ sr.setVisible(true);
+ dispose();
+ }
+ });
+ okButton.setActionCommand("OK");
+ buttonPane.add(okButton);
+ getRootPane().setDefaultButton(okButton);
+ }
+ {
+ JButton cancelButton = new JButton("Weiter");
+ cancelButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ if(rdbtnJa.isSelected()==true)
+ {
+ Lecture.lecture.setActive(true);
+ }
+ else
+ {
+ Lecture.lecture.setActive(false);
+ }
+
+ Lecture.lecture.setName(textFieldLaborname.getText());
+ Lecture.lecture.setDesc(textArealong.getText());
+ Lecture.lecture.setEnddate(dateChooserend.getDate());
+ Lecture.lecture.setShortDesc(textAreashort.getText());
+ Lecture.lecture.setStartdate(dateChooserstart.getDate());
+ LinkImage_GUI ea=new LinkImage_GUI();
+ ea.setVisible(true);
+ dispose();
+
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 78, 597, 2);
+ getContentPane().add(separator);
+
+ JSeparator separator_1 = new JSeparator();
+ separator_1.setBounds(0, 627, 597, 2);
+ getContentPane().add(separator_1);
+
+ JMenuBar menuBar = new JMenuBar();
+ setJMenuBar(menuBar);
+
+ JMenu mnNewMenu = new JMenu("Suchen");
+ menuBar.add(mnNewMenu);
+
+ JMenuItem mntmVlSuche = new JMenuItem("VL Suche");
+ mnNewMenu.add(mntmVlSuche);
+
+ JMenu mnNewMenu_1 = new JMenu("Hilfe");
+ menuBar.add(mnNewMenu_1);
+
+ JMenuItem mntmFaq = new JMenuItem("FAQ");
+ mnNewMenu_1.add(mntmFaq);
+
+ JMenuItem mntmOtrs = new JMenuItem("OTRS");
+ mnNewMenu_1.add(mntmOtrs);
+
+ }
+}
diff --git a/Dozentenmodul/src/GUI/FTPUploader_GUI.java b/Dozentenmodul/src/GUI/FTPUploader_GUI.java
index 33b31667..4280a8d8 100644
--- a/Dozentenmodul/src/GUI/FTPUploader_GUI.java
+++ b/Dozentenmodul/src/GUI/FTPUploader_GUI.java
@@ -268,6 +268,8 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener {
public void actionPerformed(ActionEvent e) {
writeData();
dispose();
+ MainMenue_GUI m=new MainMenue_GUI();
+ m.setVisible(true);
if(taskrun==true)
{
try {
diff --git a/Dozentenmodul/src/GUI/LinkImage_GUI.java b/Dozentenmodul/src/GUI/LinkImage_GUI.java
new file mode 100644
index 00000000..ec93a629
--- /dev/null
+++ b/Dozentenmodul/src/GUI/LinkImage_GUI.java
@@ -0,0 +1,457 @@
+package GUI;
+
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Toolkit;
+import javax.swing.JFrame;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.ScrollPaneLayout;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.border.Border;
+import javax.swing.border.EmptyBorder;
+import java.awt.Color;
+import javax.swing.JLabel;
+import java.awt.Font;
+import javax.swing.JTextPane;
+import java.awt.SystemColor;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import javax.swing.JSeparator;
+import javax.swing.JMenuBar;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import Models.Image;
+import Models.Lecture;
+import Models.person;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import javax.swing.border.TitledBorder;
+import javax.swing.JTextArea;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.JRadioButton;
+import javax.swing.ButtonGroup;
+import javax.swing.JSpinner;
+import javax.swing.SpinnerNumberModel;
+import javax.swing.JTextField;
+import javax.swing.JTabbedPane;
+import java.awt.Panel;
+import javax.swing.JTable;
+import javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableModel;
+import javax.swing.JScrollPane;
+
+import rmi.RmiClientMethods;
+import server.ServerInterface;
+
+import java.awt.ScrollPane;
+import java.rmi.RemoteException;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.JComboBox;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+
+@SuppressWarnings("serial")
+public class LinkImage_GUI extends JFrame {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ JRadioButton rdbtnInternetJa;
+ JRadioButton rdbtnInternetNein;
+ JComboBox comboBox;
+ JTable tableAllImages;
+ private final ButtonGroup buttonGrouplicense = new ButtonGroup();
+ private final ButtonGroup buttonGroupInternet = new ButtonGroup();
+ private JTextField textFieldName;
+ String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort"};
+ RmiClientMethods rmi=new RmiClientMethods();
+ ServerInterface sint=rmi.getInterface();
+
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ LinkImage_GUI dialog = new LinkImage_GUI();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public LinkImage_GUI() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent arg0) {
+ System.exit(0);
+ }
+ });
+ setResizable(false);
+
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setTitle("bwLehrpool Suite *Prototyp*");
+ Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+ int top=(screenSize.height - 603) / 2;
+ int left=(screenSize.width - 722) / 2;
+ setBounds(left, top, 603, 722);
+ //setBounds(100, 100, 603, 722);
+
+
+ final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 );
+ final DefaultTableModel model = new DefaultTableModel( titles, 0 );
+
+
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBackground(SystemColor.menu);
+ panel.setBounds(10, 11, 577, 57);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Suche nach VL-Image");
+ lblNewLabel.setBounds(10, 11, 509, 22);
+ panel.add(lblNewLabel);
+ lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
+ }
+
+ JTextPane txtpnBitteWhlenSie = new JTextPane();
+ txtpnBitteWhlenSie.setEditable(false);
+ txtpnBitteWhlenSie.setBackground(SystemColor.menu);
+ txtpnBitteWhlenSie.setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen");
+ txtpnBitteWhlenSie.setBounds(10, 36, 509, 32);
+ panel.add(txtpnBitteWhlenSie);
+ }
+ contentPanel.setBounds(10, 85, 577, 531);
+ contentPanel.setBackground(SystemColor.menu);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ JPanel panel_1 = new JPanel();
+ panel_1.setBackground(SystemColor.menu);
+ panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", TitledBorder.LEADING, TitledBorder.TOP, null, null));
+ panel_1.setBounds(10, 49, 557, 131);
+ contentPanel.add(panel_1);
+ panel_1.setLayout(null);
+
+ JLabel lblNewLabel_2 = new JLabel("Anzeigename:");
+ lblNewLabel_2.setBounds(10, 30, 250, 20);
+ panel_1.add(lblNewLabel_2);
+
+ JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:");
+ lblInternetIstInnerhalb.setBounds(10, 58, 250, 20);
+ panel_1.add(lblInternetIstInnerhalb);
+
+ textFieldName = new JTextField();
+ textFieldName.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyReleased(KeyEvent e) {
+ String stext=textFieldName.getText();
+ modelAll.setRowCount(0);
+ initTableModel(modelAll);
+
+ if(stext!="")
+ for(int i=0;i<modelAll.getRowCount();i++){
+
+ if(modelAll.getValueAt(i, 0).toString().startsWith(stext)){
+
+ }
+ else
+ {
+ modelAll.removeRow(i);
+ }
+ }
+
+
+ }
+
+
+ });
+
+ textFieldName.setBounds(270, 30, 250, 20);
+ panel_1.add(textFieldName);
+ textFieldName.setColumns(10);
+
+ JLabel lblErweiterteSuche = new JLabel("<html><u>Erweiterte Suche</u></html>");
+ lblErweiterteSuche.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent arg0) {
+ ExtendedSearch_GUI es=new ExtendedSearch_GUI();
+ es.setVisible(true);
+ }
+ });
+ lblErweiterteSuche.setForeground(Color.BLUE);
+
+ lblErweiterteSuche.setBounds(431, 106, 89, 14);
+ panel_1.add(lblErweiterteSuche);
+
+ comboBox = new JComboBox();
+ try {
+ List<String> list=sint.getAllOS();
+ comboBox.addItem("");
+ for(int i=0;i<list.size();i++)
+ {
+ comboBox.addItem(list.get(i));
+ }
+ } catch (RemoteException e2) {
+ // TODO Auto-generated catch block
+ e2.printStackTrace();
+ }
+ comboBox.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ modelAll.setRowCount(0);
+ initTableModel(modelAll);
+ String selItem=comboBox.getSelectedItem().toString();
+ if(selItem!="")
+ {
+ for(int i=0;i<modelAll.getRowCount();i++){
+
+ if(modelAll.getValueAt(i, 2).equals(selItem)){
+
+ }
+ else
+ {
+ modelAll.removeRow(i);
+ }
+ }
+
+
+ }
+ }
+ });
+ comboBox.setBounds(270, 58, 250, 20);
+ panel_1.add(comboBox);
+
+ JLabel lblHauptmen = new JLabel("Hauptmen\u00FC");
+ lblHauptmen.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent arg0) {
+
+ LinkImage_GUI.this.setVisible(false);
+ MainMenue_GUI main=new MainMenue_GUI();
+ main.setVisible(true);
+ }
+ });
+ lblHauptmen.setForeground(Color.BLUE);
+ lblHauptmen.setBounds(10, 11, 61, 14);
+ contentPanel.add(lblHauptmen);
+
+ JLabel label_1 = new JLabel(">");
+ label_1.setBounds(69, 11, 13, 14);
+ contentPanel.add(label_1);
+
+ JLabel lblVlimage = new JLabel("VL-Image");
+ lblVlimage.setForeground(Color.BLUE);
+ lblVlimage.setBounds(81, 11, 45, 14);
+ contentPanel.add(lblVlimage);
+
+ JLabel label_2 = new JLabel(">");
+ label_2.setBounds(133, 11, 13, 14);
+ contentPanel.add(label_2);
+
+ JLabel lblNewLabel_1 = new JLabel("Imageauswahl");
+ lblNewLabel_1.setBounds(146, 11, 85, 14);
+ contentPanel.add(lblNewLabel_1);
+
+ JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
+
+ tabbedPane.setBounds(10, 197, 557, 300);
+ contentPanel.add(tabbedPane);
+
+ JScrollPane scrollPaneMyImage = new JScrollPane();
+ JTable tablemyImages=new JTable();
+ tablemyImages.setModel(model);
+ tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit();
+ tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit();
+ tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit();
+ tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit();
+ tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit();
+
+ JScrollPane scrollPaneAllImages = new JScrollPane();
+ tableAllImages=new JTable();
+ tableAllImages.setModel(modelAll);
+ tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit();
+ tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit();
+ tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit();
+ tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit();
+ tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit();
+
+
+
+ scrollPaneAllImages.setViewportView(tableAllImages);
+ tabbedPane.addTab("Alle", null, scrollPaneAllImages, null);
+
+ scrollPaneMyImage.setViewportView(tablemyImages);
+ tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null);
+
+ JScrollPane scrollPaneCoopImages = new JScrollPane();
+ JTable tableCoopImages=new JTable();
+ tableCoopImages.setModel(model);
+ tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit();
+ tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit();
+ tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit();
+ tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit();
+ tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit();
+
+ scrollPaneCoopImages.setViewportView(tableCoopImages);
+ tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, null);
+
+ JScrollPane scrollPanePublicImages = new JScrollPane();
+ JTable tablePublicImages=new JTable();
+ tablePublicImages.setModel(model);
+ tablePublicImages.getColumnModel().getColumn(1).sizeWidthToFit();
+ tablePublicImages.getColumnModel().getColumn(2).sizeWidthToFit();
+ tablePublicImages.getColumnModel().getColumn(3).sizeWidthToFit();
+ tablePublicImages.getColumnModel().getColumn(4).sizeWidthToFit();
+ tablePublicImages.getColumnModel().getColumn(5).sizeWidthToFit();
+
+ scrollPanePublicImages.setViewportView(tablePublicImages);
+ tabbedPane.addTab("\u00D6ffentliche Images", null, scrollPanePublicImages, null);
+
+ JScrollPane scrollPanePublicVorlagen = new JScrollPane();
+ JTable tablePublicVorlagen=new JTable();
+ tablePublicVorlagen.setModel(model);
+ tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit();
+ tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit();
+ tablePublicVorlagen.getColumnModel().getColumn(3).sizeWidthToFit();
+ tablePublicVorlagen.getColumnModel().getColumn(4).sizeWidthToFit();
+ tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit();
+
+ scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen);
+ tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, scrollPanePublicVorlagen, null);
+
+ initTableModel(modelAll);
+
+
+
+
+
+
+
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 640, 597, 33);
+ buttonPane.setBackground(SystemColor.menu);
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ getContentPane().add(buttonPane);
+ {
+ JButton okButton = new JButton("Zur\u00FCck");
+ okButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ //Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue());
+ //Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue());
+
+ MainMenue_GUI main=new MainMenue_GUI();
+ main.setVisible(true);
+ dispose();
+ }
+ });
+ okButton.setActionCommand("OK");
+ buttonPane.add(okButton);
+ getRootPane().setDefaultButton(okButton);
+ }
+ {
+ JButton cancelButton = new JButton("Veranstaltung erzeugen und abschlie\u00DFen");
+ cancelButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+
+ String imagename=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 0).toString();
+ String Name=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 5).toString();
+ String Nachname=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 5).toString().substring(0,Name.indexOf(" ") );
+ String Vorname=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 5).toString().substring(Name.indexOf(" ")+1,Name.length());
+
+ try {
+
+ sint.writeLecturedata(Lecture.lecture.getName(), Lecture.lecture.getShortDesc(), Lecture.lecture.getDesc(), Lecture.lecture.getStartdate(), Lecture.lecture.getEnddate(), Lecture.lecture.isActive(), imagename, person.verantowrtlicher.getVorname(), person.verantowrtlicher.getName(), person.verantowrtlicher.getHochschule(), person.verantowrtlicher.getEMail(), person.verantowrtlicher.getTel(), person.verantowrtlicher.getFakultät());
+ } catch (RemoteException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ dispose();
+
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 78, 597, 2);
+ getContentPane().add(separator);
+
+ JSeparator separator_1 = new JSeparator();
+ separator_1.setBounds(0, 627, 597, 2);
+ getContentPane().add(separator_1);
+
+ JMenuBar menuBar = new JMenuBar();
+ setJMenuBar(menuBar);
+
+ JMenu mnNewMenu = new JMenu("Suchen");
+ menuBar.add(mnNewMenu);
+
+ JMenuItem mntmVlSuche = new JMenuItem("VL Suche");
+ mnNewMenu.add(mntmVlSuche);
+
+ JMenu mnNewMenu_1 = new JMenu("Hilfe");
+ menuBar.add(mnNewMenu_1);
+
+ JMenuItem mntmFaq = new JMenuItem("FAQ");
+ mnNewMenu_1.add(mntmFaq);
+
+ JMenuItem mntmOtrs = new JMenuItem("OTRS");
+ mnNewMenu_1.add(mntmOtrs);
+
+ }
+
+ public DefaultTableModel initTableModel(DefaultTableModel model){
+ List<Object[]> images;
+ try {
+ images = sint.getImageList();
+ Iterator<Object[]> i=images.iterator();
+ int x=0;
+
+ while(i.hasNext())
+ {
+ i.next();
+
+ model.addRow(images.get(x));
+ x++;
+ }
+
+ return model;
+ } catch (RemoteException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ return model;
+ }
+
+ }
+
+
diff --git a/Dozentenmodul/src/GUI/MainMenue_GUI.java b/Dozentenmodul/src/GUI/MainMenue_GUI.java
index 2364d101..36e0fdd9 100644
--- a/Dozentenmodul/src/GUI/MainMenue_GUI.java
+++ b/Dozentenmodul/src/GUI/MainMenue_GUI.java
@@ -40,6 +40,7 @@ public class MainMenue_GUI extends JFrame {
JRadioButton rdbtnImageNew;
JRadioButton rdbtnImageEdit;
JRadioButton rdbtnImageSearchDownload;
+ JRadioButton rdbtnVeranstaltungNew;
private final ButtonGroup buttonGroup = new ButtonGroup();
/**
* Launch the application.
@@ -171,7 +172,7 @@ public class MainMenue_GUI extends JFrame {
panelVeranstaltung.setBounds(10, 297, 270, 200);
contentPanel.add(panelVeranstaltung);
- JRadioButton rdbtnVeranstaltungNew = new JRadioButton("Neu");
+ rdbtnVeranstaltungNew = new JRadioButton("Neu");
buttonGroup.add(rdbtnVeranstaltungNew);
rdbtnVeranstaltungNew.setToolTipText("Hier k\u00F6nnen Sie Ihre Labordaten eingeben");
rdbtnVeranstaltungNew.setBounds(6, 24, 185, 23);
@@ -283,6 +284,11 @@ public class MainMenue_GUI extends JFrame {
SearchMethod_GUI sm=new SearchMethod_GUI();
sm.setVisible(true);
dispose();
+ }else if(rdbtnVeranstaltungNew.isSelected()==true)
+ {
+ EingabeVeranstaltungAllgemein_GUI av=new EingabeVeranstaltungAllgemein_GUI();
+ av.setVisible(true);
+ dispose();
}
}
});
diff --git a/Dozentenmodul/src/GUI/SearchImage_GUI.java b/Dozentenmodul/src/GUI/SearchImage_GUI.java
index e995c214..ecdbf65d 100644
--- a/Dozentenmodul/src/GUI/SearchImage_GUI.java
+++ b/Dozentenmodul/src/GUI/SearchImage_GUI.java
@@ -26,6 +26,8 @@ import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import Models.Image;
+import Models.person;
+
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.border.TitledBorder;
@@ -53,9 +55,14 @@ import java.rmi.RemoteException;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+
import javax.swing.JComboBox;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
@SuppressWarnings("serial")
public class SearchImage_GUI extends JFrame {
@@ -64,6 +71,8 @@ public class SearchImage_GUI extends JFrame {
String[] result;
JRadioButton rdbtnInternetJa;
JRadioButton rdbtnInternetNein;
+ JComboBox comboBox;
+ JTable tableAllImages;
private final ButtonGroup buttonGrouplicense = new ButtonGroup();
private final ButtonGroup buttonGroupInternet = new ButtonGroup();
private JTextField textFieldName;
@@ -158,6 +167,31 @@ public class SearchImage_GUI extends JFrame {
panel_1.add(lblInternetIstInnerhalb);
textFieldName = new JTextField();
+ textFieldName.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyReleased(KeyEvent e) {
+ String stext=textFieldName.getText();
+ modelAll.setRowCount(0);
+ initTableModel(modelAll);
+
+ if(stext!="")
+ for(int i=0;i<modelAll.getRowCount();i++){
+
+ if(modelAll.getValueAt(i, 0).toString().startsWith(stext)){
+
+ }
+ else
+ {
+ modelAll.removeRow(i);
+ }
+ }
+
+
+ }
+
+
+ });
+
textFieldName.setBounds(270, 30, 250, 20);
panel_1.add(textFieldName);
textFieldName.setColumns(10);
@@ -175,9 +209,10 @@ public class SearchImage_GUI extends JFrame {
lblErweiterteSuche.setBounds(431, 106, 89, 14);
panel_1.add(lblErweiterteSuche);
- JComboBox comboBox = new JComboBox();
+ comboBox = new JComboBox();
try {
List<String> list=sint.getAllOS();
+ comboBox.addItem("");
for(int i=0;i<list.size();i++)
{
comboBox.addItem(list.get(i));
@@ -188,8 +223,24 @@ public class SearchImage_GUI extends JFrame {
}
comboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
- DefaultTableModel modeltemp = new DefaultTableModel( titles, 0 );
- //todo
+ modelAll.setRowCount(0);
+ initTableModel(modelAll);
+ String selItem=comboBox.getSelectedItem().toString();
+ if(selItem!="")
+ {
+ for(int i=0;i<modelAll.getRowCount();i++){
+
+ if(modelAll.getValueAt(i, 2).equals(selItem)){
+
+ }
+ else
+ {
+ modelAll.removeRow(i);
+ }
+ }
+
+
+ }
}
});
comboBox.setBounds(270, 58, 250, 20);
@@ -239,6 +290,20 @@ public class SearchImage_GUI extends JFrame {
tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit();
tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit();
tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit();
+
+ JScrollPane scrollPaneAllImages = new JScrollPane();
+ tableAllImages=new JTable();
+ tableAllImages.setModel(modelAll);
+ tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit();
+ tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit();
+ tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit();
+ tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit();
+ tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit();
+
+
+
+ scrollPaneAllImages.setViewportView(tableAllImages);
+ tabbedPane.addTab("Alle", null, scrollPaneAllImages, null);
scrollPaneMyImage.setViewportView(tablemyImages);
tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null);
@@ -279,37 +344,7 @@ public class SearchImage_GUI extends JFrame {
scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen);
tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, scrollPanePublicVorlagen, null);
- JScrollPane scrollPaneAllImages = new JScrollPane();
- JTable tableAllImages=new JTable();
- tableAllImages.setModel(modelAll);
- tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit();
- tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit();
- tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit();
- tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit();
- tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit();
-
- List<Object[]> images;
- try {
- images = sint.getImageList();
- Iterator<Object[]> i=images.iterator();
- int x=0;
-
- while(i.hasNext())
- {
- i.next();
-
- modelAll.addRow(images.get(x));
- x++;
- }
- } catch (RemoteException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
-
-
-
- scrollPaneAllImages.setViewportView(tableAllImages);
- tabbedPane.addTab("Alle", null, scrollPaneAllImages, null);
+ initTableModel(modelAll);
JButton btnDownload = new JButton("Download");
btnDownload.addActionListener(new ActionListener() {
@@ -319,12 +354,8 @@ public class SearchImage_GUI extends JFrame {
SearchImage_GUI.this.setVisible(false);
}
});
- btnDownload.setBounds(478, 508, 89, 23);
+ btnDownload.setBounds(449, 508, 118, 23);
contentPanel.add(btnDownload);
-
- JButton btnFilterLschen = new JButton("Filter l\u00F6schen");
- btnFilterLschen.setBounds(358, 508, 110, 23);
- contentPanel.add(btnFilterLschen);
@@ -359,6 +390,24 @@ public class SearchImage_GUI extends JFrame {
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
+ String imagename=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 0).toString();
+ String Name=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 5).toString();
+ String Nachname=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 5).toString().substring(0,Name.indexOf(" ") );
+ String Vorname=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 5).toString().substring(Name.indexOf(" ")+1,Name.length());
+ try {
+ Map<String, String> map=sint.getPersonData(Vorname, Nachname);
+ person.verantowrtlicher.setEMail(map.get("mail"));
+ person.verantowrtlicher.setFakultät(map.get("fak"));
+ person.verantowrtlicher.setHochschule(map.get("Hochschule"));
+ person.verantowrtlicher.setName(map.get("Nachname"));
+ person.verantowrtlicher.setTel(map.get("tel"));
+ person.verantowrtlicher.setVorname(map.get("Vorname"));
+ Image.image.setImagename(imagename);
+ //System.out.println(map.get("tel").toString());
+ } catch (RemoteException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
EditImageAllgemein_GUI ea=new EditImageAllgemein_GUI();
ea.setVisible(true);
@@ -398,6 +447,30 @@ public class SearchImage_GUI extends JFrame {
mnNewMenu_1.add(mntmOtrs);
}
+
+ public DefaultTableModel initTableModel(DefaultTableModel model){
+ List<Object[]> images;
+ try {
+ images = sint.getImageList();
+ Iterator<Object[]> i=images.iterator();
+ int x=0;
+
+ while(i.hasNext())
+ {
+ i.next();
+
+ model.addRow(images.get(x));
+ x++;
+ }
+
+ return model;
+ } catch (RemoteException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ return model;
+ }
+
}
diff --git a/Dozentenmodul/src/GUI/Summary.java b/Dozentenmodul/src/GUI/Summary.java
index 8668fe43..38c69ad1 100644
--- a/Dozentenmodul/src/GUI/Summary.java
+++ b/Dozentenmodul/src/GUI/Summary.java
@@ -20,7 +20,7 @@ import javax.swing.JSeparator;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JMenu;
-import Models.person;
+import Models.*;
import Models.vm;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
@@ -173,37 +173,37 @@ public class Summary extends JFrame {
panel.add(label_6);
JLabel label_Vorname_V = new JLabel((String) null);
- label_Vorname_V.setText(person.verantowrtlicher.getVorname());
+ label_Vorname_V.setText(personData.verantowrtlicher.getVorname());
label_Vorname_V.setBounds(85, 36, 169, 14);
panel.add(label_Vorname_V);
JLabel label_Vorname_E = new JLabel((String) null);
- label_Vorname_E.setText(person.ersteller.getVorname());
+ label_Vorname_E.setText(personData.ersteller.getVorname());
label_Vorname_E.setBounds(339, 36, 169, 14);
panel.add(label_Vorname_E);
JLabel label_Nachname_E = new JLabel((String) null);
- label_Nachname_E.setText(person.ersteller.getName());
+ label_Nachname_E.setText(personData.ersteller.getName());
label_Nachname_E.setBounds(339, 61, 169, 14);
panel.add(label_Nachname_E);
JLabel label_Nachname_V = new JLabel((String) null);
- label_Nachname_V.setText(person.verantowrtlicher.getName());
+ label_Nachname_V.setText(personData.verantowrtlicher.getName());
label_Nachname_V.setBounds(85, 61, 169, 14);
panel.add(label_Nachname_V);
JLabel label_Hochschule_V = new JLabel((String) null);
- label_Hochschule_V.setText(person.verantowrtlicher.getHochschule());
+ label_Hochschule_V.setText(personData.verantowrtlicher.getHochschule());
label_Hochschule_V.setBounds(85, 86, 169, 14);
panel.add(label_Hochschule_V);
JLabel label_Hochschule_E = new JLabel((String) null);
- label_Hochschule_E.setText(person.ersteller.getHochschule());
+ label_Hochschule_E.setText(personData.ersteller.getHochschule());
label_Hochschule_E.setBounds(339, 86, 169, 14);
panel.add(label_Hochschule_E);
JLabel label_Mail_E = new JLabel((String) null);
- label_Mail_E.setText(person.ersteller.getEMail());
+ label_Mail_E.setText(personData.ersteller.getEMail());
label_Mail_E.setBounds(339, 111, 169, 14);
panel.add(label_Mail_E);
@@ -212,7 +212,7 @@ public class Summary extends JFrame {
panel.add(label_14);
JLabel label_Mail_V = new JLabel((String) null);
- label_Mail_V.setText(person.verantowrtlicher.getEMail());
+ label_Mail_V.setText(personData.verantowrtlicher.getEMail());
label_Mail_V.setBounds(85, 111, 169, 14);
panel.add(label_Mail_V);
@@ -225,7 +225,7 @@ public class Summary extends JFrame {
panel.add(label_17);
JLabel label_Tel_V = new JLabel((String) null);
- label_Tel_V.setText(person.verantowrtlicher.getTel());
+ label_Tel_V.setText(personData.verantowrtlicher.getTel());
label_Tel_V.setBounds(85, 136, 169, 14);
panel.add(label_Tel_V);
@@ -234,12 +234,12 @@ public class Summary extends JFrame {
panel.add(label_19);
JLabel label_Tel_E = new JLabel((String) null);
- label_Tel_E.setText(person.ersteller.getTel());
+ label_Tel_E.setText(personData.ersteller.getTel());
label_Tel_E.setBounds(339, 136, 169, 14);
panel.add(label_Tel_E);
JLabel label_Fak_E = new JLabel((String) null);
- label_Fak_E.setText(person.ersteller.getFakultät());
+ label_Fak_E.setText(personData.ersteller.getFakultät());
label_Fak_E.setBounds(339, 161, 169, 14);
panel.add(label_Fak_E);
@@ -248,7 +248,7 @@ public class Summary extends JFrame {
panel.add(label_22);
JLabel label_Fak_V = new JLabel((String) null);
- label_Fak_V.setText(person.verantowrtlicher.getFakultät());
+ label_Fak_V.setText(personData.verantowrtlicher.getFakultät());
label_Fak_V.setBounds(85, 161, 169, 14);
panel.add(label_Fak_V);