diff options
author | unknown | 2014-04-04 09:30:30 +0200 |
---|---|---|
committer | unknown | 2014-04-04 09:30:30 +0200 |
commit | 7b8534417cc4cf7d2e6d6dcb0988ad688fc7999c (patch) | |
tree | a99584b0a8b42c59d1121f51d187e33ecba6b370 /Dozentenmodul | |
parent | Bearbeiten von Images funktioniert nun vollständig (diff) | |
download | tutor-module-7b8534417cc4cf7d2e6d6dcb0988ad688fc7999c.tar.gz tutor-module-7b8534417cc4cf7d2e6d6dcb0988ad688fc7999c.tar.xz tutor-module-7b8534417cc4cf7d2e6d6dcb0988ad688fc7999c.zip |
neue Version
Diffstat (limited to 'Dozentenmodul')
53 files changed, 843 insertions, 1063 deletions
diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class Binary files differindex 4947b5ae..66724cc7 100644 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class +++ 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 differindex a77bfc15..0d944566 100644 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class +++ 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 differindex 9a60b2bb..799086ff 100644 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class +++ 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 differindex 7ef0c949..6085dec2 100644 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class +++ 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 differindex 1e1426e0..f6a2c80d 100644 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class +++ 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 differdeleted file mode 100644 index cb2858d5..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$2.class Binary files differdeleted file mode 100644 index 672e37c7..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$3.class Binary files differdeleted file mode 100644 index 297810f5..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$4.class Binary files differdeleted file mode 100644 index 17769c26..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI.class Binary files differdeleted file mode 100644 index ddb5df01..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Login_GUI$1.class b/Dozentenmodul/bin/GUI/Login_GUI$1.class Binary files differindex 47818348..b4388d57 100644 --- a/Dozentenmodul/bin/GUI/Login_GUI$1.class +++ b/Dozentenmodul/bin/GUI/Login_GUI$1.class diff --git a/Dozentenmodul/bin/GUI/Login_GUI$2.class b/Dozentenmodul/bin/GUI/Login_GUI$2.class Binary files differindex 41243cbe..54cd4d69 100644 --- a/Dozentenmodul/bin/GUI/Login_GUI$2.class +++ b/Dozentenmodul/bin/GUI/Login_GUI$2.class diff --git a/Dozentenmodul/bin/GUI/Login_GUI$3.class b/Dozentenmodul/bin/GUI/Login_GUI$3.class Binary files differindex 3122e95a..46796de6 100644 --- a/Dozentenmodul/bin/GUI/Login_GUI$3.class +++ b/Dozentenmodul/bin/GUI/Login_GUI$3.class diff --git a/Dozentenmodul/bin/GUI/Login_GUI.class b/Dozentenmodul/bin/GUI/Login_GUI.class Binary files differindex 90a674be..da10a7ca 100644 --- a/Dozentenmodul/bin/GUI/Login_GUI.class +++ b/Dozentenmodul/bin/GUI/Login_GUI.class diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class Binary files differindex 1000eb91..7cf31fef 100644 --- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class +++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class Binary files differindex 8afdfdf8..b4b44d0c 100644 --- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class +++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class Binary files differindex 81a05cf3..ce4c4410 100644 --- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class +++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class Binary files differindex 123338af..b4468b87 100644 --- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class +++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class Binary files differindex dba15ce3..c8267a99 100644 --- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class +++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class diff --git a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$1.class Binary files differdeleted file mode 100644 index 771ce0e4..00000000 --- a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$2.class Binary files differdeleted file mode 100644 index 23ca111f..00000000 --- a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$3.class Binary files differdeleted file mode 100644 index 955781b8..00000000 --- a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$4.class Binary files differdeleted file mode 100644 index 6b562f97..00000000 --- a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI.class b/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI.class Binary files differdeleted file mode 100644 index d1eb7719..00000000 --- a/Dozentenmodul/bin/gui/EditVeranstatlungTechnisch_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class Binary files differindex 4947b5ae..66724cc7 100644 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class +++ 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 differindex a77bfc15..0d944566 100644 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$2.class +++ 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 differindex 9a60b2bb..799086ff 100644 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$3.class +++ 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 differindex 7ef0c949..6085dec2 100644 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$4.class +++ 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 differindex 1e1426e0..f6a2c80d 100644 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI.class +++ 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 differdeleted file mode 100644 index cb2858d5..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$2.class Binary files differdeleted file mode 100644 index 672e37c7..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$3.class Binary files differdeleted file mode 100644 index 297810f5..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$4.class Binary files differdeleted file mode 100644 index 17769c26..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI.class b/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI.class Binary files differdeleted file mode 100644 index ddb5df01..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$12.class b/Dozentenmodul/bin/gui/MainMenue_GUI$12.class Binary files differindex 00f3522e..d16963df 100644 --- a/Dozentenmodul/bin/gui/MainMenue_GUI$12.class +++ b/Dozentenmodul/bin/gui/MainMenue_GUI$12.class diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class Binary files differnew file mode 100644 index 00000000..e78c4d43 --- /dev/null +++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class Binary files differnew file mode 100644 index 00000000..98148b0d --- /dev/null +++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class Binary files differnew file mode 100644 index 00000000..441eb2c3 --- /dev/null +++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class Binary files differnew file mode 100644 index 00000000..34e2329f --- /dev/null +++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class Binary files differnew file mode 100644 index 00000000..c2cd1958 --- /dev/null +++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class Binary files differnew file mode 100644 index 00000000..7fc7e77f --- /dev/null +++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class Binary files differnew file mode 100644 index 00000000..885be80b --- /dev/null +++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$8.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$8.class Binary files differnew file mode 100644 index 00000000..882cfb27 --- /dev/null +++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$8.class diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class Binary files differnew file mode 100644 index 00000000..317d2a79 --- /dev/null +++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class diff --git a/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java b/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java index 6bc55553..0946b6df 100644 --- a/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java +++ b/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java @@ -31,7 +31,13 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; +import models.Image; +import models.Lecture; import models.person; +import javax.swing.JTextArea; +import java.awt.ScrollPane; +import com.toedter.calendar.JDateChooser; +import javax.swing.JRadioButton; @SuppressWarnings("serial") @@ -43,6 +49,12 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { private JTextField Nachname; private JTextField Hochschule; private JTextField EMail; + private JTextField textFieldLaborname; + JTextArea description; + JRadioButton radioButtonyes; + JDateChooser dateChooserend; + JDateChooser dateChooserstart; + /** * Launch the application. */ @@ -99,7 +111,7 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { 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); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); panel.add(txtpnBitteWhlenSie); } contentPanel.setBounds(10, 85, 577, 493); @@ -111,7 +123,7 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { 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); + panel_1.setBounds(10, 331, 557, 162); contentPanel.add(panel_1); panel_1.setLayout(null); @@ -178,10 +190,6 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { 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 @@ -212,6 +220,83 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { JLabel lblNewLabel_1 = new JLabel("Neu"); lblNewLabel_1.setBounds(146, 11, 46, 14); contentPanel.add(lblNewLabel_1); + + JPanel panel_2 = new JPanel(); + panel_2.setLayout(null); + panel_2.setBorder(new TitledBorder(null, "Veranstaltungsdaten", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(10, 36, 557, 284); + contentPanel.add(panel_2); + + JLabel label_3 = new JLabel("Laborname (Anzeigename): *"); + label_3.setBounds(10, 25, 180, 14); + panel_2.add(label_3); + + textFieldLaborname = new JTextField(); + textFieldLaborname.setColumns(10); + textFieldLaborname.setBounds(200, 22, 347, 20); + panel_2.add(textFieldLaborname); + + JTextArea textArea = new JTextArea(); + textArea.setWrapStyleWord(true); + textArea.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); + textArea.setLineWrap(true); + textArea.setFont(new Font("Tahoma", Font.PLAIN, 12)); + textArea.setBackground(SystemColor.menu); + textArea.setBounds(10, 49, 537, 49); + panel_2.add(textArea); + + JLabel label_4 = new JLabel("Kurzbeschreibung: *"); + label_4.setBounds(10, 111, 180, 14); + panel_2.add(label_4); + + ScrollPane scrollPane = new ScrollPane(); + scrollPane.setBounds(200, 104, 347, 78); + panel_2.add(scrollPane); + description = new JTextArea(); + description.setLineWrap(true); + scrollPane.add(description); + description.setBounds(0, 0, 4, 22); + scrollPane.add(description); + + dateChooserend = new JDateChooser(); + dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss"); + dateChooserend.setBounds(385, 188, 100, 20); + panel_2.add(dateChooserend); + + JLabel label_5 = new JLabel("bis"); + label_5.setBounds(351, 188, 24, 20); + panel_2.add(label_5); + + dateChooserstart = new JDateChooser(); + dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserstart.setBounds(240, 188, 101, 20); + panel_2.add(dateChooserstart); + + JLabel label_6 = new JLabel("von:"); + label_6.setBounds(200, 188, 30, 20); + panel_2.add(label_6); + + JLabel label_10 = new JLabel("G\u00FCltigkeitsdatum: *"); + label_10.setBounds(10, 188, 250, 14); + panel_2.add(label_10); + + JLabel label_11 = new JLabel("Aktiv:"); + label_11.setBounds(10, 229, 250, 14); + panel_2.add(label_11); + + radioButtonyes = new JRadioButton("Ja"); + radioButtonyes.setSelected(true); + radioButtonyes.setBounds(240, 225, 109, 23); + panel_2.add(radioButtonyes); + + JRadioButton radioButtonno = new JRadioButton("Nein"); + radioButtonno.setBounds(385, 225, 109, 23); + panel_2.add(radioButtonno); + + JLabel label_12 = new JLabel("(Im VMChooser sichtbar)"); + label_12.setBounds(10, 254, 250, 14); + panel_2.add(label_12); { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 640, 597, 33); @@ -222,13 +307,20 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { JButton okButton = new JButton("Zur\u00FCck"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - person.verantwortlicher.setVorname(Vorname.getText()); - person.verantwortlicher.setName(Nachname.getText()); - person.verantwortlicher.setEMail(EMail.getText()); - - person.verantwortlicher.setHochschule(Hochschule.getText()); - + if(radioButtonyes.isSelected()==true) + { + Lecture.lecture.setActive(true); + } + else + { + Lecture.lecture.setActive(false); + } + Lecture.lecture.setName(textFieldLaborname.getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(textFieldLaborname.getText()); MainMenue_GUI sr=new MainMenue_GUI(); sr.setVisible(true); @@ -243,23 +335,27 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { 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) + if(radioButtonyes.isSelected()==true) { - person.verantwortlicher.setVorname(Vorname.getText()); - person.verantwortlicher.setName(Nachname.getText()); - person.verantwortlicher.setEMail(EMail.getText()); - - person.verantwortlicher.setHochschule(Hochschule.getText()); - - - EingabeVeranstatlungTechnisch_GUI ea=new EingabeVeranstatlungTechnisch_GUI(); - ea.setVisible(true); - dispose(); + Lecture.lecture.setActive(true); } - else{ - JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); + else + { + Lecture.lecture.setActive(false); } + + Lecture.lecture.setName(textFieldLaborname.getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(textFieldLaborname.getText()); + + MainMenue_GUI sr=new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + LinkImage_GUI ev=new LinkImage_GUI(); + ev.setVisible(true); + dispose(); } }); cancelButton.setActionCommand("Cancel"); @@ -275,6 +371,10 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { separator_1.setBounds(0, 627, 597, 2); getContentPane().add(separator_1); + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(32, 602, 136, 14); + getContentPane().add(lblPflichtfelder); + JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); diff --git a/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java b/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java deleted file mode 100644 index 6f645ac5..00000000 --- a/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java +++ /dev/null @@ -1,328 +0,0 @@ -package gui; - - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.ScrollPane; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.ButtonGroup; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.Image; -import models.Lecture; - - -import com.toedter.calendar.JDateChooser; - -@SuppressWarnings("serial") -public class EingabeVeranstatlungTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - 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 - 722) / 2; - int left=(screenSize.width - 603) / 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, 175, 250, 14); - contentPanel.add(lblKurzbeschreibung); - - ScrollPane scrollPane = new ScrollPane(); - scrollPane.setBounds(270, 175, 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, 315, 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, 318, 250, 14); - contentPanel.add(label); - - JLabel lblGltigkeitsdatum = new JLabel("G\u00FCltigkeitsdatum: *"); - lblGltigkeitsdatum.setBounds(0, 464, 250, 14); - contentPanel.add(lblGltigkeitsdatum); - - JLabel lblVon = new JLabel("von:"); - lblVon.setBounds(270, 461, 30, 20); - contentPanel.add(lblVon); - - dateChooserstart = new JDateChooser(); - dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserstart.setBounds(332, 458, 101, 20); - contentPanel.add(dateChooserstart); - - JLabel lblBis = new JLabel("bis"); - lblBis.setBounds(443, 461, 24, 20); - contentPanel.add(lblBis); - - dateChooserend = new JDateChooser(); - dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss"); - dateChooserend.setBounds(477, 459, 100, 20); - contentPanel.add(dateChooserend); - - JLabel lblAktiv = new JLabel("Aktiv:"); - lblAktiv.setBounds(0, 492, 250, 14); - contentPanel.add(lblAktiv); - - JLabel lblimVmchooserSichtbar = new JLabel("(Im VMChooser sichtbar)"); - lblimVmchooserSichtbar.setBounds(0, 517, 250, 14); - contentPanel.add(lblimVmchooserSichtbar); - - rdbtnJa = new JRadioButton("Ja"); - rdbtnJa.setSelected(true); - buttonGroup.add(rdbtnJa); - rdbtnJa.setBounds(270, 488, 109, 23); - contentPanel.add(rdbtnJa); - - JRadioButton rdbtnNein = new JRadioButton("Nein"); - buttonGroup.add(rdbtnNein); - rdbtnNein.setBounds(381, 488, 109, 23); - contentPanel.add(rdbtnNein); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setWrapStyleWord(true); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setBounds(10, 82, 567, 59); - contentPanel.add(txtrGebenSieBitte); - //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()); - Image.image.setImagename(textFieldLaborname.getText()); - - 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()); - Image.image.setImagename(textFieldLaborname.getText()); - 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/MainMenue_GUI.java b/Dozentenmodul/src/GUI/MainMenue_GUI.java index e68e4bbd..82031914 100644 --- a/Dozentenmodul/src/GUI/MainMenue_GUI.java +++ b/Dozentenmodul/src/GUI/MainMenue_GUI.java @@ -403,8 +403,8 @@ public class MainMenue_GUI extends JFrame { av.setVisible(true);
dispose();
} else if (rdbtnVeranstaltungEdit.isSelected() == true) {
- EditVeranstaltungAllgemein_GUI ev = new EditVeranstaltungAllgemein_GUI();
- ev.setVisible(true);
+ SearchEditLecture_GUI sl=new SearchEditLecture_GUI();
+ sl.setVisible(true);
dispose();
}
}
diff --git a/Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java b/Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java index 8bd57eac..57980a9b 100644 --- a/Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java @@ -31,7 +31,13 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; +import models.Image; +import models.Lecture; import models.person; +import javax.swing.JTextArea; +import java.awt.ScrollPane; +import com.toedter.calendar.JDateChooser; +import javax.swing.JRadioButton; @SuppressWarnings("serial") @@ -43,6 +49,12 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame { private JTextField Nachname; private JTextField Hochschule; private JTextField EMail; + private JTextField textFieldLaborname; + JTextArea description; + JRadioButton radioButtonyes; + JDateChooser dateChooserend; + JDateChooser dateChooserstart; + /** * Launch the application. */ @@ -99,7 +111,7 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame { 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); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); panel.add(txtpnBitteWhlenSie); } contentPanel.setBounds(10, 85, 577, 493); @@ -111,7 +123,7 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame { 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); + panel_1.setBounds(10, 331, 557, 162); contentPanel.add(panel_1); panel_1.setLayout(null); @@ -178,10 +190,6 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame { 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 @@ -212,6 +220,83 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame { JLabel lblNewLabel_1 = new JLabel("Neu"); lblNewLabel_1.setBounds(146, 11, 46, 14); contentPanel.add(lblNewLabel_1); + + JPanel panel_2 = new JPanel(); + panel_2.setLayout(null); + panel_2.setBorder(new TitledBorder(null, "Veranstaltungsdaten", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(10, 36, 557, 284); + contentPanel.add(panel_2); + + JLabel label_3 = new JLabel("Laborname (Anzeigename): *"); + label_3.setBounds(10, 25, 180, 14); + panel_2.add(label_3); + + textFieldLaborname = new JTextField(); + textFieldLaborname.setColumns(10); + textFieldLaborname.setBounds(200, 22, 347, 20); + panel_2.add(textFieldLaborname); + + JTextArea textArea = new JTextArea(); + textArea.setWrapStyleWord(true); + textArea.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); + textArea.setLineWrap(true); + textArea.setFont(new Font("Tahoma", Font.PLAIN, 12)); + textArea.setBackground(SystemColor.menu); + textArea.setBounds(10, 49, 537, 49); + panel_2.add(textArea); + + JLabel label_4 = new JLabel("Kurzbeschreibung: *"); + label_4.setBounds(10, 111, 180, 14); + panel_2.add(label_4); + + ScrollPane scrollPane = new ScrollPane(); + scrollPane.setBounds(200, 104, 347, 78); + panel_2.add(scrollPane); + description = new JTextArea(); + description.setLineWrap(true); + scrollPane.add(description); + description.setBounds(0, 0, 4, 22); + scrollPane.add(description); + + dateChooserend = new JDateChooser(); + dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss"); + dateChooserend.setBounds(385, 188, 100, 20); + panel_2.add(dateChooserend); + + JLabel label_5 = new JLabel("bis"); + label_5.setBounds(351, 188, 24, 20); + panel_2.add(label_5); + + dateChooserstart = new JDateChooser(); + dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserstart.setBounds(240, 188, 101, 20); + panel_2.add(dateChooserstart); + + JLabel label_6 = new JLabel("von:"); + label_6.setBounds(200, 188, 30, 20); + panel_2.add(label_6); + + JLabel label_10 = new JLabel("G\u00FCltigkeitsdatum: *"); + label_10.setBounds(10, 188, 250, 14); + panel_2.add(label_10); + + JLabel label_11 = new JLabel("Aktiv:"); + label_11.setBounds(10, 229, 250, 14); + panel_2.add(label_11); + + radioButtonyes = new JRadioButton("Ja"); + radioButtonyes.setSelected(true); + radioButtonyes.setBounds(240, 225, 109, 23); + panel_2.add(radioButtonyes); + + JRadioButton radioButtonno = new JRadioButton("Nein"); + radioButtonno.setBounds(385, 225, 109, 23); + panel_2.add(radioButtonno); + + JLabel label_12 = new JLabel("(Im VMChooser sichtbar)"); + label_12.setBounds(10, 254, 250, 14); + panel_2.add(label_12); { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 640, 597, 33); @@ -222,7 +307,20 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame { JButton okButton = new JButton("Zur\u00FCck"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - + if(radioButtonyes.isSelected()==true) + { + Lecture.lecture.setActive(true); + } + else + { + Lecture.lecture.setActive(false); + } + + Lecture.lecture.setName(textFieldLaborname.getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(textFieldLaborname.getText()); MainMenue_GUI sr=new MainMenue_GUI(); sr.setVisible(true); @@ -237,25 +335,25 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame { 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) + if(radioButtonyes.isSelected()==true) { - person.verantowrtlicher.setVorname(Vorname.getText()); - person.verantowrtlicher.setName(Nachname.getText()); - person.verantowrtlicher.setEMail(EMail.getText()); - - person.verantowrtlicher.setHochschule(Hochschule.getText()); - - - EingabeVeranstatlungTechnisch_GUI ea=new EingabeVeranstatlungTechnisch_GUI(); - ea.setVisible(true); - dispose(); + Lecture.lecture.setActive(true); } - else{ - JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); + else + { + Lecture.lecture.setActive(false); } - }*/ - EditVeranstatlungTechnisch_GUI ev=new EditVeranstatlungTechnisch_GUI(); + + Lecture.lecture.setName(textFieldLaborname.getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(textFieldLaborname.getText()); + + MainMenue_GUI sr=new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + LinkImage_GUI ev=new LinkImage_GUI(); ev.setVisible(true); dispose(); } @@ -273,6 +371,10 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame { separator_1.setBounds(0, 627, 597, 2); getContentPane().add(separator_1); + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(32, 602, 136, 14); + getContentPane().add(lblPflichtfelder); + JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); diff --git a/Dozentenmodul/src/gui/EditVeranstatlungTechnisch_GUI.java b/Dozentenmodul/src/gui/EditVeranstatlungTechnisch_GUI.java deleted file mode 100644 index 7e78df26..00000000 --- a/Dozentenmodul/src/gui/EditVeranstatlungTechnisch_GUI.java +++ /dev/null @@ -1,328 +0,0 @@ -package gui; - - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.ScrollPane; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.ButtonGroup; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.Image; -import models.Lecture; - - -import com.toedter.calendar.JDateChooser; - -@SuppressWarnings("serial") -public class EditVeranstatlungTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - 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 { - EditVeranstatlungTechnisch_GUI dialog = new EditVeranstatlungTechnisch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EditVeranstatlungTechnisch_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 - 722) / 2; - int left=(screenSize.width - 603) / 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) { - - EditVeranstatlungTechnisch_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, 175, 250, 14); - contentPanel.add(lblKurzbeschreibung); - - ScrollPane scrollPane = new ScrollPane(); - scrollPane.setBounds(270, 175, 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, 315, 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, 318, 250, 14); - contentPanel.add(label); - - JLabel lblGltigkeitsdatum = new JLabel("G\u00FCltigkeitsdatum: *"); - lblGltigkeitsdatum.setBounds(0, 464, 250, 14); - contentPanel.add(lblGltigkeitsdatum); - - JLabel lblVon = new JLabel("von:"); - lblVon.setBounds(270, 461, 30, 20); - contentPanel.add(lblVon); - - dateChooserstart = new JDateChooser(); - dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserstart.setBounds(332, 458, 101, 20); - contentPanel.add(dateChooserstart); - - JLabel lblBis = new JLabel("bis"); - lblBis.setBounds(443, 461, 24, 20); - contentPanel.add(lblBis); - - dateChooserend = new JDateChooser(); - dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss"); - dateChooserend.setBounds(477, 459, 100, 20); - contentPanel.add(dateChooserend); - - JLabel lblAktiv = new JLabel("Aktiv:"); - lblAktiv.setBounds(0, 492, 250, 14); - contentPanel.add(lblAktiv); - - JLabel lblimVmchooserSichtbar = new JLabel("(Im VMChooser sichtbar)"); - lblimVmchooserSichtbar.setBounds(0, 517, 250, 14); - contentPanel.add(lblimVmchooserSichtbar); - - rdbtnJa = new JRadioButton("Ja"); - rdbtnJa.setSelected(true); - buttonGroup.add(rdbtnJa); - rdbtnJa.setBounds(270, 488, 109, 23); - contentPanel.add(rdbtnJa); - - JRadioButton rdbtnNein = new JRadioButton("Nein"); - buttonGroup.add(rdbtnNein); - rdbtnNein.setBounds(381, 488, 109, 23); - contentPanel.add(rdbtnNein); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setWrapStyleWord(true); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setBounds(10, 82, 567, 59); - contentPanel.add(txtrGebenSieBitte); - //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()); - Image.image.setImagename(textFieldLaborname.getText()); - - 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()); - Image.image.setImagename(textFieldLaborname.getText()); - 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/EingabeVeranstaltungAllgemein_GUI.java b/Dozentenmodul/src/gui/EingabeVeranstaltungAllgemein_GUI.java index 6bc55553..0946b6df 100644 --- a/Dozentenmodul/src/gui/EingabeVeranstaltungAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/EingabeVeranstaltungAllgemein_GUI.java @@ -31,7 +31,13 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; +import models.Image; +import models.Lecture; import models.person; +import javax.swing.JTextArea; +import java.awt.ScrollPane; +import com.toedter.calendar.JDateChooser; +import javax.swing.JRadioButton; @SuppressWarnings("serial") @@ -43,6 +49,12 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { private JTextField Nachname; private JTextField Hochschule; private JTextField EMail; + private JTextField textFieldLaborname; + JTextArea description; + JRadioButton radioButtonyes; + JDateChooser dateChooserend; + JDateChooser dateChooserstart; + /** * Launch the application. */ @@ -99,7 +111,7 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { 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); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); panel.add(txtpnBitteWhlenSie); } contentPanel.setBounds(10, 85, 577, 493); @@ -111,7 +123,7 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { 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); + panel_1.setBounds(10, 331, 557, 162); contentPanel.add(panel_1); panel_1.setLayout(null); @@ -178,10 +190,6 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { 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 @@ -212,6 +220,83 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { JLabel lblNewLabel_1 = new JLabel("Neu"); lblNewLabel_1.setBounds(146, 11, 46, 14); contentPanel.add(lblNewLabel_1); + + JPanel panel_2 = new JPanel(); + panel_2.setLayout(null); + panel_2.setBorder(new TitledBorder(null, "Veranstaltungsdaten", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(10, 36, 557, 284); + contentPanel.add(panel_2); + + JLabel label_3 = new JLabel("Laborname (Anzeigename): *"); + label_3.setBounds(10, 25, 180, 14); + panel_2.add(label_3); + + textFieldLaborname = new JTextField(); + textFieldLaborname.setColumns(10); + textFieldLaborname.setBounds(200, 22, 347, 20); + panel_2.add(textFieldLaborname); + + JTextArea textArea = new JTextArea(); + textArea.setWrapStyleWord(true); + textArea.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); + textArea.setLineWrap(true); + textArea.setFont(new Font("Tahoma", Font.PLAIN, 12)); + textArea.setBackground(SystemColor.menu); + textArea.setBounds(10, 49, 537, 49); + panel_2.add(textArea); + + JLabel label_4 = new JLabel("Kurzbeschreibung: *"); + label_4.setBounds(10, 111, 180, 14); + panel_2.add(label_4); + + ScrollPane scrollPane = new ScrollPane(); + scrollPane.setBounds(200, 104, 347, 78); + panel_2.add(scrollPane); + description = new JTextArea(); + description.setLineWrap(true); + scrollPane.add(description); + description.setBounds(0, 0, 4, 22); + scrollPane.add(description); + + dateChooserend = new JDateChooser(); + dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss"); + dateChooserend.setBounds(385, 188, 100, 20); + panel_2.add(dateChooserend); + + JLabel label_5 = new JLabel("bis"); + label_5.setBounds(351, 188, 24, 20); + panel_2.add(label_5); + + dateChooserstart = new JDateChooser(); + dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserstart.setBounds(240, 188, 101, 20); + panel_2.add(dateChooserstart); + + JLabel label_6 = new JLabel("von:"); + label_6.setBounds(200, 188, 30, 20); + panel_2.add(label_6); + + JLabel label_10 = new JLabel("G\u00FCltigkeitsdatum: *"); + label_10.setBounds(10, 188, 250, 14); + panel_2.add(label_10); + + JLabel label_11 = new JLabel("Aktiv:"); + label_11.setBounds(10, 229, 250, 14); + panel_2.add(label_11); + + radioButtonyes = new JRadioButton("Ja"); + radioButtonyes.setSelected(true); + radioButtonyes.setBounds(240, 225, 109, 23); + panel_2.add(radioButtonyes); + + JRadioButton radioButtonno = new JRadioButton("Nein"); + radioButtonno.setBounds(385, 225, 109, 23); + panel_2.add(radioButtonno); + + JLabel label_12 = new JLabel("(Im VMChooser sichtbar)"); + label_12.setBounds(10, 254, 250, 14); + panel_2.add(label_12); { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 640, 597, 33); @@ -222,13 +307,20 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { JButton okButton = new JButton("Zur\u00FCck"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - person.verantwortlicher.setVorname(Vorname.getText()); - person.verantwortlicher.setName(Nachname.getText()); - person.verantwortlicher.setEMail(EMail.getText()); - - person.verantwortlicher.setHochschule(Hochschule.getText()); - + if(radioButtonyes.isSelected()==true) + { + Lecture.lecture.setActive(true); + } + else + { + Lecture.lecture.setActive(false); + } + Lecture.lecture.setName(textFieldLaborname.getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(textFieldLaborname.getText()); MainMenue_GUI sr=new MainMenue_GUI(); sr.setVisible(true); @@ -243,23 +335,27 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { 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) + if(radioButtonyes.isSelected()==true) { - person.verantwortlicher.setVorname(Vorname.getText()); - person.verantwortlicher.setName(Nachname.getText()); - person.verantwortlicher.setEMail(EMail.getText()); - - person.verantwortlicher.setHochschule(Hochschule.getText()); - - - EingabeVeranstatlungTechnisch_GUI ea=new EingabeVeranstatlungTechnisch_GUI(); - ea.setVisible(true); - dispose(); + Lecture.lecture.setActive(true); } - else{ - JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); + else + { + Lecture.lecture.setActive(false); } + + Lecture.lecture.setName(textFieldLaborname.getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(textFieldLaborname.getText()); + + MainMenue_GUI sr=new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + LinkImage_GUI ev=new LinkImage_GUI(); + ev.setVisible(true); + dispose(); } }); cancelButton.setActionCommand("Cancel"); @@ -275,6 +371,10 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { separator_1.setBounds(0, 627, 597, 2); getContentPane().add(separator_1); + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(32, 602, 136, 14); + getContentPane().add(lblPflichtfelder); + JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); diff --git a/Dozentenmodul/src/gui/EingabeVeranstatlungTechnisch_GUI.java b/Dozentenmodul/src/gui/EingabeVeranstatlungTechnisch_GUI.java deleted file mode 100644 index 6f645ac5..00000000 --- a/Dozentenmodul/src/gui/EingabeVeranstatlungTechnisch_GUI.java +++ /dev/null @@ -1,328 +0,0 @@ -package gui; - - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.ScrollPane; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.ButtonGroup; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.Image; -import models.Lecture; - - -import com.toedter.calendar.JDateChooser; - -@SuppressWarnings("serial") -public class EingabeVeranstatlungTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - 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 - 722) / 2; - int left=(screenSize.width - 603) / 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, 175, 250, 14); - contentPanel.add(lblKurzbeschreibung); - - ScrollPane scrollPane = new ScrollPane(); - scrollPane.setBounds(270, 175, 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, 315, 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, 318, 250, 14); - contentPanel.add(label); - - JLabel lblGltigkeitsdatum = new JLabel("G\u00FCltigkeitsdatum: *"); - lblGltigkeitsdatum.setBounds(0, 464, 250, 14); - contentPanel.add(lblGltigkeitsdatum); - - JLabel lblVon = new JLabel("von:"); - lblVon.setBounds(270, 461, 30, 20); - contentPanel.add(lblVon); - - dateChooserstart = new JDateChooser(); - dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserstart.setBounds(332, 458, 101, 20); - contentPanel.add(dateChooserstart); - - JLabel lblBis = new JLabel("bis"); - lblBis.setBounds(443, 461, 24, 20); - contentPanel.add(lblBis); - - dateChooserend = new JDateChooser(); - dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss"); - dateChooserend.setBounds(477, 459, 100, 20); - contentPanel.add(dateChooserend); - - JLabel lblAktiv = new JLabel("Aktiv:"); - lblAktiv.setBounds(0, 492, 250, 14); - contentPanel.add(lblAktiv); - - JLabel lblimVmchooserSichtbar = new JLabel("(Im VMChooser sichtbar)"); - lblimVmchooserSichtbar.setBounds(0, 517, 250, 14); - contentPanel.add(lblimVmchooserSichtbar); - - rdbtnJa = new JRadioButton("Ja"); - rdbtnJa.setSelected(true); - buttonGroup.add(rdbtnJa); - rdbtnJa.setBounds(270, 488, 109, 23); - contentPanel.add(rdbtnJa); - - JRadioButton rdbtnNein = new JRadioButton("Nein"); - buttonGroup.add(rdbtnNein); - rdbtnNein.setBounds(381, 488, 109, 23); - contentPanel.add(rdbtnNein); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setWrapStyleWord(true); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setBounds(10, 82, 567, 59); - contentPanel.add(txtrGebenSieBitte); - //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()); - Image.image.setImagename(textFieldLaborname.getText()); - - 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()); - Image.image.setImagename(textFieldLaborname.getText()); - 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/MainMenue_GUI.java b/Dozentenmodul/src/gui/MainMenue_GUI.java index 11783d60..cc878613 100644 --- a/Dozentenmodul/src/gui/MainMenue_GUI.java +++ b/Dozentenmodul/src/gui/MainMenue_GUI.java @@ -403,8 +403,8 @@ public class MainMenue_GUI extends JFrame { av.setVisible(true); dispose(); } else if (rdbtnVeranstaltungEdit.isSelected() == true) { - EditVeranstaltungAllgemein_GUI ev = new EditVeranstaltungAllgemein_GUI(); - ev.setVisible(true); + SearchEditLecture_GUI sl=new SearchEditLecture_GUI(); + sl.setVisible(true); dispose(); } } diff --git a/Dozentenmodul/src/gui/SearchEditLecture_GUI.java b/Dozentenmodul/src/gui/SearchEditLecture_GUI.java new file mode 100644 index 00000000..f0e360cd --- /dev/null +++ b/Dozentenmodul/src/gui/SearchEditLecture_GUI.java @@ -0,0 +1,462 @@ +package gui; + + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.SystemColor; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.util.Iterator; +import java.util.List; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.JScrollPane; +import javax.swing.JSeparator; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.JTextPane; +import javax.swing.RowFilter; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableModel; +import javax.swing.table.TableRowSorter; +import models.Image; +import models.person; +//import models.person; + +import org.apache.thrift.TException; + +import server.Server.Client; +import thrift.ThriftConnection; + + +@SuppressWarnings("serial") +public class SearchEditLecture_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JTable tableAllLectures; + JTable tablemyLectures; + private JTextField textFieldName; + JTabbedPane tabbedPane; + String[] titles= {"Veranstaltungsname", "Beschreibung", "Gültigkeitsdatum", "Aktiv","Letzte Benutzung" ,"Verantwortlicher", "Image", "Schlagwort","ID"}; + ThriftConnection con=new ThriftConnection(); + Client client=con.getThriftConnection(); + final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 ); + final DefaultTableModel modelMyLectures = new DefaultTableModel( titles, 0 ); + final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( modelAll ); + final TableRowSorter<TableModel> rowSorterMyLectures = new TableRowSorter<TableModel>( modelMyLectures ); + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + SearchEditLecture_GUI dialog = new SearchEditLecture_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public SearchEditLecture_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + //Beendet die Anwendung nach klick auf X + con.closeThriftConnection(); + System.exit(0); + } + }); + //Verhindert das Vergrößern Des Fensters + setResizable(false); + + try { + //Setzt das Look & Feel auf System + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + //Setzt den Fenstertitel + setTitle("bwLehrpool Suite *Prototyp*"); + //Zentriert das Fenster in die Bildmitte + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top=(screenSize.height - 722) / 2; + int left=(screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + + + + 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 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("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); + + textFieldName = new JTextField(); + //Key Listener der Tastatureingabe registriert + textFieldName.addKeyListener(new KeyAdapter() { + @Override + public void keyReleased(KeyEvent e) { + //Textfield eingabe auslesen + String stext=textFieldName.getText(); + + //Wenn Textfield nicht leer + if(stext!="") + { + //Filtere nach der Eingabe + rowSorterAll.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); + rowSorterMyLectures.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); + + } + }}); + + + 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) { + //Öffnet das Fenster Extended GUI + con.closeThriftConnection(); + ExtendedSearch_GUI es=new ExtendedSearch_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + //Öffnet das Hauütmenü + con.closeThriftConnection(); + SearchEditLecture_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, 75, 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("Veranstaltungsauswahl"); + lblNewLabel_1.setBounds(166, 11, 128, 14); + contentPanel.add(lblNewLabel_1); + + tabbedPane = new JTabbedPane(JTabbedPane.TOP); + tabbedPane.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent arg0) { + System.out.println(tabbedPane.getSelectedIndex()); + if(tabbedPane.getSelectedIndex()==0){ + + String username= person.verantwortlicher.getName()+" "+person.verantwortlicher.getVorname(); + //String username="Spitzer Tobias"; + rowSorterMyLectures.setRowFilter(RowFilter.regexFilter(username, 5)); + } + else if(tabbedPane.getSelectedIndex()==1){ + + + + } + + } + }); + + tabbedPane.setBounds(10, 197, 557, 300); + contentPanel.add(tabbedPane); + initTableModel(modelMyLectures); + + JScrollPane scrollPaneAllImages = new JScrollPane(); + tableAllLectures=new JTable(); + tableAllLectures.setModel(modelAll); + tableAllLectures.getColumnModel().getColumn(1).sizeWidthToFit(); + tableAllLectures.getColumnModel().getColumn(2).sizeWidthToFit(); + tableAllLectures.getColumnModel().getColumn(3).sizeWidthToFit(); + tableAllLectures.getColumnModel().getColumn(4).sizeWidthToFit(); + tableAllLectures.getColumnModel().getColumn(5).sizeWidthToFit(); + initTableModel(modelAll); + + JScrollPane scrollPaneMyImage = new JScrollPane(); + tablemyLectures=new JTable(); + tablemyLectures.setModel(modelMyLectures); + + tablemyLectures.getColumnModel().getColumn(1).sizeWidthToFit(); + tablemyLectures.getColumnModel().getColumn(2).sizeWidthToFit(); + tablemyLectures.getColumnModel().getColumn(3).sizeWidthToFit(); + tablemyLectures.getColumnModel().getColumn(4).sizeWidthToFit(); + tablemyLectures.getColumnModel().getColumn(5).sizeWidthToFit(); + tablemyLectures.setRowSorter(rowSorterMyLectures); + + scrollPaneMyImage.setViewportView(tablemyLectures); + tabbedPane.addTab("Meine Veranstaltungen", null, scrollPaneMyImage, null); + tableAllLectures.setRowSorter(rowSorterAll); + + scrollPaneAllImages.setViewportView(tableAllLectures); + tabbedPane.addTab("Alle", null, scrollPaneAllImages, 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 Veranstaltungen", null, scrollPaneCoopImages, null); + tabbedPane.setEnabledAt(2, false); + + 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); + tabbedPane.setEnabledAt(3, false); + + 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); + tabbedPane.setEnabledAt(4, false); + + + + + JButton btnDownload = new JButton("Download"); + btnDownload.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + //Öffnet den Downloader + + if(tablemyLectures.getSelectedRow()!=-1) + { + String imageid=modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 7).toString(); + + Image.image.setImageId(imageid); + String imageversion=modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 8).toString(); + + Image.image.setVersion(imageversion); + SearchEditLecture_GUI.this.setVisible(false); + FTPDownloader_GUI down=new FTPDownloader_GUI(); + down.setVisible(true); + con.closeThriftConnection(); + + + + } + else{ + JOptionPane.showMessageDialog(null, "Bitte wählen Sie ein Image für den Download aus", "Message", + JOptionPane.INFORMATION_MESSAGE); + } + } + }); + btnDownload.setBounds(449, 508, 118, 23); + contentPanel.add(btnDownload); + { + 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) { + //Öffnet das Hauptmenü + con.closeThriftConnection(); + MainMenue_GUI main=new MainMenue_GUI(); + main.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) { + con.closeThriftConnection(); + + //Image.image.setImageId(imageid); + if(tabbedPane.getSelectedIndex()==0){ + String imageid=modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 7).toString(); + + Image.image.setImageId(imageid); + String imageversion=modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 8).toString(); + + Image.image.setVersion(imageversion); + con.closeThriftConnection(); + EditImageAllgemein_GUI ea=new EditImageAllgemein_GUI(); + ea.setVisible(true); + dispose(); + } + else{ + JOptionPane.showMessageDialog(null, "Bitte wählen Sie ein eigenes Image aus", "Message", + JOptionPane.INFORMATION_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_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); + + } + //Initiale Beffülung eines Table models + public DefaultTableModel initTableModel(DefaultTableModel model){ + List<server.Lecture> lectures; + try { + //Hole eine Liste der Images + lectures = client.getLectureList(); + + Iterator<server.Lecture> i=lectures.iterator(); + + int x=0; + + while(i.hasNext()) + { + //erzeuge Objekte für die Tabelle + System.out.println(lectures.get(x).lecturename); + Object [] obj={lectures.get(x).lecturename,lectures.get(x).desc,lectures.get(x).starttime+" "+lectures.get(x).endtime,lectures.get(x).isActive,lectures.get(x).lastused,lectures.get(x).username,lectures.get(x).imagename,lectures.get(x).id}; + //String[] titles= {"Veranstaltungsname", "Beschreibung", "Gültigkeitsdatum", "Aktiv","Letzte Benutzung" ,"Verantwortlicher", "Image", "Schlagwort","ID"}; + //System.out.println("id:"+images.get(x).getId()); + //Füge diese Objekte der Tabelle hinzu + model.addRow(obj); + x++; + i.next(); + + } + + return model; + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + return model; + } + + } + + |