diff options
67 files changed, 1451 insertions, 87 deletions
diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class Binary files differindex 5a172814..97310c6c 100644 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class +++ b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class Binary files differindex fcbdc9e8..27608f81 100644 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class +++ b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class Binary files differindex cb5e122c..3807bbd7 100644 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class +++ b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class Binary files differindex b20cf2f8..6c8c0373 100644 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class +++ b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class Binary files differindex f7b36c07..66a694e4 100644 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class +++ b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class Binary files differnew file mode 100644 index 00000000..1acab38d --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class Binary files differnew file mode 100644 index 00000000..e8b1e273 --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class Binary files differnew file mode 100644 index 00000000..1c285411 --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class Binary files differnew file mode 100644 index 00000000..4c2e2062 --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class Binary files differnew file mode 100644 index 00000000..7af6113a --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$1.class Binary files differnew file mode 100644 index 00000000..a89afe39 --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$1.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$2.class Binary files differnew file mode 100644 index 00000000..58667d69 --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$2.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$3.class Binary files differnew file mode 100644 index 00000000..df097e0a --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$3.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$4.class Binary files differnew file mode 100644 index 00000000..071f93e5 --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$4.class diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI.class Binary files differnew file mode 100644 index 00000000..3d39ff64 --- /dev/null +++ b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI.class diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class Binary files differindex d74741a3..ced1d71e 100644 --- a/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class +++ b/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI.class Binary files differindex 768f74c0..440c8b36 100644 --- a/Dozentenmodul/bin/GUI/FTPUploader_GUI.class +++ b/Dozentenmodul/bin/GUI/FTPUploader_GUI.class diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$1.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$1.class Binary files differnew file mode 100644 index 00000000..d8562511 --- /dev/null +++ b/Dozentenmodul/bin/GUI/LinkImage_GUI$1.class diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$2.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$2.class Binary files differnew file mode 100644 index 00000000..e384bebf --- /dev/null +++ b/Dozentenmodul/bin/GUI/LinkImage_GUI$2.class diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$3.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$3.class Binary files differnew file mode 100644 index 00000000..ac217766 --- /dev/null +++ b/Dozentenmodul/bin/GUI/LinkImage_GUI$3.class diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$4.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$4.class Binary files differnew file mode 100644 index 00000000..7bc4f741 --- /dev/null +++ b/Dozentenmodul/bin/GUI/LinkImage_GUI$4.class diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$5.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$5.class Binary files differnew file mode 100644 index 00000000..a73476cc --- /dev/null +++ b/Dozentenmodul/bin/GUI/LinkImage_GUI$5.class diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$6.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$6.class Binary files differnew file mode 100644 index 00000000..14c1ad5c --- /dev/null +++ b/Dozentenmodul/bin/GUI/LinkImage_GUI$6.class diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$7.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$7.class Binary files differnew file mode 100644 index 00000000..6077a740 --- /dev/null +++ b/Dozentenmodul/bin/GUI/LinkImage_GUI$7.class diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI.class b/Dozentenmodul/bin/GUI/LinkImage_GUI.class Binary files differnew file mode 100644 index 00000000..2409416e --- /dev/null +++ b/Dozentenmodul/bin/GUI/LinkImage_GUI.class diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class Binary files differindex 34f8cea1..d53f764d 100644 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class +++ b/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class Binary files differindex 5f7269ee..cd0b03b0 100644 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class +++ b/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class Binary files differindex 0600f21f..2d031c05 100644 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class +++ b/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class Binary files differindex e3fb3da8..8d95cc8c 100644 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class +++ b/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI.class b/Dozentenmodul/bin/GUI/MainMenue_GUI.class Binary files differindex eba29a4e..10ad79ad 100644 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI.class +++ b/Dozentenmodul/bin/GUI/MainMenue_GUI.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class Binary files differindex f0386d0e..b53db456 100644 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class +++ b/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$2.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$2.class Binary files differindex 7b3dd158..2a0a8791 100644 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI$2.class +++ b/Dozentenmodul/bin/GUI/SearchImage_GUI$2.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$3.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$3.class Binary files differindex b681d9b5..2d78fc2d 100644 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI$3.class +++ b/Dozentenmodul/bin/GUI/SearchImage_GUI$3.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$4.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$4.class Binary files differindex 13705761..a20de136 100644 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI$4.class +++ b/Dozentenmodul/bin/GUI/SearchImage_GUI$4.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$5.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$5.class Binary files differindex 9f7f55a7..89c65db9 100644 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI$5.class +++ b/Dozentenmodul/bin/GUI/SearchImage_GUI$5.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$6.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$6.class Binary files differindex cd35f527..86997368 100644 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI$6.class +++ b/Dozentenmodul/bin/GUI/SearchImage_GUI$6.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$7.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$7.class Binary files differindex 6e0eb875..8918339a 100644 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI$7.class +++ b/Dozentenmodul/bin/GUI/SearchImage_GUI$7.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$8.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$8.class Binary files differnew file mode 100644 index 00000000..b0ed708c --- /dev/null +++ b/Dozentenmodul/bin/GUI/SearchImage_GUI$8.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI.class b/Dozentenmodul/bin/GUI/SearchImage_GUI.class Binary files differindex c4c5bd32..c522d03f 100644 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI.class +++ b/Dozentenmodul/bin/GUI/SearchImage_GUI.class diff --git a/Dozentenmodul/bin/GUI/Summary$1.class b/Dozentenmodul/bin/GUI/Summary$1.class Binary files differdeleted file mode 100644 index 7c6fc8ab..00000000 --- a/Dozentenmodul/bin/GUI/Summary$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Summary$2.class b/Dozentenmodul/bin/GUI/Summary$2.class Binary files differdeleted file mode 100644 index d8cc9f0e..00000000 --- a/Dozentenmodul/bin/GUI/Summary$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Summary$3.class b/Dozentenmodul/bin/GUI/Summary$3.class Binary files differdeleted file mode 100644 index ca004f87..00000000 --- a/Dozentenmodul/bin/GUI/Summary$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Summary$4.class b/Dozentenmodul/bin/GUI/Summary$4.class Binary files differdeleted file mode 100644 index 1e19639a..00000000 --- a/Dozentenmodul/bin/GUI/Summary$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Summary$5.class b/Dozentenmodul/bin/GUI/Summary$5.class Binary files differdeleted file mode 100644 index 08342e8f..00000000 --- a/Dozentenmodul/bin/GUI/Summary$5.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Summary$6.class b/Dozentenmodul/bin/GUI/Summary$6.class Binary files differdeleted file mode 100644 index b3483d69..00000000 --- a/Dozentenmodul/bin/GUI/Summary$6.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Summary$7.class b/Dozentenmodul/bin/GUI/Summary$7.class Binary files differdeleted file mode 100644 index 7460909c..00000000 --- a/Dozentenmodul/bin/GUI/Summary$7.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Summary.class b/Dozentenmodul/bin/GUI/Summary.class Binary files differindex a525f1f4..6b2254bd 100644 --- a/Dozentenmodul/bin/GUI/Summary.class +++ b/Dozentenmodul/bin/GUI/Summary.class diff --git a/Dozentenmodul/bin/Models/Lecture.class b/Dozentenmodul/bin/Models/Lecture.class Binary files differnew file mode 100644 index 00000000..8213a163 --- /dev/null +++ b/Dozentenmodul/bin/Models/Lecture.class diff --git a/Dozentenmodul/bin/Models/person.class b/Dozentenmodul/bin/Models/person.class Binary files differindex 88bf18e6..18b67125 100644 --- a/Dozentenmodul/bin/Models/person.class +++ b/Dozentenmodul/bin/Models/person.class 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);
diff --git a/Dozentenmodul/src/Models/Lecture.java b/Dozentenmodul/src/Models/Lecture.java new file mode 100644 index 00000000..4eb755e9 --- /dev/null +++ b/Dozentenmodul/src/Models/Lecture.java @@ -0,0 +1,66 @@ +package Models; + +import java.util.Date; + +public class Lecture { + + + private String name; + private String shortDesc; + private String desc; + private Date startdate; + private Date enddate; + private boolean active; + + public static Lecture lecture =new Lecture(); + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getShortDesc() { + return shortDesc; + } + + public void setShortDesc(String shortDesc) { + this.shortDesc = shortDesc; + } + + public String getDesc() { + return desc; + } + + public void setDesc(String desc) { + this.desc = desc; + } + + public Date getStartdate() { + return startdate; + } + + public void setStartdate(Date startdate) { + this.startdate = startdate; + } + + public Date getEnddate() { + return enddate; + } + + public void setEnddate(Date enddate) { + this.enddate = enddate; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + + +} diff --git a/Dozentenmodul/src/Models/person.java b/Dozentenmodul/src/Models/person.java index 884bb96d..46b7ec69 100644 --- a/Dozentenmodul/src/Models/person.java +++ b/Dozentenmodul/src/Models/person.java @@ -1,6 +1,8 @@ package Models;
-public class person {
+import java.io.Serializable;
+
+public class person{
private String Name;
private String Vorname;
diff --git a/Dozentenmodul_V1/WebContent/GUI/de/menü.html b/Dozentenmodul_V1/WebContent/GUI/de/menü.html deleted file mode 100644 index ee5f3f96..00000000 --- a/Dozentenmodul_V1/WebContent/GUI/de/menü.html +++ /dev/null @@ -1,9 +0,0 @@ -<!-- Erzeugt das Navigationsmenü für die Webanwendung -->
-<ul class="vertical-list">
- <li><a href='/Dozentenmodul_V1/GUI/de/Home.jsp' class='button'>Home</a></li>
- <li><a href='/Dozentenmodul_V1/GUI/de/createVL_allgemein.jsp' class='button'>VL erzeugen</a></li>
- <!--<li><a href='/' class='button'>VL bearbeiten</a></li>
- <li><a href='/' class='button'>Einstellungen</a></li>-->
- <li><a href='/Dozentenmodul_V1/GUI/de/OTRS.jsp' class='button'>Wartung</a></li>
- <li><a href='/' class='button'>Logout</a></li>
-</ul>
diff --git a/Dozentenmodul_V1/bin/WebContent/GUI/de/menü.html b/Dozentenmodul_V1/bin/WebContent/GUI/de/menü.html deleted file mode 100644 index ee5f3f96..00000000 --- a/Dozentenmodul_V1/bin/WebContent/GUI/de/menü.html +++ /dev/null @@ -1,9 +0,0 @@ -<!-- Erzeugt das Navigationsmenü für die Webanwendung -->
-<ul class="vertical-list">
- <li><a href='/Dozentenmodul_V1/GUI/de/Home.jsp' class='button'>Home</a></li>
- <li><a href='/Dozentenmodul_V1/GUI/de/createVL_allgemein.jsp' class='button'>VL erzeugen</a></li>
- <!--<li><a href='/' class='button'>VL bearbeiten</a></li>
- <li><a href='/' class='button'>Einstellungen</a></li>-->
- <li><a href='/Dozentenmodul_V1/GUI/de/OTRS.jsp' class='button'>Wartung</a></li>
- <li><a href='/' class='button'>Logout</a></li>
-</ul>
diff --git a/Dozentenmodulserver/bin/server/ServerInterface.class b/Dozentenmodulserver/bin/server/ServerInterface.class Binary files differindex 146aa871..9c9c08d8 100644 --- a/Dozentenmodulserver/bin/server/ServerInterface.class +++ b/Dozentenmodulserver/bin/server/ServerInterface.class diff --git a/Dozentenmodulserver/bin/server/ServerMethod.class b/Dozentenmodulserver/bin/server/ServerMethod.class Binary files differindex 01b5288c..a60a23f9 100644 --- a/Dozentenmodulserver/bin/server/ServerMethod.class +++ b/Dozentenmodulserver/bin/server/ServerMethod.class diff --git a/Dozentenmodulserver/bin/sql/SQL.class b/Dozentenmodulserver/bin/sql/SQL.class Binary files differindex cb55c2de..45162648 100644 --- a/Dozentenmodulserver/bin/sql/SQL.class +++ b/Dozentenmodulserver/bin/sql/SQL.class diff --git a/Dozentenmodulserver/src/server/ServerInterface.java b/Dozentenmodulserver/src/server/ServerInterface.java index 49d7adb9..fffcb064 100644 --- a/Dozentenmodulserver/src/server/ServerInterface.java +++ b/Dozentenmodulserver/src/server/ServerInterface.java @@ -2,7 +2,9 @@ package server; import java.rmi.*;
import java.sql.ResultSet;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
+import java.util.Map;
import Models.User;
@@ -15,4 +17,8 @@ public interface ServerInterface extends Remote public boolean writeVLdata(String imagename, String firstname, String lastname,String university, String Mail, String Tel, String Fak, boolean license, boolean internet, int ram, int cpu) throws RemoteException;
public List<Object[]> getImageList() throws RemoteException;
public List<String> getAllOS() throws RemoteException;
+ public Map<String,String> getPersonData(String Vorname, String Nachname) throws RemoteException;
+ public boolean writeLecturedata(String name, String shortdesc, String desc,Date start, Date end, boolean isActive, String imagename,String firstname,
+ String lastname, String university, String Mail, String Tel,
+ String Fak) throws RemoteException;
}
diff --git a/Dozentenmodulserver/src/server/ServerMethod.java b/Dozentenmodulserver/src/server/ServerMethod.java index 1f66fb6b..aa4dcae8 100644 --- a/Dozentenmodulserver/src/server/ServerMethod.java +++ b/Dozentenmodulserver/src/server/ServerMethod.java @@ -11,9 +11,13 @@ import java.sql.ResultSetMetaData; import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.UUID;
-import Models.*;
+
+import Models.User;
+
import sql.SQL;
@SuppressWarnings("serial")
@@ -133,16 +137,17 @@ public class ServerMethod extends UnicastRemoteObject implements ServerInterface String Fak, boolean license, boolean internet, int ram, int cpu)
throws RemoteException {
String login="tete";
- System.out.println("1");
+
int pk_institution=sql.setInstitution(con, university);
- System.out.println("2");
+
int pk_person=sql.setPerson(con, login, lastname, firstname, Mail, new Date(), pk_institution);
- System.out.println("3");
+
sql.setImageData(con, pk_person, license, internet, cpu, ram, imagename);
- System.out.println("4");
+
// TODO Auto-generated method stub
return true;
}
+
@@ -156,6 +161,7 @@ public class ServerMethod extends UnicastRemoteObject implements ServerInterface List<Object[]> listWith = ResSetToObject(resWith);
List<Object[]> listWithout=ResSetToObject(resWithout);
listWith.addAll(listWith.size(), listWithout);
+
return listWith;
} catch (SQLException e1) {
// TODO Auto-generated catch block
@@ -200,4 +206,64 @@ public class ServerMethod extends UnicastRemoteObject implements ServerInterface }
return null;
}
+
+
+
+ @Override
+ public Map<String,String> getPersonData(String Vorname, String Nachname)
+ throws RemoteException {
+ Map<String,String> map=new HashMap<String, String>();
+ System.out.println(Vorname+Nachname);
+ ResultSet rs=sql.getPersonData(con, Vorname, Nachname);
+ try {
+ while(rs.next())
+ {
+
+ map.put("mail", rs.getString("mail"));
+ map.put("Nachname", rs.getString("Nachname"));
+ map.put("Vorname", rs.getString("Vorname"));
+ map.put("Hochschule", rs.getString("name"));
+ map.put("tel", "009909");
+ map.put("fak", "E+I");
+
+ }
+ return map;
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+
+ @Override
+ public boolean writeLecturedata(String name, String shortdesc, String desc,
+ Date start, Date end, boolean isActive, String imagename,
+ String firstname, String lastname, String university, String Mail,
+ String Tel, String Fak) throws RemoteException {
+ int pk_image = 0;
+ String login="tete";
+ int imageversion = 0;
+ int pk_institution=sql.setInstitution(con, university);
+ int pk_person=sql.setPerson(con, login, lastname, firstname, Mail, new Date(), pk_institution);
+ System.out.println(imagename);
+ ResultSet image=sql.getImageIDandVersion(con, imagename);
+
+ try {
+ while(image.next())
+ {
+ pk_image=image.getInt("GUID_imageID");
+ imageversion=image.getInt("imageVersion");
+ }
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+
+
+ sql.setLectureData(con, pk_person, pk_image, imageversion, name, desc, shortdesc, start, end, isActive);
+
+ return false;
+ }
}
\ No newline at end of file diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java index af99b36b..eb5021c4 100644 --- a/Dozentenmodulserver/src/sql/SQL.java +++ b/Dozentenmodulserver/src/sql/SQL.java @@ -195,7 +195,7 @@ public class SQL { try {
Statement stm=con.createStatement();
- return stm.executeQuery("SELECT distinct vl.image_name, vl.cond_hasLicenseRestriction, os.name, vl.image_update_time, '', Concat(u.Nachname,' ',u.Vorname) FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.lectureID!=vl.GUID_imageID and vl.image_owner=u.userID;");
+ return stm.executeQuery("SELECT distinct vl.image_name, vl.cond_hasLicenseRestriction, os.name, '',vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and vl.image_owner=u.userID;");
} catch (SQLException e) {
@@ -209,7 +209,7 @@ public class SQL { try {
Statement stm=con.createStatement();
- return stm.executeQuery("SELECT vl.image_name, vl.cond_hasLicenseRestriction, os.name, vl.image_update_time, lect.name, Concat(u.Nachname,' ',u.Vorname) FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID;");
+ return stm.executeQuery("SELECT vl.image_name, vl.cond_hasLicenseRestriction, os.name, lect.name, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID;");
} catch (SQLException e) {
@@ -236,4 +236,52 @@ public class SQL { return null;
}
+
+ public ResultSet getPersonData(Connection con,String Vorname, String Nachname)
+ {
+ try {
+ Statement stm=con.createStatement();
+ return stm.executeQuery("SELECT u.Nachname, u.Vorname, u.mail, i.name FROM bwLehrpool.m_user u, bwLehrpool.m_institution i where u.Nachname like '"+Nachname+"' and u.Vorname like '"+Vorname+"' and u.institution=i.institutionID;");
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public int setLectureData(Connection con, int pk_person, int pk_image,int imageversion, String name, String desc, String shortdesc,Date start, Date end, boolean isactive)
+ {
+
+ DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+ int active_bol=0;
+ if(isactive==true)
+ {
+ active_bol=1;
+ }
+ try {
+ Statement stm=con.createStatement();
+ Random random=new Random();
+ int uid=random.nextInt();
+ stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_lecture`(`lectureID`,`name`,`isActive`,`startTime`,`endTime`,`lastUsed`,`shortDescription`,`description`,`imageID`,`imageVersion`,`admin_createTime`,`admin_changeTime`,`admin_owner`,`admin_change_by`)VALUES('"+uid+"','"+name+"','"+active_bol+"','"+formatter.format(start)+"','"+formatter.format(end)+"','"+formatter.format(new Date())+"','"+shortdesc+"','"+desc+"','"+pk_image+"','"+imageversion+"','"+formatter.format(new Date())+"','"+formatter.format(new Date())+"','"+pk_person+"','"+pk_person+"');");
+ con.commit();
+
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return 0;
+
+ }
+
+ public ResultSet getImageIDandVersion(Connection con,String name)
+ {
+ try {
+ Statement stm=con.createStatement();
+ return stm.executeQuery("SELECT GUID_imageID, imageVersion FROM bwLehrpool.m_VLData_imageInfo where image_name like '"+name+"';");
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
}
|