summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul
diff options
context:
space:
mode:
authorunknown2014-04-04 11:55:21 +0200
committerunknown2014-04-04 11:55:21 +0200
commit367db7b0832e1325a0f1d0580baffa28deca86f4 (patch)
treea79a33d3ab4c7e6539d94e4d081f2fd14d414e77 /Dozentenmodul
parentneue Version (diff)
downloadtutor-module-367db7b0832e1325a0f1d0580baffa28deca86f4.tar.gz
tutor-module-367db7b0832e1325a0f1d0580baffa28deca86f4.tar.xz
tutor-module-367db7b0832e1325a0f1d0580baffa28deca86f4.zip
test
Diffstat (limited to 'Dozentenmodul')
-rw-r--r--Dozentenmodul/bin/Models/Lecture.classbin1644 -> 2035 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditLinkImage_GUI$1.classbin0 -> 686 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditLinkImage_GUI$2.classbin0 -> 1481 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditLinkImage_GUI$3.classbin0 -> 754 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditLinkImage_GUI$4.classbin0 -> 1502 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditLinkImage_GUI$5.classbin0 -> 763 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditLinkImage_GUI$6.classbin0 -> 805 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditLinkImage_GUI$7.classbin0 -> 2426 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditLinkImage_GUI.classbin0 -> 11337 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.classbin764 -> 764 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.classbin841 -> 841 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.classbin1874 -> 1874 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.classbin1976 -> 1874 bytes
-rw-r--r--Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.classbin9371 -> 9967 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.classbin831 -> 831 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.classbin1265 -> 1265 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.classbin899 -> 899 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.classbin908 -> 908 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.classbin1743 -> 1743 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.classbin1855 -> 950 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.classbin950 -> 2992 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditLecture_GUI$8.classbin1986 -> 0 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditLecture_GUI.classbin11517 -> 11376 bytes
-rw-r--r--Dozentenmodul/bin/models/Lecture.classbin1644 -> 2035 bytes
-rw-r--r--Dozentenmodul/src/Models/Lecture.java19
-rw-r--r--Dozentenmodul/src/gui/EditLinkImage_GUI.java436
-rw-r--r--Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java32
-rw-r--r--Dozentenmodul/src/gui/SearchEditLecture_GUI.java82
-rw-r--r--Dozentenmodul/src/models/Lecture.java19
29 files changed, 531 insertions, 57 deletions
diff --git a/Dozentenmodul/bin/Models/Lecture.class b/Dozentenmodul/bin/Models/Lecture.class
index 6626b998..7c968cd1 100644
--- a/Dozentenmodul/bin/Models/Lecture.class
+++ b/Dozentenmodul/bin/Models/Lecture.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$1.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$1.class
new file mode 100644
index 00000000..678491af
--- /dev/null
+++ b/Dozentenmodul/bin/gui/EditLinkImage_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$2.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$2.class
new file mode 100644
index 00000000..6384d363
--- /dev/null
+++ b/Dozentenmodul/bin/gui/EditLinkImage_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$3.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$3.class
new file mode 100644
index 00000000..e94e0e13
--- /dev/null
+++ b/Dozentenmodul/bin/gui/EditLinkImage_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$4.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$4.class
new file mode 100644
index 00000000..b952d8f3
--- /dev/null
+++ b/Dozentenmodul/bin/gui/EditLinkImage_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$5.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$5.class
new file mode 100644
index 00000000..434f209e
--- /dev/null
+++ b/Dozentenmodul/bin/gui/EditLinkImage_GUI$5.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$6.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$6.class
new file mode 100644
index 00000000..a38e792e
--- /dev/null
+++ b/Dozentenmodul/bin/gui/EditLinkImage_GUI$6.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$7.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$7.class
new file mode 100644
index 00000000..07d40c7e
--- /dev/null
+++ b/Dozentenmodul/bin/gui/EditLinkImage_GUI$7.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI.class
new file mode 100644
index 00000000..218bfa86
--- /dev/null
+++ b/Dozentenmodul/bin/gui/EditLinkImage_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class
index 7cf31fef..43873477 100644
--- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class
+++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class
index b4b44d0c..98d359ee 100644
--- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class
+++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class
index ce4c4410..ac902be7 100644
--- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class
+++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class
index b4468b87..b786208b 100644
--- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class
+++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class
index c8267a99..1c9bf34c 100644
--- a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class
+++ b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class
index e78c4d43..24e378be 100644
--- a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class
+++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class
index 98148b0d..1b56fca6 100644
--- a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class
+++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class
index 441eb2c3..b48d68c6 100644
--- a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class
+++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class
index 34e2329f..e37e9a30 100644
--- a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class
+++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class
index c2cd1958..d8cad4d1 100644
--- a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class
+++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class
index 7fc7e77f..fe6a0214 100644
--- a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class
+++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class
index 885be80b..64b0b1ae 100644
--- a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class
+++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$8.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$8.class
deleted file mode 100644
index 882cfb27..00000000
--- a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$8.class
+++ /dev/null
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class
index 317d2a79..ed3f1c5b 100644
--- a/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class
+++ b/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/models/Lecture.class b/Dozentenmodul/bin/models/Lecture.class
index 6626b998..7c968cd1 100644
--- a/Dozentenmodul/bin/models/Lecture.class
+++ b/Dozentenmodul/bin/models/Lecture.class
Binary files differ
diff --git a/Dozentenmodul/src/Models/Lecture.java b/Dozentenmodul/src/Models/Lecture.java
index 383bded9..069946b3 100644
--- a/Dozentenmodul/src/Models/Lecture.java
+++ b/Dozentenmodul/src/Models/Lecture.java
@@ -11,9 +11,28 @@ public class Lecture {
private Date startdate;
private Date enddate;
private boolean active;
+ private String id;
+ private String linkedImagename;
+
public static Lecture lecture =new Lecture();
+
+ public String getLinkedImagename() {
+ return linkedImagename;
+ }
+
+ public void setLinkedImagename(String linkedImagename) {
+ this.linkedImagename = linkedImagename;
+ }
+
+ public String getid() {
+ return id;
+ }
+
+ public void setid(String id) {
+ this.id = id;
+ }
public String getName() {
return name;
}
diff --git a/Dozentenmodul/src/gui/EditLinkImage_GUI.java b/Dozentenmodul/src/gui/EditLinkImage_GUI.java
new file mode 100644
index 00000000..8de896c3
--- /dev/null
+++ b/Dozentenmodul/src/gui/EditLinkImage_GUI.java
@@ -0,0 +1,436 @@
+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.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+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.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.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.table.DefaultTableModel;
+
+import models.Lecture;
+import models.person;
+
+import org.apache.thrift.TException;
+
+import server.Server.Client;
+import thrift.ThriftConnection;
+
+@SuppressWarnings("serial")
+public class EditLinkImage_GUI extends JFrame {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ JRadioButton rdbtnInternetJa;
+ JRadioButton rdbtnInternetNein;
+ JComboBox<String> comboBox;
+ JTable tableAllImages;
+ private JTextField textFieldName;
+ String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort"};
+ ThriftConnection thrift=new ThriftConnection();
+ Client client=thrift.getThriftConnection();
+
+
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ EditLinkImage_GUI dialog = new EditLinkImage_GUI();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public EditLinkImage_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);
+
+
+ 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("Veanstaltung verlinken");
+ 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<String>();
+ try {
+ List<String> list=client.getAllOS();
+ comboBox.addItem("");
+ for(int i=0;i<list.size();i++)
+ {
+ comboBox.addItem(list.get(i));
+ }
+ } catch (TException 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) {
+
+ EditLinkImage_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, 76, 14);
+ contentPanel.add(lblVlimage);
+
+ JLabel label_2 = new JLabel(">");
+ label_2.setBounds(151, 11, 13, 14);
+ contentPanel.add(label_2);
+
+ JLabel lblNewLabel_1 = new JLabel("Veranstaltung verlinken");
+ lblNewLabel_1.setBounds(164, 11, 113, 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);
+
+ JButton btnLinkLschen = new JButton("Link l\u00F6schen");
+ btnLinkLschen.setBounds(478, 508, 89, 23);
+ contentPanel.add(btnLinkLschen);
+
+ 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) {
+
+ 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();
+ try {
+ DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+ System.out.println(formatter.format(Lecture.lecture.getStartdate()).toString());
+ client.writeLecturedata(Lecture.lecture.getName(), Lecture.lecture.getShortDesc(), Lecture.lecture.getDesc(), formatter.format(Lecture.lecture.getStartdate()).toString(), formatter.format(Lecture.lecture.getEnddate()).toString(), Lecture.lecture.isActive(), imagename, person.verantwortlicher.getVorname(), person.verantwortlicher.getName(), person.verantwortlicher.getHochschule(), person.verantwortlicher.getEMail(), person.verantwortlicher.getTel(), person.verantwortlicher.getFakultät());
+ } catch (TException 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<server.Image> images;
+ try {
+ images = client.getImageList();
+ Iterator<server.Image> i=images.iterator();
+ List<Object[]> ListObj = new ArrayList<Object[]>();
+ int x=0;
+
+ while(i.hasNext())
+ {
+
+ i.next();
+ Object [] obj={images.get(x).getImageName(),images.get(x).getLicenseRestriction(),images.get(x).getOsName(),images.get(x).getLectureName(),images.get(x).getUpdateTime(),images.get(x).getUserData()};
+ ListObj.add(obj);
+ model.addRow(ListObj.get(x));
+ x++;
+
+ }
+
+ return model;
+ } catch (TException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ return model;
+ }
+ }
+
+
diff --git a/Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java b/Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java
index 57980a9b..e4f1ca67 100644
--- a/Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java
+++ b/Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java
@@ -21,7 +21,6 @@ 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.JSeparator;
import javax.swing.JTextField;
@@ -38,6 +37,7 @@ import javax.swing.JTextArea;
import java.awt.ScrollPane;
import com.toedter.calendar.JDateChooser;
import javax.swing.JRadioButton;
+import javax.swing.ButtonGroup;
@SuppressWarnings("serial")
@@ -54,7 +54,8 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame {
JRadioButton radioButtonyes;
JDateChooser dateChooserend;
JDateChooser dateChooserstart;
-
+ JRadioButton radioButtonno;
+ private final ButtonGroup buttonGroup = new ButtonGroup();
/**
* Launch the application.
*/
@@ -233,6 +234,7 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame {
panel_2.add(label_3);
textFieldLaborname = new JTextField();
+ textFieldLaborname.setText(Lecture.lecture.getName());
textFieldLaborname.setColumns(10);
textFieldLaborname.setBounds(200, 22, 347, 20);
panel_2.add(textFieldLaborname);
@@ -246,7 +248,7 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame {
textArea.setBounds(10, 49, 537, 49);
panel_2.add(textArea);
- JLabel label_4 = new JLabel("Kurzbeschreibung: *");
+ JLabel label_4 = new JLabel("Beschreibung: *");
label_4.setBounds(10, 111, 180, 14);
panel_2.add(label_4);
@@ -254,13 +256,15 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame {
scrollPane.setBounds(200, 104, 347, 78);
panel_2.add(scrollPane);
description = new JTextArea();
+ description.setText(Lecture.lecture.getDesc());
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.setDateFormatString("dd-MM-yyyy hh:mm:ss");
+ dateChooserend.setDate(Lecture.lecture.getEnddate());
dateChooserend.setBounds(385, 188, 100, 20);
panel_2.add(dateChooserend);
@@ -270,6 +274,7 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame {
dateChooserstart = new JDateChooser();
dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss");
+ dateChooserstart.setDate(Lecture.lecture.getStartdate());
dateChooserstart.setBounds(240, 188, 101, 20);
panel_2.add(dateChooserstart);
@@ -286,11 +291,20 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame {
panel_2.add(label_11);
radioButtonyes = new JRadioButton("Ja");
- radioButtonyes.setSelected(true);
+ buttonGroup.add(radioButtonyes);
+ if(Lecture.lecture.isActive()==true)
+ {
+ radioButtonyes.setSelected(true);
+ }else
+ {
+ radioButtonno.setSelected(true);
+ }
+
radioButtonyes.setBounds(240, 225, 109, 23);
panel_2.add(radioButtonyes);
- JRadioButton radioButtonno = new JRadioButton("Nein");
+ radioButtonno = new JRadioButton("Nein");
+ buttonGroup.add(radioButtonno);
radioButtonno.setBounds(385, 225, 109, 23);
panel_2.add(radioButtonno);
@@ -350,9 +364,7 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame {
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();
@@ -394,4 +406,6 @@ public class EditVeranstaltungAllgemein_GUI extends JFrame {
mnNewMenu_1.add(mntmOtrs);
}
+
+
}
diff --git a/Dozentenmodul/src/gui/SearchEditLecture_GUI.java b/Dozentenmodul/src/gui/SearchEditLecture_GUI.java
index f0e360cd..9553bc6e 100644
--- a/Dozentenmodul/src/gui/SearchEditLecture_GUI.java
+++ b/Dozentenmodul/src/gui/SearchEditLecture_GUI.java
@@ -15,10 +15,12 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
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;
@@ -44,7 +46,8 @@ 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.Lecture;
import models.person;
//import models.person;
@@ -202,7 +205,7 @@ public class SearchEditLecture_GUI extends JFrame {
lblHauptmen.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
- //Öffnet das Hauütmenü
+ //Öffnet das Hauptmenü
con.closeThriftConnection();
SearchEditLecture_GUI.this.setVisible(false);
MainMenue_GUI main=new MainMenue_GUI();
@@ -237,7 +240,6 @@ public class SearchEditLecture_GUI extends JFrame {
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){
@@ -249,8 +251,9 @@ public class SearchEditLecture_GUI extends JFrame {
}
});
- tabbedPane.setBounds(10, 197, 557, 300);
+ tabbedPane.setBounds(10, 197, 557, 323);
contentPanel.add(tabbedPane);
+ System.out.println("haaaaaaaaaaa");
initTableModel(modelMyLectures);
JScrollPane scrollPaneAllImages = new JScrollPane();
@@ -319,39 +322,6 @@ public class SearchEditLecture_GUI extends JFrame {
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);
@@ -377,16 +347,36 @@ public class SearchEditLecture_GUI extends JFrame {
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();
+
+
+ Lecture.lecture.setid(modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 8).toString());
+ Lecture.lecture.setName(modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 0).toString());
+ Lecture.lecture.setDesc(modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 1).toString());
+ String date=modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 2).toString();
+ Lecture.lecture.setLinkedImagename(modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 6).toString());
+ String startdate=date.substring(0,date.indexOf(" "));
+ String enddate=date.substring(date.indexOf(" "));
+ DateFormat df=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
- Image.image.setImageId(imageid);
- String imageversion=modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 8).toString();
+ try {
+ Lecture.lecture.setEnddate(df.parse(enddate));
+ Lecture.lecture.setStartdate(df.parse(startdate));
+ } catch (ParseException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ if(modelMyLectures.getValueAt(tablemyLectures.convertRowIndexToModel(tablemyLectures.getSelectedRow()), 3).toString().equals("1")){
+ Lecture.lecture.setActive(true);
+ }
+ else
+ {
+ Lecture.lecture.setActive(false);
+ }
- Image.image.setVersion(imageversion);
con.closeThriftConnection();
EditImageAllgemein_GUI ea=new EditImageAllgemein_GUI();
ea.setVisible(true);
@@ -430,7 +420,6 @@ public class SearchEditLecture_GUI extends JFrame {
try {
//Hole eine Liste der Images
lectures = client.getLectureList();
-
Iterator<server.Lecture> i=lectures.iterator();
int x=0;
@@ -438,10 +427,7 @@ public class SearchEditLecture_GUI extends JFrame {
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());
+ 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};
//Füge diese Objekte der Tabelle hinzu
model.addRow(obj);
x++;
diff --git a/Dozentenmodul/src/models/Lecture.java b/Dozentenmodul/src/models/Lecture.java
index 383bded9..069946b3 100644
--- a/Dozentenmodul/src/models/Lecture.java
+++ b/Dozentenmodul/src/models/Lecture.java
@@ -11,9 +11,28 @@ public class Lecture {
private Date startdate;
private Date enddate;
private boolean active;
+ private String id;
+ private String linkedImagename;
+
public static Lecture lecture =new Lecture();
+
+ public String getLinkedImagename() {
+ return linkedImagename;
+ }
+
+ public void setLinkedImagename(String linkedImagename) {
+ this.linkedImagename = linkedImagename;
+ }
+
+ public String getid() {
+ return id;
+ }
+
+ public void setid(String id) {
+ this.id = id;
+ }
public String getName() {
return name;
}