From 6e3f6c95b83252b9f5969524ded68f3f31e27f4a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Apr 2014 09:47:17 +0200 Subject: FTP-Upload Benutzerfreundlicher gemacht --- Dozentenmodul/src/GUI/FTPUploader_GUI.java | 50 ++++++++++++++++++------------ Dozentenmodul/src/gui/FTPUploader_GUI.java | 50 ++++++++++++++++++------------ 2 files changed, 62 insertions(+), 38 deletions(-) diff --git a/Dozentenmodul/src/GUI/FTPUploader_GUI.java b/Dozentenmodul/src/GUI/FTPUploader_GUI.java index eaaf9544..93ea12e7 100644 --- a/Dozentenmodul/src/GUI/FTPUploader_GUI.java +++ b/Dozentenmodul/src/GUI/FTPUploader_GUI.java @@ -67,6 +67,9 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { ThriftConnection thrift = new ThriftConnection(); Client client = thrift.getThriftConnection(); JButton finishButton = new JButton("Fertigstellen"); + JButton btnUploadStarten = new JButton("Upload auf Server starten"); + JButton btnZurck = new JButton("Zur\u00FCck"); + int progress = 0; // progress of upload /** * Launch the application. @@ -136,7 +139,7 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { fc.showOpenDialog(getParent()); File file = fc.getSelectedFile(); - //check if a file is selected and exists + // check if a file is selected and exists if (file != null) { System.out.println("File to upload exists"); uploadFile = file; @@ -145,7 +148,7 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } else { System.out.println("No file selected"); lblNewLabel.setText(""); - }//end if + }// end if } }); @@ -155,11 +158,22 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } lblNewLabel = new JLabel(""); + lblNewLabel.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent arg0) { + if (lblNewLabel.getText().isEmpty()) { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(false); + } else { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(true); + } + } + }); lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT); lblNewLabel.setBounds(285, 124, 302, 23); contentPanel.add(lblNewLabel); - JButton btnUploadStarten = new JButton("Upload auf Server starten"); + btnUploadStarten.setEnabled(false); btnUploadStarten.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { buttonUploadActionPerformed(arg0); @@ -271,10 +285,12 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { contentPanel.add(separator_1); JButton btnCopyFileTo = new JButton("Copy File to Prod"); + btnCopyFileTo.setEnabled(false); btnCopyFileTo.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { - System.out.println("Copying file to "+ user.path + "/" + uploadFile.getName()); + System.out.println("Copying file to " + user.path + "/" + + uploadFile.getName()); client.startFileCopy(user.path + "/" + uploadFile.getName()); } catch (TException e1) { // TODO Auto-generated catch block @@ -330,17 +346,6 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } }); - // Button for going back to Main Menu - JButton cancelButton = new JButton("Hauptmen\u00FC"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - dispose(); - MainMenue_GUI m = new MainMenue_GUI(); - m.setVisible(true); - } - }); - - JButton btnZurck = new JButton("Zur\u00FCck"); btnZurck.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dispose(); @@ -350,9 +355,6 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { }); btnZurck.setActionCommand("Cancel"); buttonPane.add(btnZurck); - - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); finishButton.setActionCommand("Cancel"); buttonPane.add(finishButton); } @@ -387,6 +389,8 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { // System.out.println("OK"); // } progressBar.setValue(0); + btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick + // und try { user = client.getFtpUser(); @@ -420,7 +424,7 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } public void propertyChange(PropertyChangeEvent arg0) { - int progress = 0; + progress = 0; if ("progress" == arg0.getPropertyName()) { progress = (Integer) arg0.getNewValue(); progressBar.setValue(progress); @@ -428,6 +432,14 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { // Button zum Fertigstellen freischalten, wenn 100% erreicht sind if (progress == 100) { finishButton.setEnabled(true); + + } + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); } } diff --git a/Dozentenmodul/src/gui/FTPUploader_GUI.java b/Dozentenmodul/src/gui/FTPUploader_GUI.java index 05cfbd34..24323cfb 100644 --- a/Dozentenmodul/src/gui/FTPUploader_GUI.java +++ b/Dozentenmodul/src/gui/FTPUploader_GUI.java @@ -67,6 +67,9 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { ThriftConnection thrift = new ThriftConnection(); Client client = thrift.getThriftConnection(); JButton finishButton = new JButton("Fertigstellen"); + JButton btnUploadStarten = new JButton("Upload auf Server starten"); + JButton btnZurck = new JButton("Zur\u00FCck"); + int progress = 0; // progress of upload /** * Launch the application. @@ -136,7 +139,7 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { fc.showOpenDialog(getParent()); File file = fc.getSelectedFile(); - //check if a file is selected and exists + // check if a file is selected and exists if (file != null) { System.out.println("File to upload exists"); uploadFile = file; @@ -145,7 +148,7 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } else { System.out.println("No file selected"); lblNewLabel.setText(""); - }//end if + }// end if } }); @@ -155,11 +158,22 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } lblNewLabel = new JLabel(""); + lblNewLabel.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent arg0) { + if (lblNewLabel.getText().isEmpty()) { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(false); + } else { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(true); + } + } + }); lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT); lblNewLabel.setBounds(285, 124, 302, 23); contentPanel.add(lblNewLabel); - JButton btnUploadStarten = new JButton("Upload auf Server starten"); + btnUploadStarten.setEnabled(false); btnUploadStarten.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { buttonUploadActionPerformed(arg0); @@ -271,10 +285,12 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { contentPanel.add(separator_1); JButton btnCopyFileTo = new JButton("Copy File to Prod"); + btnCopyFileTo.setEnabled(false); btnCopyFileTo.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { - System.out.println("Copying file to "+ user.path + "/" + uploadFile.getName()); + System.out.println("Copying file to " + user.path + "/" + + uploadFile.getName()); client.startFileCopy(user.path + "/" + uploadFile.getName()); } catch (TException e1) { // TODO Auto-generated catch block @@ -330,17 +346,6 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } }); - // Button for going back to Main Menu - JButton cancelButton = new JButton("Hauptmen\u00FC"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - dispose(); - MainMenue_GUI m = new MainMenue_GUI(); - m.setVisible(true); - } - }); - - JButton btnZurck = new JButton("Zur\u00FCck"); btnZurck.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dispose(); @@ -350,9 +355,6 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { }); btnZurck.setActionCommand("Cancel"); buttonPane.add(btnZurck); - - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); finishButton.setActionCommand("Cancel"); buttonPane.add(finishButton); } @@ -387,6 +389,8 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { // System.out.println("OK"); // } progressBar.setValue(0); + btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick + // und try { user = client.getFtpUser(); @@ -420,7 +424,7 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } public void propertyChange(PropertyChangeEvent arg0) { - int progress = 0; + progress = 0; if ("progress" == arg0.getPropertyName()) { progress = (Integer) arg0.getNewValue(); progressBar.setValue(progress); @@ -428,6 +432,14 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { // Button zum Fertigstellen freischalten, wenn 100% erreicht sind if (progress == 100) { finishButton.setEnabled(true); + + } + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); } } -- cgit v1.2.3-55-g7522 From dfe0462daacfd54e6b5e0a07286dadadad503c75 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Apr 2014 10:02:03 +0200 Subject: Button entfernt --- Dozentenmodul/src/gui/FTPUploader_GUI.java | 32 +----------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/Dozentenmodul/src/gui/FTPUploader_GUI.java b/Dozentenmodul/src/gui/FTPUploader_GUI.java index 24323cfb..3dd6a906 100644 --- a/Dozentenmodul/src/gui/FTPUploader_GUI.java +++ b/Dozentenmodul/src/gui/FTPUploader_GUI.java @@ -107,7 +107,6 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } }); setResizable(false); - // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); @@ -323,8 +322,6 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane, BorderLayout.SOUTH); { - // Button for starting upload - // JButton finishButton = new JButton("Fertigstellen"); finishButton.setEnabled(false); finishButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -370,24 +367,7 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } private void buttonUploadActionPerformed(ActionEvent event) { - // File (or directory) with old name - // File file = new File(lblNewLabel.getText()); - - // File (or directory) with new name - // System.out.println(file.getAbsolutePath().substring(0,file.getAbsolutePath().lastIndexOf("\\"))+"\\"+vm.vl.getLaborname()+".vmdk"); - // File file2 = new - // File(file.getAbsoluteFile()+"\\"+vm.vl.getLaborname()+".vmdk"); - - // Rename file (or directory) - // boolean success = file.renameTo(file2); - // if (!success) { - // File was not successfully renamed - // System.out.println("Not OK"); - // } - // else - // { - // System.out.println("OK"); - // } + progressBar.setValue(0); btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick // und @@ -418,9 +398,6 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { task.execute(); taskrun = true; - // createXML(); - // TransferToSatellit(); - } public void propertyChange(PropertyChangeEvent arg0) { @@ -452,13 +429,6 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { String.valueOf(speed).lastIndexOf(".") + 3) + " MB/s"); - // }else - // { - // double MBSpeed=speed/1024; - // downspeed.setText(String.valueOf((MBSpeed)).substring(0, - // String.valueOf(MBSpeed).indexOf("."))); - // } - } if ("bytesread" == arg0.getPropertyName()) { bytesread = (long) arg0.getNewValue(); -- cgit v1.2.3-55-g7522 From 54e068bdef858a1fd601ddd3f24e0c730b4be4ee Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Apr 2014 10:47:01 +0200 Subject: Unterordner hinzugefügt und überflüssige Imports gelöscht --- .../.settings/org.eclipse.core.resources.prefs | 2 +- Dozentenmodul/bin/GUI/BillOfRights_GUI$1.class | Bin 680 -> 0 bytes Dozentenmodul/bin/GUI/BillOfRights_GUI$2.class | Bin 1794 -> 0 bytes Dozentenmodul/bin/GUI/BillOfRights_GUI$3.class | Bin 929 -> 0 bytes Dozentenmodul/bin/GUI/BillOfRights_GUI.class | Bin 10791 -> 0 bytes .../bin/GUI/EditImageAllgemein_GUI$1.class | Bin 837 -> 0 bytes .../bin/GUI/EditImageAllgemein_GUI$2.class | Bin 914 -> 0 bytes .../bin/GUI/EditImageAllgemein_GUI$3.class | Bin 954 -> 0 bytes .../bin/GUI/EditImageAllgemein_GUI$4.class | Bin 1841 -> 0 bytes Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class | Bin 9064 -> 0 bytes .../bin/GUI/EditImageTechnisch_GUI$1.class | Bin 716 -> 0 bytes .../bin/GUI/EditImageTechnisch_GUI$2.class | Bin 793 -> 0 bytes .../bin/GUI/EditImageTechnisch_GUI$3.class | Bin 1623 -> 0 bytes .../bin/GUI/EditImageTechnisch_GUI$4.class | Bin 1611 -> 0 bytes Dozentenmodul/bin/GUI/EditImageTechnisch_GUI.class | Bin 8401 -> 0 bytes .../bin/GUI/EingabeImageAllgemein_GUI$1.class | Bin 979 -> 0 bytes .../bin/GUI/EingabeImageAllgemein_GUI$2.class | Bin 811 -> 0 bytes .../bin/GUI/EingabeImageAllgemein_GUI$3.class | Bin 1125 -> 0 bytes .../bin/GUI/EingabeImageAllgemein_GUI$4.class | Bin 1602 -> 0 bytes .../bin/GUI/EingabeImageAllgemein_GUI.class | Bin 7761 -> 0 bytes .../bin/GUI/EingabeImageTechnisch_GUI$1.class | Bin 734 -> 0 bytes .../bin/GUI/EingabeImageTechnisch_GUI$2.class | Bin 811 -> 0 bytes .../bin/GUI/EingabeImageTechnisch_GUI$3.class | Bin 1639 -> 0 bytes .../bin/GUI/EingabeImageTechnisch_GUI$4.class | Bin 1619 -> 0 bytes .../bin/GUI/EingabeImageTechnisch_GUI.class | Bin 8754 -> 0 bytes .../GUI/EingabeVeranstaltungAllgemein_GUI$1.class | Bin 1035 -> 0 bytes .../GUI/EingabeVeranstaltungAllgemein_GUI$2.class | Bin 859 -> 0 bytes .../GUI/EingabeVeranstaltungAllgemein_GUI$3.class | Bin 928 -> 0 bytes .../GUI/EingabeVeranstaltungAllgemein_GUI$4.class | Bin 925 -> 0 bytes .../GUI/EingabeVeranstaltungAllgemein_GUI.class | Bin 10791 -> 0 bytes Dozentenmodul/bin/GUI/ExtendedSearch_GUI.class | Bin 6375 -> 0 bytes Dozentenmodul/bin/GUI/FTPDownloader_GUI$1.class | Bin 1361 -> 0 bytes Dozentenmodul/bin/GUI/FTPDownloader_GUI$2.class | Bin 1206 -> 0 bytes Dozentenmodul/bin/GUI/FTPDownloader_GUI$3.class | Bin 749 -> 0 bytes Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class | Bin 1515 -> 0 bytes Dozentenmodul/bin/GUI/FTPDownloader_GUI.class | Bin 9476 -> 0 bytes Dozentenmodul/bin/GUI/FTPUploader_GUI$1.class | Bin 738 -> 0 bytes Dozentenmodul/bin/GUI/FTPUploader_GUI$2.class | Bin 1193 -> 0 bytes Dozentenmodul/bin/GUI/FTPUploader_GUI$3.class | Bin 1564 -> 0 bytes Dozentenmodul/bin/GUI/FTPUploader_GUI$4.class | Bin 735 -> 0 bytes Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class | Bin 1633 -> 0 bytes Dozentenmodul/bin/GUI/FTPUploader_GUI.class | Bin 12001 -> 0 bytes Dozentenmodul/bin/GUI/LinkImage_GUI$1.class | Bin 895 -> 0 bytes Dozentenmodul/bin/GUI/LinkImage_GUI$2.class | Bin 1457 -> 0 bytes Dozentenmodul/bin/GUI/LinkImage_GUI$3.class | Bin 730 -> 0 bytes Dozentenmodul/bin/GUI/LinkImage_GUI$4.class | Bin 1478 -> 0 bytes Dozentenmodul/bin/GUI/LinkImage_GUI$5.class | Bin 739 -> 0 bytes Dozentenmodul/bin/GUI/LinkImage_GUI$6.class | Bin 942 -> 0 bytes Dozentenmodul/bin/GUI/LinkImage_GUI$7.class | Bin 3172 -> 0 bytes Dozentenmodul/bin/GUI/LinkImage_GUI.class | Bin 11346 -> 0 bytes Dozentenmodul/bin/GUI/Login_GUI$1.class | Bin 1082 -> 0 bytes Dozentenmodul/bin/GUI/Login_GUI$2.class | Bin 635 -> 0 bytes Dozentenmodul/bin/GUI/Login_GUI$3.class | Bin 647 -> 0 bytes Dozentenmodul/bin/GUI/Login_GUI.class | Bin 7734 -> 0 bytes Dozentenmodul/bin/GUI/MainMenue_GUI$1.class | Bin 662 -> 0 bytes Dozentenmodul/bin/GUI/MainMenue_GUI$2.class | Bin 729 -> 0 bytes Dozentenmodul/bin/GUI/MainMenue_GUI$3.class | Bin 740 -> 0 bytes Dozentenmodul/bin/GUI/MainMenue_GUI$4.class | Bin 1058 -> 0 bytes Dozentenmodul/bin/GUI/MainMenue_GUI.class | Bin 10887 -> 0 bytes Dozentenmodul/bin/GUI/SearchImage_GUI$1.class | Bin 674 -> 0 bytes Dozentenmodul/bin/GUI/SearchImage_GUI.class | Bin 11734 -> 0 bytes Dozentenmodul/bin/GUI/SearchMethod_GUI$1.class | Bin 680 -> 0 bytes Dozentenmodul/bin/GUI/SearchMethod_GUI$2.class | Bin 757 -> 0 bytes Dozentenmodul/bin/GUI/SearchMethod_GUI$3.class | Bin 797 -> 0 bytes Dozentenmodul/bin/GUI/SearchMethod_GUI$4.class | Bin 965 -> 0 bytes Dozentenmodul/bin/GUI/SearchMethod_GUI.class | Bin 6910 -> 0 bytes Dozentenmodul/bin/GUI/VmWareLink_GUI$1.class | Bin 665 -> 0 bytes Dozentenmodul/bin/GUI/VmWareLink_GUI$2.class | Bin 1126 -> 0 bytes Dozentenmodul/bin/GUI/VmWareLink_GUI$3.class | Bin 1767 -> 0 bytes Dozentenmodul/bin/GUI/VmWareLink_GUI.class | Bin 5269 -> 0 bytes Dozentenmodul/bin/ftp/DownloadTask.class | Bin 3839 -> 3851 bytes Dozentenmodul/bin/gui/BillOfRights_GUI$1.class | Bin 680 -> 0 bytes Dozentenmodul/bin/gui/BillOfRights_GUI$2.class | Bin 1794 -> 0 bytes Dozentenmodul/bin/gui/BillOfRights_GUI$3.class | Bin 929 -> 0 bytes Dozentenmodul/bin/gui/BillOfRights_GUI.class | Bin 10791 -> 0 bytes Dozentenmodul/bin/gui/DeleteImage_GUI$1.class | Bin 674 -> 0 bytes Dozentenmodul/bin/gui/DeleteImage_GUI$2.class | Bin 1221 -> 0 bytes Dozentenmodul/bin/gui/DeleteImage_GUI$3.class | Bin 742 -> 0 bytes Dozentenmodul/bin/gui/DeleteImage_GUI$4.class | Bin 1228 -> 0 bytes Dozentenmodul/bin/gui/DeleteImage_GUI$5.class | Bin 751 -> 0 bytes Dozentenmodul/bin/gui/DeleteImage_GUI$6.class | Bin 1316 -> 0 bytes Dozentenmodul/bin/gui/DeleteImage_GUI$7.class | Bin 790 -> 0 bytes Dozentenmodul/bin/gui/DeleteImage_GUI$8.class | Bin 809 -> 0 bytes Dozentenmodul/bin/gui/DeleteImage_GUI.class | Bin 11325 -> 0 bytes .../bin/gui/EditImageAllgemein_GUI$1.class | Bin 837 -> 0 bytes .../bin/gui/EditImageAllgemein_GUI$2.class | Bin 914 -> 0 bytes .../bin/gui/EditImageAllgemein_GUI$3.class | Bin 954 -> 0 bytes .../bin/gui/EditImageAllgemein_GUI$4.class | Bin 1841 -> 0 bytes Dozentenmodul/bin/gui/EditImageAllgemein_GUI.class | Bin 9064 -> 0 bytes .../bin/gui/EditImageTechnisch_GUI$1.class | Bin 716 -> 0 bytes .../bin/gui/EditImageTechnisch_GUI$2.class | Bin 793 -> 0 bytes .../bin/gui/EditImageTechnisch_GUI$3.class | Bin 1623 -> 0 bytes .../bin/gui/EditImageTechnisch_GUI$4.class | Bin 1611 -> 0 bytes Dozentenmodul/bin/gui/EditImageTechnisch_GUI.class | Bin 8401 -> 0 bytes Dozentenmodul/bin/gui/EditLinkImage_GUI$1.class | Bin 686 -> 0 bytes Dozentenmodul/bin/gui/EditLinkImage_GUI$2.class | Bin 1481 -> 0 bytes Dozentenmodul/bin/gui/EditLinkImage_GUI$3.class | Bin 754 -> 0 bytes Dozentenmodul/bin/gui/EditLinkImage_GUI$4.class | Bin 1502 -> 0 bytes Dozentenmodul/bin/gui/EditLinkImage_GUI$5.class | Bin 763 -> 0 bytes Dozentenmodul/bin/gui/EditLinkImage_GUI$6.class | Bin 805 -> 0 bytes Dozentenmodul/bin/gui/EditLinkImage_GUI$7.class | Bin 2426 -> 0 bytes Dozentenmodul/bin/gui/EditLinkImage_GUI.class | Bin 11337 -> 0 bytes .../bin/gui/EditVeranstaltungAllgemein_GUI$1.class | Bin 764 -> 0 bytes .../bin/gui/EditVeranstaltungAllgemein_GUI$2.class | Bin 841 -> 0 bytes .../bin/gui/EditVeranstaltungAllgemein_GUI$3.class | Bin 1874 -> 0 bytes .../bin/gui/EditVeranstaltungAllgemein_GUI$4.class | Bin 1874 -> 0 bytes .../bin/gui/EditVeranstaltungAllgemein_GUI.class | Bin 9967 -> 0 bytes .../bin/gui/EingabeImageAllgemein_GUI$1.class | Bin 979 -> 0 bytes .../bin/gui/EingabeImageAllgemein_GUI$2.class | Bin 811 -> 0 bytes .../bin/gui/EingabeImageAllgemein_GUI$3.class | Bin 1125 -> 0 bytes .../bin/gui/EingabeImageAllgemein_GUI$4.class | Bin 1602 -> 0 bytes .../bin/gui/EingabeImageAllgemein_GUI.class | Bin 7761 -> 0 bytes .../bin/gui/EingabeImageTechnisch_GUI$1.class | Bin 734 -> 0 bytes .../bin/gui/EingabeImageTechnisch_GUI$2.class | Bin 811 -> 0 bytes .../bin/gui/EingabeImageTechnisch_GUI$3.class | Bin 1639 -> 0 bytes .../bin/gui/EingabeImageTechnisch_GUI$4.class | Bin 1619 -> 0 bytes .../bin/gui/EingabeImageTechnisch_GUI.class | Bin 8754 -> 0 bytes .../gui/EingabeVeranstaltungAllgemein_GUI$1.class | Bin 1035 -> 0 bytes .../gui/EingabeVeranstaltungAllgemein_GUI$2.class | Bin 859 -> 0 bytes .../gui/EingabeVeranstaltungAllgemein_GUI$3.class | Bin 928 -> 0 bytes .../gui/EingabeVeranstaltungAllgemein_GUI$4.class | Bin 925 -> 0 bytes .../gui/EingabeVeranstaltungAllgemein_GUI$5.class | Bin 1911 -> 0 bytes .../gui/EingabeVeranstaltungAllgemein_GUI$6.class | Bin 3031 -> 0 bytes .../gui/EingabeVeranstaltungAllgemein_GUI.class | Bin 10791 -> 0 bytes Dozentenmodul/bin/gui/ExtendedSearch_GUI$1.class | Bin 692 -> 0 bytes Dozentenmodul/bin/gui/ExtendedSearch_GUI$2.class | Bin 833 -> 0 bytes Dozentenmodul/bin/gui/ExtendedSearch_GUI$3.class | Bin 813 -> 0 bytes Dozentenmodul/bin/gui/ExtendedSearch_GUI.class | Bin 6375 -> 0 bytes Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class | Bin 1361 -> 0 bytes Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class | Bin 1206 -> 0 bytes Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class | Bin 749 -> 0 bytes Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class | Bin 1515 -> 0 bytes Dozentenmodul/bin/gui/FTPDownloader_GUI.class | Bin 9476 -> 0 bytes Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class | Bin 758 -> 0 bytes Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class | Bin 1217 -> 0 bytes Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class | Bin 1336 -> 0 bytes Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class | Bin 763 -> 0 bytes Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class | Bin 1473 -> 0 bytes Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class | Bin 1599 -> 0 bytes Dozentenmodul/bin/gui/FTPEditUploader_GUI.class | Bin 10892 -> 0 bytes Dozentenmodul/bin/gui/FTPUploader_GUI$1.class | Bin 738 -> 0 bytes Dozentenmodul/bin/gui/FTPUploader_GUI$2.class | Bin 1193 -> 0 bytes Dozentenmodul/bin/gui/FTPUploader_GUI$3.class | Bin 1564 -> 0 bytes Dozentenmodul/bin/gui/FTPUploader_GUI$4.class | Bin 735 -> 0 bytes Dozentenmodul/bin/gui/FTPUploader_GUI$5.class | Bin 1633 -> 0 bytes Dozentenmodul/bin/gui/FTPUploader_GUI$6.class | Bin 1574 -> 0 bytes Dozentenmodul/bin/gui/FTPUploader_GUI$7.class | Bin 793 -> 0 bytes Dozentenmodul/bin/gui/FTPUploader_GUI$8.class | Bin 814 -> 0 bytes Dozentenmodul/bin/gui/FTPUploader_GUI.class | Bin 12001 -> 0 bytes Dozentenmodul/bin/gui/LinkImage_GUI$1.class | Bin 895 -> 0 bytes Dozentenmodul/bin/gui/LinkImage_GUI$2.class | Bin 1457 -> 0 bytes Dozentenmodul/bin/gui/LinkImage_GUI$3.class | Bin 730 -> 0 bytes Dozentenmodul/bin/gui/LinkImage_GUI$4.class | Bin 1478 -> 0 bytes Dozentenmodul/bin/gui/LinkImage_GUI$5.class | Bin 739 -> 0 bytes Dozentenmodul/bin/gui/LinkImage_GUI$6.class | Bin 942 -> 0 bytes Dozentenmodul/bin/gui/LinkImage_GUI$7.class | Bin 3172 -> 0 bytes Dozentenmodul/bin/gui/LinkImage_GUI.class | Bin 11346 -> 0 bytes Dozentenmodul/bin/gui/Login_GUI$1.class | Bin 1082 -> 0 bytes Dozentenmodul/bin/gui/Login_GUI$2.class | Bin 635 -> 0 bytes Dozentenmodul/bin/gui/Login_GUI$3.class | Bin 647 -> 0 bytes Dozentenmodul/bin/gui/Login_GUI$4.class | Bin 647 -> 0 bytes Dozentenmodul/bin/gui/Login_GUI$5.class | Bin 644 -> 0 bytes Dozentenmodul/bin/gui/Login_GUI.class | Bin 7734 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$1.class | Bin 662 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$10.class | Bin 793 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$11.class | Bin 1068 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$12.class | Bin 1816 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$2.class | Bin 729 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$3.class | Bin 740 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$4.class | Bin 1058 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$5.class | Bin 976 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$6.class | Bin 947 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$7.class | Bin 1038 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$8.class | Bin 1053 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI$9.class | Bin 944 -> 0 bytes Dozentenmodul/bin/gui/MainMenue_GUI.class | Bin 10887 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class | Bin 819 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class | Bin 1249 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class | Bin 887 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class | Bin 1252 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class | Bin 896 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class | Bin 1729 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class | Bin 1839 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class | Bin 938 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class | Bin 1970 -> 0 bytes Dozentenmodul/bin/gui/SearchEditImage_GUI.class | Bin 11819 -> 0 bytes .../bin/gui/SearchEditLecture_GUI$1.class | Bin 831 -> 0 bytes .../bin/gui/SearchEditLecture_GUI$2.class | Bin 1265 -> 0 bytes .../bin/gui/SearchEditLecture_GUI$3.class | Bin 899 -> 0 bytes .../bin/gui/SearchEditLecture_GUI$4.class | Bin 908 -> 0 bytes .../bin/gui/SearchEditLecture_GUI$5.class | Bin 1743 -> 0 bytes .../bin/gui/SearchEditLecture_GUI$6.class | Bin 950 -> 0 bytes .../bin/gui/SearchEditLecture_GUI$7.class | Bin 2992 -> 0 bytes Dozentenmodul/bin/gui/SearchEditLecture_GUI.class | Bin 11376 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI$1.class | Bin 674 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI$2.class | Bin 1237 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI$3.class | Bin 742 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI$4.class | Bin 1244 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI$5.class | Bin 751 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI$6.class | Bin 1324 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI$7.class | Bin 790 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI$8.class | Bin 793 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI$9.class | Bin 930 -> 0 bytes Dozentenmodul/bin/gui/SearchImage_GUI.class | Bin 11734 -> 0 bytes Dozentenmodul/bin/gui/SearchMethod_GUI$1.class | Bin 680 -> 0 bytes Dozentenmodul/bin/gui/SearchMethod_GUI$2.class | Bin 757 -> 0 bytes Dozentenmodul/bin/gui/SearchMethod_GUI$3.class | Bin 797 -> 0 bytes Dozentenmodul/bin/gui/SearchMethod_GUI$4.class | Bin 965 -> 0 bytes Dozentenmodul/bin/gui/SearchMethod_GUI.class | Bin 6910 -> 0 bytes Dozentenmodul/bin/gui/VmWareLink_GUI$1.class | Bin 665 -> 0 bytes Dozentenmodul/bin/gui/VmWareLink_GUI$2.class | Bin 1126 -> 0 bytes Dozentenmodul/bin/gui/VmWareLink_GUI$3.class | Bin 1767 -> 0 bytes Dozentenmodul/bin/gui/VmWareLink_GUI$4.class | Bin 785 -> 0 bytes Dozentenmodul/bin/gui/VmWareLink_GUI.class | Bin 5269 -> 0 bytes .../bin/gui/image/DeleteImage_GUI$1.class | Bin 0 -> 704 bytes .../bin/gui/image/DeleteImage_GUI$2.class | Bin 0 -> 1257 bytes .../bin/gui/image/DeleteImage_GUI$3.class | Bin 0 -> 806 bytes .../bin/gui/image/DeleteImage_GUI$4.class | Bin 0 -> 1258 bytes .../bin/gui/image/DeleteImage_GUI$5.class | Bin 0 -> 793 bytes .../bin/gui/image/DeleteImage_GUI$6.class | Bin 0 -> 1346 bytes .../bin/gui/image/DeleteImage_GUI$7.class | Bin 0 -> 832 bytes .../bin/gui/image/DeleteImage_GUI$8.class | Bin 0 -> 851 bytes Dozentenmodul/bin/gui/image/DeleteImage_GUI.class | Bin 0 -> 11397 bytes .../bin/gui/image/EditImageAllgemein_GUI$1.class | Bin 0 -> 867 bytes .../bin/gui/image/EditImageAllgemein_GUI$2.class | Bin 0 -> 956 bytes .../bin/gui/image/EditImageAllgemein_GUI$3.class | Bin 0 -> 996 bytes .../bin/gui/image/EditImageAllgemein_GUI$4.class | Bin 0 -> 1889 bytes .../bin/gui/image/EditImageAllgemein_GUI.class | Bin 0 -> 9112 bytes .../bin/gui/image/EditImageTechnisch_GUI$1.class | Bin 0 -> 746 bytes .../bin/gui/image/EditImageTechnisch_GUI$2.class | Bin 0 -> 835 bytes .../bin/gui/image/EditImageTechnisch_GUI$3.class | Bin 0 -> 1665 bytes .../bin/gui/image/EditImageTechnisch_GUI$4.class | Bin 0 -> 1653 bytes .../bin/gui/image/EditImageTechnisch_GUI.class | Bin 0 -> 8443 bytes .../gui/image/EingabeImageAllgemein_GUI$1.class | Bin 0 -> 1015 bytes .../gui/image/EingabeImageAllgemein_GUI$2.class | Bin 0 -> 853 bytes .../gui/image/EingabeImageAllgemein_GUI$3.class | Bin 0 -> 1173 bytes .../gui/image/EingabeImageAllgemein_GUI$4.class | Bin 0 -> 1650 bytes .../bin/gui/image/EingabeImageAllgemein_GUI.class | Bin 0 -> 7809 bytes .../gui/image/EingabeImageTechnisch_GUI$1.class | Bin 0 -> 764 bytes .../gui/image/EingabeImageTechnisch_GUI$2.class | Bin 0 -> 853 bytes .../gui/image/EingabeImageTechnisch_GUI$3.class | Bin 0 -> 1681 bytes .../gui/image/EingabeImageTechnisch_GUI$4.class | Bin 0 -> 1661 bytes .../bin/gui/image/EingabeImageTechnisch_GUI.class | Bin 0 -> 8796 bytes .../bin/gui/image/FTPDownloader_GUI$1.class | Bin 0 -> 1391 bytes .../bin/gui/image/FTPDownloader_GUI$2.class | Bin 0 -> 1236 bytes .../bin/gui/image/FTPDownloader_GUI$3.class | Bin 0 -> 785 bytes .../bin/gui/image/FTPDownloader_GUI$4.class | Bin 0 -> 1557 bytes .../bin/gui/image/FTPDownloader_GUI.class | Bin 0 -> 9530 bytes .../bin/gui/image/FTPEditUploader_GUI$1.class | Bin 0 -> 782 bytes .../bin/gui/image/FTPEditUploader_GUI$2.class | Bin 0 -> 1247 bytes .../bin/gui/image/FTPEditUploader_GUI$3.class | Bin 0 -> 1366 bytes .../bin/gui/image/FTPEditUploader_GUI$4.class | Bin 0 -> 799 bytes .../bin/gui/image/FTPEditUploader_GUI$5.class | Bin 0 -> 1503 bytes .../bin/gui/image/FTPEditUploader_GUI$6.class | Bin 0 -> 1641 bytes .../bin/gui/image/FTPEditUploader_GUI.class | Bin 0 -> 10952 bytes .../bin/gui/image/FTPUploader_GUI$1.class | Bin 0 -> 762 bytes .../bin/gui/image/FTPUploader_GUI$2.class | Bin 0 -> 1223 bytes .../bin/gui/image/FTPUploader_GUI$3.class | Bin 0 -> 1594 bytes .../bin/gui/image/FTPUploader_GUI$4.class | Bin 0 -> 1041 bytes .../bin/gui/image/FTPUploader_GUI$5.class | Bin 0 -> 771 bytes .../bin/gui/image/FTPUploader_GUI$6.class | Bin 0 -> 1671 bytes .../bin/gui/image/FTPUploader_GUI$7.class | Bin 0 -> 1616 bytes .../bin/gui/image/FTPUploader_GUI$8.class | Bin 0 -> 856 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI.class | Bin 0 -> 12168 bytes .../bin/gui/image/SearchEditImage_GUI$1.class | Bin 0 -> 849 bytes .../bin/gui/image/SearchEditImage_GUI$2.class | Bin 0 -> 1301 bytes .../bin/gui/image/SearchEditImage_GUI$3.class | Bin 0 -> 951 bytes .../bin/gui/image/SearchEditImage_GUI$4.class | Bin 0 -> 1298 bytes .../bin/gui/image/SearchEditImage_GUI$5.class | Bin 0 -> 938 bytes .../bin/gui/image/SearchEditImage_GUI$6.class | Bin 0 -> 1771 bytes .../bin/gui/image/SearchEditImage_GUI$7.class | Bin 0 -> 1941 bytes .../bin/gui/image/SearchEditImage_GUI$8.class | Bin 0 -> 980 bytes .../bin/gui/image/SearchEditImage_GUI$9.class | Bin 0 -> 2080 bytes .../bin/gui/image/SearchEditImage_GUI.class | Bin 0 -> 12001 bytes .../bin/gui/image/SearchImage_GUI$1.class | Bin 0 -> 704 bytes .../bin/gui/image/SearchImage_GUI$2.class | Bin 0 -> 1273 bytes .../bin/gui/image/SearchImage_GUI$3.class | Bin 0 -> 806 bytes .../bin/gui/image/SearchImage_GUI$4.class | Bin 0 -> 1274 bytes .../bin/gui/image/SearchImage_GUI$5.class | Bin 0 -> 793 bytes .../bin/gui/image/SearchImage_GUI$6.class | Bin 0 -> 1354 bytes .../bin/gui/image/SearchImage_GUI$7.class | Bin 0 -> 832 bytes .../bin/gui/image/SearchImage_GUI$8.class | Bin 0 -> 835 bytes .../bin/gui/image/SearchImage_GUI$9.class | Bin 0 -> 972 bytes Dozentenmodul/bin/gui/image/SearchImage_GUI.class | Bin 0 -> 11812 bytes .../bin/gui/intro/BillOfRights_GUI$1.class | Bin 0 -> 710 bytes .../bin/gui/intro/BillOfRights_GUI$2.class | Bin 0 -> 1836 bytes .../bin/gui/intro/BillOfRights_GUI$3.class | Bin 0 -> 959 bytes Dozentenmodul/bin/gui/intro/BillOfRights_GUI.class | Bin 0 -> 10827 bytes Dozentenmodul/bin/gui/intro/Login_GUI$1.class | Bin 0 -> 1106 bytes Dozentenmodul/bin/gui/intro/Login_GUI$2.class | Bin 0 -> 665 bytes Dozentenmodul/bin/gui/intro/Login_GUI$3.class | Bin 0 -> 677 bytes Dozentenmodul/bin/gui/intro/Login_GUI$4.class | Bin 0 -> 677 bytes Dozentenmodul/bin/gui/intro/Login_GUI$5.class | Bin 0 -> 674 bytes Dozentenmodul/bin/gui/intro/Login_GUI.class | Bin 0 -> 7818 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class | Bin 0 -> 692 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class | Bin 0 -> 823 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class | Bin 0 -> 1098 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class | Bin 0 -> 1932 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class | Bin 0 -> 771 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class | Bin 0 -> 782 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class | Bin 0 -> 1088 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class | Bin 0 -> 1006 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class | Bin 0 -> 977 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class | Bin 0 -> 1068 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class | Bin 0 -> 1083 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class | Bin 0 -> 974 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI.class | Bin 0 -> 10983 bytes Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class | Bin 0 -> 695 bytes Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class | Bin 0 -> 1156 bytes Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class | Bin 0 -> 1797 bytes Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class | Bin 0 -> 827 bytes Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class | Bin 0 -> 5311 bytes .../gui/lecture/EditLectureAllgemein_GUI$1.class | Bin 0 -> 768 bytes .../gui/lecture/EditLectureAllgemein_GUI$2.class | Bin 0 -> 857 bytes .../gui/lecture/EditLectureAllgemein_GUI$3.class | Bin 0 -> 1892 bytes .../gui/lecture/EditLectureAllgemein_GUI$4.class | Bin 0 -> 1900 bytes .../bin/gui/lecture/EditLectureAllgemein_GUI.class | Bin 0 -> 9977 bytes .../bin/gui/lecture/EditLinkLecture_GUI$1.class | Bin 0 -> 738 bytes .../bin/gui/lecture/EditLinkLecture_GUI$2.class | Bin 0 -> 1543 bytes .../bin/gui/lecture/EditLinkLecture_GUI$3.class | Bin 0 -> 840 bytes .../bin/gui/lecture/EditLinkLecture_GUI$4.class | Bin 0 -> 1554 bytes .../bin/gui/lecture/EditLinkLecture_GUI$5.class | Bin 0 -> 827 bytes .../bin/gui/lecture/EditLinkLecture_GUI$6.class | Bin 0 -> 869 bytes .../bin/gui/lecture/EditLinkLecture_GUI$7.class | Bin 0 -> 2478 bytes .../bin/gui/lecture/EditLinkLecture_GUI.class | Bin 0 -> 11459 bytes .../lecture/EingabeLectureAllgemein_GUI$1.class | Bin 0 -> 1041 bytes .../lecture/EingabeLectureAllgemein_GUI$2.class | Bin 0 -> 875 bytes .../lecture/EingabeLectureAllgemein_GUI$3.class | Bin 0 -> 932 bytes .../lecture/EingabeLectureAllgemein_GUI$4.class | Bin 0 -> 929 bytes .../lecture/EingabeLectureAllgemein_GUI$5.class | Bin 0 -> 1929 bytes .../lecture/EingabeLectureAllgemein_GUI$6.class | Bin 0 -> 3057 bytes .../gui/lecture/EingabeLectureAllgemein_GUI.class | Bin 0 -> 10805 bytes .../lecture/ExtendedSearchForImages_GUI$1.class | Bin 0 -> 786 bytes .../lecture/ExtendedSearchForImages_GUI$2.class | Bin 0 -> 939 bytes .../lecture/ExtendedSearchForImages_GUI$3.class | Bin 0 -> 919 bytes .../gui/lecture/ExtendedSearchForImages_GUI.class | Bin 0 -> 6486 bytes .../bin/gui/lecture/LinkLecture_GUI$1.class | Bin 0 -> 957 bytes .../bin/gui/lecture/LinkLecture_GUI$2.class | Bin 0 -> 1519 bytes .../bin/gui/lecture/LinkLecture_GUI$3.class | Bin 0 -> 816 bytes .../bin/gui/lecture/LinkLecture_GUI$4.class | Bin 0 -> 1530 bytes .../bin/gui/lecture/LinkLecture_GUI$5.class | Bin 0 -> 803 bytes .../bin/gui/lecture/LinkLecture_GUI$6.class | Bin 0 -> 998 bytes .../bin/gui/lecture/LinkLecture_GUI$7.class | Bin 0 -> 3224 bytes .../bin/gui/lecture/LinkLecture_GUI.class | Bin 0 -> 11468 bytes .../bin/gui/lecture/SearchEditLecture_GUI$1.class | Bin 0 -> 871 bytes .../bin/gui/lecture/SearchEditLecture_GUI$2.class | Bin 0 -> 1313 bytes .../bin/gui/lecture/SearchEditLecture_GUI$3.class | Bin 0 -> 973 bytes .../bin/gui/lecture/SearchEditLecture_GUI$4.class | Bin 0 -> 960 bytes .../bin/gui/lecture/SearchEditLecture_GUI$5.class | Bin 0 -> 1783 bytes .../bin/gui/lecture/SearchEditLecture_GUI$6.class | Bin 0 -> 1002 bytes .../bin/gui/lecture/SearchEditLecture_GUI$7.class | Bin 0 -> 3044 bytes .../bin/gui/lecture/SearchEditLecture_GUI.class | Bin 0 -> 11464 bytes .../gui/lecture/SearchMethodLecture_GUI$1.class | Bin 0 -> 762 bytes .../gui/lecture/SearchMethodLecture_GUI$2.class | Bin 0 -> 851 bytes .../gui/lecture/SearchMethodLecture_GUI$3.class | Bin 0 -> 891 bytes .../gui/lecture/SearchMethodLecture_GUI$4.class | Bin 0 -> 1059 bytes .../bin/gui/lecture/SearchMethodLecture_GUI.class | Bin 0 -> 7022 bytes Dozentenmodul/bin/org.eclipse.core.resources.prefs | 2 +- Dozentenmodul/src/GUI/BillOfRights_GUI.java | 192 -------- Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java | 350 -------------- Dozentenmodul/src/GUI/EditImageTechnisch_GUI.java | 366 --------------- .../src/GUI/EingabeImageAllgemein_GUI.java | 302 ------------ .../src/GUI/EingabeImageTechnisch_GUI.java | 364 --------------- .../src/GUI/EingabeVeranstaltungAllgemein_GUI.java | 504 -------------------- Dozentenmodul/src/GUI/ExtendedSearch_GUI.java | 234 ---------- Dozentenmodul/src/GUI/FTPDownloader_GUI.java | 370 --------------- Dozentenmodul/src/GUI/FTPUploader_GUI.java | 512 -------------------- Dozentenmodul/src/GUI/LinkImage_GUI.java | 471 ------------------- Dozentenmodul/src/GUI/Login_GUI.java | 260 ----------- Dozentenmodul/src/GUI/MainMenue_GUI.java | 443 ------------------ Dozentenmodul/src/GUI/SearchImage_GUI.java | 459 ------------------ Dozentenmodul/src/GUI/SearchMethod_GUI.java | 243 ---------- Dozentenmodul/src/GUI/VmWareLink_GUI.java | 215 --------- Dozentenmodul/src/ftp/DownloadTask.java | 2 +- Dozentenmodul/src/gui/BillOfRights_GUI.java | 192 -------- Dozentenmodul/src/gui/DeleteImage_GUI.java | 439 ------------------ Dozentenmodul/src/gui/EditImageAllgemein_GUI.java | 350 -------------- Dozentenmodul/src/gui/EditImageTechnisch_GUI.java | 366 --------------- Dozentenmodul/src/gui/EditLinkImage_GUI.java | 436 ----------------- .../src/gui/EditVeranstaltungAllgemein_GUI.java | 411 ---------------- .../src/gui/EingabeImageAllgemein_GUI.java | 302 ------------ .../src/gui/EingabeImageTechnisch_GUI.java | 364 --------------- .../src/gui/EingabeVeranstaltungAllgemein_GUI.java | 504 -------------------- Dozentenmodul/src/gui/ExtendedSearch_GUI.java | 234 ---------- Dozentenmodul/src/gui/FTPDownloader_GUI.java | 370 --------------- Dozentenmodul/src/gui/FTPEditUploader_GUI.java | 427 ----------------- Dozentenmodul/src/gui/FTPUploader_GUI.java | 482 ------------------- Dozentenmodul/src/gui/LinkImage_GUI.java | 471 ------------------- Dozentenmodul/src/gui/Login_GUI.java | 260 ----------- Dozentenmodul/src/gui/MainMenue_GUI.java | 443 ------------------ Dozentenmodul/src/gui/SearchEditImage_GUI.java | 495 -------------------- Dozentenmodul/src/gui/SearchEditLecture_GUI.java | 448 ------------------ Dozentenmodul/src/gui/SearchImage_GUI.java | 459 ------------------ Dozentenmodul/src/gui/SearchMethod_GUI.java | 243 ---------- Dozentenmodul/src/gui/VmWareLink_GUI.java | 215 --------- Dozentenmodul/src/gui/image/DeleteImage_GUI.java | 442 ++++++++++++++++++ .../src/gui/image/EditImageAllgemein_GUI.java | 347 ++++++++++++++ .../src/gui/image/EditImageTechnisch_GUI.java | 359 ++++++++++++++ .../src/gui/image/EingabeImageAllgemein_GUI.java | 304 ++++++++++++ .../src/gui/image/EingabeImageTechnisch_GUI.java | 366 +++++++++++++++ Dozentenmodul/src/gui/image/FTPDownloader_GUI.java | 370 +++++++++++++++ .../src/gui/image/FTPEditUploader_GUI.java | 428 +++++++++++++++++ Dozentenmodul/src/gui/image/FTPUploader_GUI.java | 483 +++++++++++++++++++ .../src/gui/image/SearchEditImage_GUI.java | 514 +++++++++++++++++++++ Dozentenmodul/src/gui/image/SearchImage_GUI.java | 459 ++++++++++++++++++ Dozentenmodul/src/gui/intro/BillOfRights_GUI.java | 193 ++++++++ Dozentenmodul/src/gui/intro/Login_GUI.java | 252 ++++++++++ Dozentenmodul/src/gui/intro/MainMenue_GUI.java | 450 ++++++++++++++++++ Dozentenmodul/src/gui/intro/VmWareLink_GUI.java | 216 +++++++++ .../src/gui/lecture/EditLectureAllgemein_GUI.java | 413 +++++++++++++++++ .../src/gui/lecture/EditLinkLecture_GUI.java | 438 ++++++++++++++++++ .../gui/lecture/EingabeLectureAllgemein_GUI.java | 506 ++++++++++++++++++++ .../gui/lecture/ExtendedSearchForImages_GUI.java | 237 ++++++++++ Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java | 473 +++++++++++++++++++ .../src/gui/lecture/SearchEditLecture_GUI.java | 451 ++++++++++++++++++ .../src/gui/lecture/SearchMethodLecture_GUI.java | 246 ++++++++++ 416 files changed, 7950 insertions(+), 13199 deletions(-) delete mode 100644 Dozentenmodul/bin/GUI/BillOfRights_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/BillOfRights_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/BillOfRights_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/BillOfRights_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/EditImageTechnisch_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/ExtendedSearch_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/FTPDownloader_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/FTPDownloader_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/FTPDownloader_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/FTPDownloader_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/FTPUploader_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/FTPUploader_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/FTPUploader_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/FTPUploader_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class delete mode 100644 Dozentenmodul/bin/GUI/FTPUploader_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/LinkImage_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/LinkImage_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/LinkImage_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/LinkImage_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/LinkImage_GUI$5.class delete mode 100644 Dozentenmodul/bin/GUI/LinkImage_GUI$6.class delete mode 100644 Dozentenmodul/bin/GUI/LinkImage_GUI$7.class delete mode 100644 Dozentenmodul/bin/GUI/LinkImage_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/Login_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/Login_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/Login_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/Login_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/MainMenue_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/MainMenue_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/MainMenue_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/MainMenue_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/MainMenue_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/SearchImage_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/SearchImage_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/SearchMethod_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/SearchMethod_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/SearchMethod_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/SearchMethod_GUI$4.class delete mode 100644 Dozentenmodul/bin/GUI/SearchMethod_GUI.class delete mode 100644 Dozentenmodul/bin/GUI/VmWareLink_GUI$1.class delete mode 100644 Dozentenmodul/bin/GUI/VmWareLink_GUI$2.class delete mode 100644 Dozentenmodul/bin/GUI/VmWareLink_GUI$3.class delete mode 100644 Dozentenmodul/bin/GUI/VmWareLink_GUI.class delete mode 100644 Dozentenmodul/bin/gui/BillOfRights_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/BillOfRights_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/BillOfRights_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/BillOfRights_GUI.class delete mode 100644 Dozentenmodul/bin/gui/DeleteImage_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/DeleteImage_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/DeleteImage_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/DeleteImage_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/DeleteImage_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/DeleteImage_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/DeleteImage_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/DeleteImage_GUI$8.class delete mode 100644 Dozentenmodul/bin/gui/DeleteImage_GUI.class delete mode 100644 Dozentenmodul/bin/gui/EditImageAllgemein_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/EditImageAllgemein_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/EditImageAllgemein_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/EditImageAllgemein_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/EditImageAllgemein_GUI.class delete mode 100644 Dozentenmodul/bin/gui/EditImageTechnisch_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/EditImageTechnisch_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/EditImageTechnisch_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/EditImageTechnisch_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/EditImageTechnisch_GUI.class delete mode 100644 Dozentenmodul/bin/gui/EditLinkImage_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/EditLinkImage_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/EditLinkImage_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/EditLinkImage_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/EditLinkImage_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/EditLinkImage_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/EditLinkImage_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/EditLinkImage_GUI.class delete mode 100644 Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI.class delete mode 100644 Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI.class delete mode 100644 Dozentenmodul/bin/gui/ExtendedSearch_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/ExtendedSearch_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/ExtendedSearch_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/ExtendedSearch_GUI.class delete mode 100644 Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/FTPDownloader_GUI.class delete mode 100644 Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/FTPEditUploader_GUI.class delete mode 100644 Dozentenmodul/bin/gui/FTPUploader_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/FTPUploader_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/FTPUploader_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/FTPUploader_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/FTPUploader_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/FTPUploader_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/FTPUploader_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/FTPUploader_GUI$8.class delete mode 100644 Dozentenmodul/bin/gui/FTPUploader_GUI.class delete mode 100644 Dozentenmodul/bin/gui/LinkImage_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/LinkImage_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/LinkImage_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/LinkImage_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/LinkImage_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/LinkImage_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/LinkImage_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/LinkImage_GUI.class delete mode 100644 Dozentenmodul/bin/gui/Login_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/Login_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/Login_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/Login_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/Login_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/Login_GUI.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$10.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$11.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$12.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$8.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI$9.class delete mode 100644 Dozentenmodul/bin/gui/MainMenue_GUI.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditImage_GUI.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/SearchEditLecture_GUI.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI$8.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI$9.class delete mode 100644 Dozentenmodul/bin/gui/SearchImage_GUI.class delete mode 100644 Dozentenmodul/bin/gui/SearchMethod_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/SearchMethod_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/SearchMethod_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/SearchMethod_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/SearchMethod_GUI.class delete mode 100644 Dozentenmodul/bin/gui/VmWareLink_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/VmWareLink_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/VmWareLink_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/VmWareLink_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/VmWareLink_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/DeleteImage_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/DeleteImage_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/DeleteImage_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/DeleteImage_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/DeleteImage_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/image/DeleteImage_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/image/DeleteImage_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/image/DeleteImage_GUI$8.class create mode 100644 Dozentenmodul/bin/gui/image/DeleteImage_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class create mode 100644 Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI$8.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI$9.class create mode 100644 Dozentenmodul/bin/gui/image/SearchImage_GUI.class create mode 100644 Dozentenmodul/bin/gui/intro/BillOfRights_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/intro/BillOfRights_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/intro/BillOfRights_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/intro/BillOfRights_GUI.class create mode 100644 Dozentenmodul/bin/gui/intro/Login_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/intro/Login_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/intro/Login_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/intro/Login_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/intro/Login_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/intro/Login_GUI.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class create mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI.class create mode 100644 Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI.class create mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI.class create mode 100644 Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class create mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI.class delete mode 100644 Dozentenmodul/src/GUI/BillOfRights_GUI.java delete mode 100644 Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java delete mode 100644 Dozentenmodul/src/GUI/EditImageTechnisch_GUI.java delete mode 100644 Dozentenmodul/src/GUI/EingabeImageAllgemein_GUI.java delete mode 100644 Dozentenmodul/src/GUI/EingabeImageTechnisch_GUI.java delete mode 100644 Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java delete mode 100644 Dozentenmodul/src/GUI/ExtendedSearch_GUI.java delete mode 100644 Dozentenmodul/src/GUI/FTPDownloader_GUI.java delete mode 100644 Dozentenmodul/src/GUI/FTPUploader_GUI.java delete mode 100644 Dozentenmodul/src/GUI/LinkImage_GUI.java delete mode 100644 Dozentenmodul/src/GUI/Login_GUI.java delete mode 100644 Dozentenmodul/src/GUI/MainMenue_GUI.java delete mode 100644 Dozentenmodul/src/GUI/SearchImage_GUI.java delete mode 100644 Dozentenmodul/src/GUI/SearchMethod_GUI.java delete mode 100644 Dozentenmodul/src/GUI/VmWareLink_GUI.java delete mode 100644 Dozentenmodul/src/gui/BillOfRights_GUI.java delete mode 100644 Dozentenmodul/src/gui/DeleteImage_GUI.java delete mode 100644 Dozentenmodul/src/gui/EditImageAllgemein_GUI.java delete mode 100644 Dozentenmodul/src/gui/EditImageTechnisch_GUI.java delete mode 100644 Dozentenmodul/src/gui/EditLinkImage_GUI.java delete mode 100644 Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java delete mode 100644 Dozentenmodul/src/gui/EingabeImageAllgemein_GUI.java delete mode 100644 Dozentenmodul/src/gui/EingabeImageTechnisch_GUI.java delete mode 100644 Dozentenmodul/src/gui/EingabeVeranstaltungAllgemein_GUI.java delete mode 100644 Dozentenmodul/src/gui/ExtendedSearch_GUI.java delete mode 100644 Dozentenmodul/src/gui/FTPDownloader_GUI.java delete mode 100644 Dozentenmodul/src/gui/FTPEditUploader_GUI.java delete mode 100644 Dozentenmodul/src/gui/FTPUploader_GUI.java delete mode 100644 Dozentenmodul/src/gui/LinkImage_GUI.java delete mode 100644 Dozentenmodul/src/gui/Login_GUI.java delete mode 100644 Dozentenmodul/src/gui/MainMenue_GUI.java delete mode 100644 Dozentenmodul/src/gui/SearchEditImage_GUI.java delete mode 100644 Dozentenmodul/src/gui/SearchEditLecture_GUI.java delete mode 100644 Dozentenmodul/src/gui/SearchImage_GUI.java delete mode 100644 Dozentenmodul/src/gui/SearchMethod_GUI.java delete mode 100644 Dozentenmodul/src/gui/VmWareLink_GUI.java create mode 100644 Dozentenmodul/src/gui/image/DeleteImage_GUI.java create mode 100644 Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java create mode 100644 Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java create mode 100644 Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java create mode 100644 Dozentenmodul/src/gui/image/EingabeImageTechnisch_GUI.java create mode 100644 Dozentenmodul/src/gui/image/FTPDownloader_GUI.java create mode 100644 Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java create mode 100644 Dozentenmodul/src/gui/image/FTPUploader_GUI.java create mode 100644 Dozentenmodul/src/gui/image/SearchEditImage_GUI.java create mode 100644 Dozentenmodul/src/gui/image/SearchImage_GUI.java create mode 100644 Dozentenmodul/src/gui/intro/BillOfRights_GUI.java create mode 100644 Dozentenmodul/src/gui/intro/Login_GUI.java create mode 100644 Dozentenmodul/src/gui/intro/MainMenue_GUI.java create mode 100644 Dozentenmodul/src/gui/intro/VmWareLink_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/EditLinkLecture_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/EingabeLectureAllgemein_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/SearchEditLecture_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/SearchMethodLecture_GUI.java diff --git a/Dozentenmodul/.settings/org.eclipse.core.resources.prefs b/Dozentenmodul/.settings/org.eclipse.core.resources.prefs index 49b9df2a..61583c81 100644 --- a/Dozentenmodul/.settings/org.eclipse.core.resources.prefs +++ b/Dozentenmodul/.settings/org.eclipse.core.resources.prefs @@ -1,2 +1,2 @@ eclipse.preferences.version=1 -encoding//src/gui/EditVeranstaltungAllgemein_GUI.java=UTF-8 +encoding//src/gui/lecture/EditLectureAllgemein_GUI.java=UTF-8 diff --git a/Dozentenmodul/bin/GUI/BillOfRights_GUI$1.class b/Dozentenmodul/bin/GUI/BillOfRights_GUI$1.class deleted file mode 100644 index 5574d48e..00000000 Binary files a/Dozentenmodul/bin/GUI/BillOfRights_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/BillOfRights_GUI$2.class b/Dozentenmodul/bin/GUI/BillOfRights_GUI$2.class deleted file mode 100644 index 49256cbe..00000000 Binary files a/Dozentenmodul/bin/GUI/BillOfRights_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/BillOfRights_GUI$3.class b/Dozentenmodul/bin/GUI/BillOfRights_GUI$3.class deleted file mode 100644 index a2ae1bca..00000000 Binary files a/Dozentenmodul/bin/GUI/BillOfRights_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/BillOfRights_GUI.class b/Dozentenmodul/bin/GUI/BillOfRights_GUI.class deleted file mode 100644 index 097d3995..00000000 Binary files a/Dozentenmodul/bin/GUI/BillOfRights_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class deleted file mode 100644 index 062a5aeb..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class deleted file mode 100644 index 9d0a3bea..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class deleted file mode 100644 index 69507f5e..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class deleted file mode 100644 index e7af4c13..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class deleted file mode 100644 index 2287ca1a..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$1.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$1.class deleted file mode 100644 index 3ed6a8ca..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$2.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$2.class deleted file mode 100644 index c334f61e..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$3.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$3.class deleted file mode 100644 index 0c45cb47..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$4.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$4.class deleted file mode 100644 index 6b0b0760..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI.class deleted file mode 100644 index 182e34ea..00000000 Binary files a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$1.class deleted file mode 100644 index d6ce35c1..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$2.class deleted file mode 100644 index 979638d5..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$3.class deleted file mode 100644 index a8301134..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$4.class deleted file mode 100644 index fb0a74b7..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI.class deleted file mode 100644 index af7cda76..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$1.class deleted file mode 100644 index b7b5fc47..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$2.class deleted file mode 100644 index 9e20b5fa..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$3.class deleted file mode 100644 index 54767b1b..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$4.class deleted file mode 100644 index 284319c7..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI.class deleted file mode 100644 index 2a2a0020..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class deleted file mode 100644 index 351eac91..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class deleted file mode 100644 index 26a0b9ad..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class deleted file mode 100644 index 99c0174e..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class deleted file mode 100644 index 54053623..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class deleted file mode 100644 index 1614b33b..00000000 Binary files a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/ExtendedSearch_GUI.class b/Dozentenmodul/bin/GUI/ExtendedSearch_GUI.class deleted file mode 100644 index 567cb8a9..00000000 Binary files a/Dozentenmodul/bin/GUI/ExtendedSearch_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$1.class deleted file mode 100644 index 3067718e..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$2.class deleted file mode 100644 index 41ad1e3f..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$3.class deleted file mode 100644 index 2af3aa99..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class deleted file mode 100644 index 6f093d26..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class deleted file mode 100644 index 0d64e048..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$1.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$1.class deleted file mode 100644 index 7586f5de..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPUploader_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$2.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$2.class deleted file mode 100644 index 245043a2..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPUploader_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$3.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$3.class deleted file mode 100644 index 2422f25a..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPUploader_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$4.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$4.class deleted file mode 100644 index 551a9ab9..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPUploader_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class deleted file mode 100644 index 9f214076..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI.class deleted file mode 100644 index 88b2815c..00000000 Binary files a/Dozentenmodul/bin/GUI/FTPUploader_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$1.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$1.class deleted file mode 100644 index 592ffc31..00000000 Binary files a/Dozentenmodul/bin/GUI/LinkImage_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$2.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$2.class deleted file mode 100644 index 05132e61..00000000 Binary files a/Dozentenmodul/bin/GUI/LinkImage_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$3.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$3.class deleted file mode 100644 index 6872589c..00000000 Binary files a/Dozentenmodul/bin/GUI/LinkImage_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$4.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$4.class deleted file mode 100644 index d56819a3..00000000 Binary files a/Dozentenmodul/bin/GUI/LinkImage_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$5.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$5.class deleted file mode 100644 index d4ea86c6..00000000 Binary files a/Dozentenmodul/bin/GUI/LinkImage_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$6.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$6.class deleted file mode 100644 index f1cd179d..00000000 Binary files a/Dozentenmodul/bin/GUI/LinkImage_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$7.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$7.class deleted file mode 100644 index 40df5002..00000000 Binary files a/Dozentenmodul/bin/GUI/LinkImage_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI.class b/Dozentenmodul/bin/GUI/LinkImage_GUI.class deleted file mode 100644 index d9cfd2ea..00000000 Binary files a/Dozentenmodul/bin/GUI/LinkImage_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/Login_GUI$1.class b/Dozentenmodul/bin/GUI/Login_GUI$1.class deleted file mode 100644 index b4388d57..00000000 Binary files a/Dozentenmodul/bin/GUI/Login_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/Login_GUI$2.class b/Dozentenmodul/bin/GUI/Login_GUI$2.class deleted file mode 100644 index 54cd4d69..00000000 Binary files a/Dozentenmodul/bin/GUI/Login_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/Login_GUI$3.class b/Dozentenmodul/bin/GUI/Login_GUI$3.class deleted file mode 100644 index 46796de6..00000000 Binary files a/Dozentenmodul/bin/GUI/Login_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/Login_GUI.class b/Dozentenmodul/bin/GUI/Login_GUI.class deleted file mode 100644 index da10a7ca..00000000 Binary files a/Dozentenmodul/bin/GUI/Login_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class deleted file mode 100644 index 57b08981..00000000 Binary files a/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class deleted file mode 100644 index 77e0fbd6..00000000 Binary files a/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class deleted file mode 100644 index 6e35da4f..00000000 Binary files a/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class deleted file mode 100644 index 995f1202..00000000 Binary files a/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI.class b/Dozentenmodul/bin/GUI/MainMenue_GUI.class deleted file mode 100644 index c6188012..00000000 Binary files a/Dozentenmodul/bin/GUI/MainMenue_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class deleted file mode 100644 index 3839b528..00000000 Binary files a/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI.class b/Dozentenmodul/bin/GUI/SearchImage_GUI.class deleted file mode 100644 index d014f8d0..00000000 Binary files a/Dozentenmodul/bin/GUI/SearchImage_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI$1.class b/Dozentenmodul/bin/GUI/SearchMethod_GUI$1.class deleted file mode 100644 index b2222872..00000000 Binary files a/Dozentenmodul/bin/GUI/SearchMethod_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI$2.class b/Dozentenmodul/bin/GUI/SearchMethod_GUI$2.class deleted file mode 100644 index 296d7ebc..00000000 Binary files a/Dozentenmodul/bin/GUI/SearchMethod_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI$3.class b/Dozentenmodul/bin/GUI/SearchMethod_GUI$3.class deleted file mode 100644 index 4b572444..00000000 Binary files a/Dozentenmodul/bin/GUI/SearchMethod_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI$4.class b/Dozentenmodul/bin/GUI/SearchMethod_GUI$4.class deleted file mode 100644 index 64fdeb32..00000000 Binary files a/Dozentenmodul/bin/GUI/SearchMethod_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI.class b/Dozentenmodul/bin/GUI/SearchMethod_GUI.class deleted file mode 100644 index d4f71a85..00000000 Binary files a/Dozentenmodul/bin/GUI/SearchMethod_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/VmWareLink_GUI$1.class b/Dozentenmodul/bin/GUI/VmWareLink_GUI$1.class deleted file mode 100644 index 65a75adf..00000000 Binary files a/Dozentenmodul/bin/GUI/VmWareLink_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/VmWareLink_GUI$2.class b/Dozentenmodul/bin/GUI/VmWareLink_GUI$2.class deleted file mode 100644 index 1c73d190..00000000 Binary files a/Dozentenmodul/bin/GUI/VmWareLink_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/VmWareLink_GUI$3.class b/Dozentenmodul/bin/GUI/VmWareLink_GUI$3.class deleted file mode 100644 index ba568bd7..00000000 Binary files a/Dozentenmodul/bin/GUI/VmWareLink_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/GUI/VmWareLink_GUI.class b/Dozentenmodul/bin/GUI/VmWareLink_GUI.class deleted file mode 100644 index 4431fe00..00000000 Binary files a/Dozentenmodul/bin/GUI/VmWareLink_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/ftp/DownloadTask.class b/Dozentenmodul/bin/ftp/DownloadTask.class index 1b153fb7..447a8eb4 100644 Binary files a/Dozentenmodul/bin/ftp/DownloadTask.class and b/Dozentenmodul/bin/ftp/DownloadTask.class differ diff --git a/Dozentenmodul/bin/gui/BillOfRights_GUI$1.class b/Dozentenmodul/bin/gui/BillOfRights_GUI$1.class deleted file mode 100644 index 5574d48e..00000000 Binary files a/Dozentenmodul/bin/gui/BillOfRights_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/BillOfRights_GUI$2.class b/Dozentenmodul/bin/gui/BillOfRights_GUI$2.class deleted file mode 100644 index 49256cbe..00000000 Binary files a/Dozentenmodul/bin/gui/BillOfRights_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/BillOfRights_GUI$3.class b/Dozentenmodul/bin/gui/BillOfRights_GUI$3.class deleted file mode 100644 index a2ae1bca..00000000 Binary files a/Dozentenmodul/bin/gui/BillOfRights_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/BillOfRights_GUI.class b/Dozentenmodul/bin/gui/BillOfRights_GUI.class deleted file mode 100644 index 097d3995..00000000 Binary files a/Dozentenmodul/bin/gui/BillOfRights_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$1.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$1.class deleted file mode 100644 index 6139b7dc..00000000 Binary files a/Dozentenmodul/bin/gui/DeleteImage_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$2.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$2.class deleted file mode 100644 index 214998fb..00000000 Binary files a/Dozentenmodul/bin/gui/DeleteImage_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$3.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$3.class deleted file mode 100644 index 1ab047a4..00000000 Binary files a/Dozentenmodul/bin/gui/DeleteImage_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$4.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$4.class deleted file mode 100644 index 9382863b..00000000 Binary files a/Dozentenmodul/bin/gui/DeleteImage_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$5.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$5.class deleted file mode 100644 index 0e845cc7..00000000 Binary files a/Dozentenmodul/bin/gui/DeleteImage_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$6.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$6.class deleted file mode 100644 index 63b957b6..00000000 Binary files a/Dozentenmodul/bin/gui/DeleteImage_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$7.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$7.class deleted file mode 100644 index b2bd5495..00000000 Binary files a/Dozentenmodul/bin/gui/DeleteImage_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$8.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$8.class deleted file mode 100644 index a1eb0a54..00000000 Binary files a/Dozentenmodul/bin/gui/DeleteImage_GUI$8.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI.class b/Dozentenmodul/bin/gui/DeleteImage_GUI.class deleted file mode 100644 index ad9c8803..00000000 Binary files a/Dozentenmodul/bin/gui/DeleteImage_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$1.class deleted file mode 100644 index 062a5aeb..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$2.class deleted file mode 100644 index 9d0a3bea..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$3.class deleted file mode 100644 index 69507f5e..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$4.class deleted file mode 100644 index e7af4c13..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI.class deleted file mode 100644 index 2287ca1a..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$1.class deleted file mode 100644 index 3ed6a8ca..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$2.class deleted file mode 100644 index c334f61e..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$3.class deleted file mode 100644 index 0c45cb47..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$4.class deleted file mode 100644 index 6b0b0760..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/EditImageTechnisch_GUI.class deleted file mode 100644 index 182e34ea..00000000 Binary files a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$1.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$1.class deleted file mode 100644 index 678491af..00000000 Binary files a/Dozentenmodul/bin/gui/EditLinkImage_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$2.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$2.class deleted file mode 100644 index 6384d363..00000000 Binary files a/Dozentenmodul/bin/gui/EditLinkImage_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$3.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$3.class deleted file mode 100644 index e94e0e13..00000000 Binary files a/Dozentenmodul/bin/gui/EditLinkImage_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$4.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$4.class deleted file mode 100644 index b952d8f3..00000000 Binary files a/Dozentenmodul/bin/gui/EditLinkImage_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$5.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$5.class deleted file mode 100644 index 434f209e..00000000 Binary files a/Dozentenmodul/bin/gui/EditLinkImage_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$6.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$6.class deleted file mode 100644 index a38e792e..00000000 Binary files a/Dozentenmodul/bin/gui/EditLinkImage_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI$7.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI$7.class deleted file mode 100644 index 07d40c7e..00000000 Binary files a/Dozentenmodul/bin/gui/EditLinkImage_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditLinkImage_GUI.class b/Dozentenmodul/bin/gui/EditLinkImage_GUI.class deleted file mode 100644 index 218bfa86..00000000 Binary files a/Dozentenmodul/bin/gui/EditLinkImage_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class deleted file mode 100644 index 43873477..00000000 Binary files a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class deleted file mode 100644 index 98d359ee..00000000 Binary files a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class deleted file mode 100644 index ac902be7..00000000 Binary files a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class deleted file mode 100644 index b786208b..00000000 Binary files a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class b/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class deleted file mode 100644 index 1c9bf34c..00000000 Binary files a/Dozentenmodul/bin/gui/EditVeranstaltungAllgemein_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$1.class deleted file mode 100644 index d6ce35c1..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$2.class deleted file mode 100644 index 979638d5..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$3.class deleted file mode 100644 index a8301134..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$4.class deleted file mode 100644 index fb0a74b7..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI.class deleted file mode 100644 index af7cda76..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$1.class deleted file mode 100644 index b7b5fc47..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$2.class deleted file mode 100644 index 9e20b5fa..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$3.class deleted file mode 100644 index 54767b1b..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$4.class deleted file mode 100644 index 284319c7..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI.class deleted file mode 100644 index 2a2a0020..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class deleted file mode 100644 index 351eac91..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$2.class deleted file mode 100644 index 26a0b9ad..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$3.class deleted file mode 100644 index 99c0174e..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$4.class deleted file mode 100644 index 54053623..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$5.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$5.class deleted file mode 100644 index 6f6df5ca..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$6.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$6.class deleted file mode 100644 index 9eaac71c..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI.class deleted file mode 100644 index 1614b33b..00000000 Binary files a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$1.class b/Dozentenmodul/bin/gui/ExtendedSearch_GUI$1.class deleted file mode 100644 index 35128bac..00000000 Binary files a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$2.class b/Dozentenmodul/bin/gui/ExtendedSearch_GUI$2.class deleted file mode 100644 index d1fc8d5b..00000000 Binary files a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$3.class b/Dozentenmodul/bin/gui/ExtendedSearch_GUI$3.class deleted file mode 100644 index 86321ae8..00000000 Binary files a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/ExtendedSearch_GUI.class b/Dozentenmodul/bin/gui/ExtendedSearch_GUI.class deleted file mode 100644 index 567cb8a9..00000000 Binary files a/Dozentenmodul/bin/gui/ExtendedSearch_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class deleted file mode 100644 index 3067718e..00000000 Binary files a/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class deleted file mode 100644 index 41ad1e3f..00000000 Binary files a/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class deleted file mode 100644 index 2af3aa99..00000000 Binary files a/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class deleted file mode 100644 index 6f093d26..00000000 Binary files a/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI.class deleted file mode 100644 index 0d64e048..00000000 Binary files a/Dozentenmodul/bin/gui/FTPDownloader_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class deleted file mode 100644 index 3f952241..00000000 Binary files a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class deleted file mode 100644 index 0bff908a..00000000 Binary files a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class deleted file mode 100644 index 7bafe65d..00000000 Binary files a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class deleted file mode 100644 index a0883626..00000000 Binary files a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class deleted file mode 100644 index 034411c3..00000000 Binary files a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class deleted file mode 100644 index 043a33a4..00000000 Binary files a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class deleted file mode 100644 index a3da591f..00000000 Binary files a/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$1.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$1.class deleted file mode 100644 index 7586f5de..00000000 Binary files a/Dozentenmodul/bin/gui/FTPUploader_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$2.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$2.class deleted file mode 100644 index 245043a2..00000000 Binary files a/Dozentenmodul/bin/gui/FTPUploader_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$3.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$3.class deleted file mode 100644 index 2422f25a..00000000 Binary files a/Dozentenmodul/bin/gui/FTPUploader_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$4.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$4.class deleted file mode 100644 index 551a9ab9..00000000 Binary files a/Dozentenmodul/bin/gui/FTPUploader_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$5.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$5.class deleted file mode 100644 index 9f214076..00000000 Binary files a/Dozentenmodul/bin/gui/FTPUploader_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$6.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$6.class deleted file mode 100644 index a7c0b511..00000000 Binary files a/Dozentenmodul/bin/gui/FTPUploader_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$7.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$7.class deleted file mode 100644 index 10890564..00000000 Binary files a/Dozentenmodul/bin/gui/FTPUploader_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$8.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$8.class deleted file mode 100644 index 07752dad..00000000 Binary files a/Dozentenmodul/bin/gui/FTPUploader_GUI$8.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI.class b/Dozentenmodul/bin/gui/FTPUploader_GUI.class deleted file mode 100644 index 88b2815c..00000000 Binary files a/Dozentenmodul/bin/gui/FTPUploader_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$1.class b/Dozentenmodul/bin/gui/LinkImage_GUI$1.class deleted file mode 100644 index 592ffc31..00000000 Binary files a/Dozentenmodul/bin/gui/LinkImage_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$2.class b/Dozentenmodul/bin/gui/LinkImage_GUI$2.class deleted file mode 100644 index 05132e61..00000000 Binary files a/Dozentenmodul/bin/gui/LinkImage_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$3.class b/Dozentenmodul/bin/gui/LinkImage_GUI$3.class deleted file mode 100644 index 6872589c..00000000 Binary files a/Dozentenmodul/bin/gui/LinkImage_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$4.class b/Dozentenmodul/bin/gui/LinkImage_GUI$4.class deleted file mode 100644 index d56819a3..00000000 Binary files a/Dozentenmodul/bin/gui/LinkImage_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$5.class b/Dozentenmodul/bin/gui/LinkImage_GUI$5.class deleted file mode 100644 index d4ea86c6..00000000 Binary files a/Dozentenmodul/bin/gui/LinkImage_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$6.class b/Dozentenmodul/bin/gui/LinkImage_GUI$6.class deleted file mode 100644 index f1cd179d..00000000 Binary files a/Dozentenmodul/bin/gui/LinkImage_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$7.class b/Dozentenmodul/bin/gui/LinkImage_GUI$7.class deleted file mode 100644 index 40df5002..00000000 Binary files a/Dozentenmodul/bin/gui/LinkImage_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI.class b/Dozentenmodul/bin/gui/LinkImage_GUI.class deleted file mode 100644 index d9cfd2ea..00000000 Binary files a/Dozentenmodul/bin/gui/LinkImage_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/Login_GUI$1.class b/Dozentenmodul/bin/gui/Login_GUI$1.class deleted file mode 100644 index b4388d57..00000000 Binary files a/Dozentenmodul/bin/gui/Login_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/Login_GUI$2.class b/Dozentenmodul/bin/gui/Login_GUI$2.class deleted file mode 100644 index 54cd4d69..00000000 Binary files a/Dozentenmodul/bin/gui/Login_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/Login_GUI$3.class b/Dozentenmodul/bin/gui/Login_GUI$3.class deleted file mode 100644 index 46796de6..00000000 Binary files a/Dozentenmodul/bin/gui/Login_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/Login_GUI$4.class b/Dozentenmodul/bin/gui/Login_GUI$4.class deleted file mode 100644 index 22908f76..00000000 Binary files a/Dozentenmodul/bin/gui/Login_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/Login_GUI$5.class b/Dozentenmodul/bin/gui/Login_GUI$5.class deleted file mode 100644 index e1bf5be2..00000000 Binary files a/Dozentenmodul/bin/gui/Login_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/Login_GUI.class b/Dozentenmodul/bin/gui/Login_GUI.class deleted file mode 100644 index da10a7ca..00000000 Binary files a/Dozentenmodul/bin/gui/Login_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$1.class b/Dozentenmodul/bin/gui/MainMenue_GUI$1.class deleted file mode 100644 index ae9c04f3..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$10.class b/Dozentenmodul/bin/gui/MainMenue_GUI$10.class deleted file mode 100644 index 12eefe5e..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$10.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$11.class b/Dozentenmodul/bin/gui/MainMenue_GUI$11.class deleted file mode 100644 index 16af50d0..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$11.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$12.class b/Dozentenmodul/bin/gui/MainMenue_GUI$12.class deleted file mode 100644 index fab4ce2b..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$12.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$2.class b/Dozentenmodul/bin/gui/MainMenue_GUI$2.class deleted file mode 100644 index a19fcb59..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$3.class b/Dozentenmodul/bin/gui/MainMenue_GUI$3.class deleted file mode 100644 index 9ae0a452..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$4.class b/Dozentenmodul/bin/gui/MainMenue_GUI$4.class deleted file mode 100644 index 995f1202..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$5.class b/Dozentenmodul/bin/gui/MainMenue_GUI$5.class deleted file mode 100644 index 0317cac0..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$6.class b/Dozentenmodul/bin/gui/MainMenue_GUI$6.class deleted file mode 100644 index 416d44d4..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$7.class b/Dozentenmodul/bin/gui/MainMenue_GUI$7.class deleted file mode 100644 index c991ffd3..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$8.class b/Dozentenmodul/bin/gui/MainMenue_GUI$8.class deleted file mode 100644 index ef110e30..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$8.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$9.class b/Dozentenmodul/bin/gui/MainMenue_GUI$9.class deleted file mode 100644 index a81507c6..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI$9.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI.class b/Dozentenmodul/bin/gui/MainMenue_GUI.class deleted file mode 100644 index c6188012..00000000 Binary files a/Dozentenmodul/bin/gui/MainMenue_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class deleted file mode 100644 index 4c8a49ba..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class deleted file mode 100644 index 0bb68dce..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class deleted file mode 100644 index 414b3a0c..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class deleted file mode 100644 index 8ec22cf9..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class deleted file mode 100644 index 1758ada3..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class deleted file mode 100644 index b89857f4..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class deleted file mode 100644 index ca1774f7..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class deleted file mode 100644 index 08d744bd..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class deleted file mode 100644 index 00e112de..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI.class deleted file mode 100644 index c562cc42..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditImage_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class deleted file mode 100644 index 24e378be..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class deleted file mode 100644 index 1b56fca6..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class deleted file mode 100644 index b48d68c6..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class deleted file mode 100644 index e37e9a30..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class deleted file mode 100644 index d8cad4d1..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class deleted file mode 100644 index fe6a0214..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class deleted file mode 100644 index 64b0b1ae..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditLecture_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class b/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class deleted file mode 100644 index ed3f1c5b..00000000 Binary files a/Dozentenmodul/bin/gui/SearchEditLecture_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$1.class b/Dozentenmodul/bin/gui/SearchImage_GUI$1.class deleted file mode 100644 index 3839b528..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$2.class b/Dozentenmodul/bin/gui/SearchImage_GUI$2.class deleted file mode 100644 index 9b8efb38..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$3.class b/Dozentenmodul/bin/gui/SearchImage_GUI$3.class deleted file mode 100644 index 6317e30c..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$4.class b/Dozentenmodul/bin/gui/SearchImage_GUI$4.class deleted file mode 100644 index 8b38dc60..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$5.class b/Dozentenmodul/bin/gui/SearchImage_GUI$5.class deleted file mode 100644 index a238b34c..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$6.class b/Dozentenmodul/bin/gui/SearchImage_GUI$6.class deleted file mode 100644 index ae62d5aa..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$7.class b/Dozentenmodul/bin/gui/SearchImage_GUI$7.class deleted file mode 100644 index 3a1e2f3a..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$8.class b/Dozentenmodul/bin/gui/SearchImage_GUI$8.class deleted file mode 100644 index e5e281b0..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI$8.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$9.class b/Dozentenmodul/bin/gui/SearchImage_GUI$9.class deleted file mode 100644 index 679115d8..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI$9.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI.class b/Dozentenmodul/bin/gui/SearchImage_GUI.class deleted file mode 100644 index d014f8d0..00000000 Binary files a/Dozentenmodul/bin/gui/SearchImage_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI$1.class b/Dozentenmodul/bin/gui/SearchMethod_GUI$1.class deleted file mode 100644 index b2222872..00000000 Binary files a/Dozentenmodul/bin/gui/SearchMethod_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI$2.class b/Dozentenmodul/bin/gui/SearchMethod_GUI$2.class deleted file mode 100644 index 296d7ebc..00000000 Binary files a/Dozentenmodul/bin/gui/SearchMethod_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI$3.class b/Dozentenmodul/bin/gui/SearchMethod_GUI$3.class deleted file mode 100644 index 4b572444..00000000 Binary files a/Dozentenmodul/bin/gui/SearchMethod_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI$4.class b/Dozentenmodul/bin/gui/SearchMethod_GUI$4.class deleted file mode 100644 index 64fdeb32..00000000 Binary files a/Dozentenmodul/bin/gui/SearchMethod_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI.class b/Dozentenmodul/bin/gui/SearchMethod_GUI.class deleted file mode 100644 index d4f71a85..00000000 Binary files a/Dozentenmodul/bin/gui/SearchMethod_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI$1.class b/Dozentenmodul/bin/gui/VmWareLink_GUI$1.class deleted file mode 100644 index 65a75adf..00000000 Binary files a/Dozentenmodul/bin/gui/VmWareLink_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI$2.class b/Dozentenmodul/bin/gui/VmWareLink_GUI$2.class deleted file mode 100644 index 1c73d190..00000000 Binary files a/Dozentenmodul/bin/gui/VmWareLink_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI$3.class b/Dozentenmodul/bin/gui/VmWareLink_GUI$3.class deleted file mode 100644 index ba568bd7..00000000 Binary files a/Dozentenmodul/bin/gui/VmWareLink_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI$4.class b/Dozentenmodul/bin/gui/VmWareLink_GUI$4.class deleted file mode 100644 index b30fc786..00000000 Binary files a/Dozentenmodul/bin/gui/VmWareLink_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI.class b/Dozentenmodul/bin/gui/VmWareLink_GUI.class deleted file mode 100644 index 4431fe00..00000000 Binary files a/Dozentenmodul/bin/gui/VmWareLink_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$1.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$1.class new file mode 100644 index 00000000..679fea24 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$2.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$2.class new file mode 100644 index 00000000..2d8d670d Binary files /dev/null and b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$3.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$3.class new file mode 100644 index 00000000..a9efff64 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$4.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$4.class new file mode 100644 index 00000000..c3c7d0d4 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$5.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$5.class new file mode 100644 index 00000000..d46ad562 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$6.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$6.class new file mode 100644 index 00000000..f2192686 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$7.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$7.class new file mode 100644 index 00000000..10b584a7 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$8.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$8.class new file mode 100644 index 00000000..cb8ea27e Binary files /dev/null and b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class new file mode 100644 index 00000000..4549e05a Binary files /dev/null and b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$1.class new file mode 100644 index 00000000..7692bcfb Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class new file mode 100644 index 00000000..d11a8449 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class new file mode 100644 index 00000000..8468f633 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class new file mode 100644 index 00000000..d87f50a2 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class new file mode 100644 index 00000000..b7fda6b3 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class new file mode 100644 index 00000000..b6e700d1 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class new file mode 100644 index 00000000..00451da1 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class new file mode 100644 index 00000000..5d742182 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class new file mode 100644 index 00000000..ccf62925 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class new file mode 100644 index 00000000..84957fcf Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$1.class new file mode 100644 index 00000000..13b87fc2 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$2.class new file mode 100644 index 00000000..5fd0f465 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$3.class new file mode 100644 index 00000000..6a3ce5c1 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class new file mode 100644 index 00000000..0ccaaa47 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI.class new file mode 100644 index 00000000..fffd657d Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$1.class new file mode 100644 index 00000000..129b6cdc Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$2.class new file mode 100644 index 00000000..806acf77 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$3.class new file mode 100644 index 00000000..154292c3 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$4.class new file mode 100644 index 00000000..a7088c4b Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI.class new file mode 100644 index 00000000..39e53c25 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class new file mode 100644 index 00000000..90a9b390 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class new file mode 100644 index 00000000..ae1b44e0 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class new file mode 100644 index 00000000..3b6b83fb Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class new file mode 100644 index 00000000..8401b2ec Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class new file mode 100644 index 00000000..60383d7e Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class new file mode 100644 index 00000000..a4ac78a8 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class new file mode 100644 index 00000000..99826f3b Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class new file mode 100644 index 00000000..9732d4d5 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class new file mode 100644 index 00000000..b8da1599 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class new file mode 100644 index 00000000..b899f1f9 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class new file mode 100644 index 00000000..9b72b607 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class new file mode 100644 index 00000000..f6b45f3a Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$1.class new file mode 100644 index 00000000..8459bd28 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class new file mode 100644 index 00000000..b2455840 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class new file mode 100644 index 00000000..924e0a89 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class new file mode 100644 index 00000000..2be81e8d Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class new file mode 100644 index 00000000..c09c2054 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class new file mode 100644 index 00000000..6a509054 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class new file mode 100644 index 00000000..d7cb923d Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class new file mode 100644 index 00000000..f6faec31 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class new file mode 100644 index 00000000..06003d58 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class new file mode 100644 index 00000000..ed060fc5 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class new file mode 100644 index 00000000..ff02ba32 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class new file mode 100644 index 00000000..5b3e93a0 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class new file mode 100644 index 00000000..e0ebd234 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class new file mode 100644 index 00000000..f0cfc5da Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class new file mode 100644 index 00000000..b6600cc8 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class new file mode 100644 index 00000000..772ed400 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class new file mode 100644 index 00000000..ffde361f Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class new file mode 100644 index 00000000..345a0f36 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class new file mode 100644 index 00000000..b804db88 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class new file mode 100644 index 00000000..8dbd7362 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$2.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$2.class new file mode 100644 index 00000000..7c32f943 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class new file mode 100644 index 00000000..5b8f3f8b Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$4.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$4.class new file mode 100644 index 00000000..f842a022 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class new file mode 100644 index 00000000..2452046f Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$6.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$6.class new file mode 100644 index 00000000..eff43b91 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class new file mode 100644 index 00000000..8b9f3286 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$8.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$8.class new file mode 100644 index 00000000..a5ff7a18 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$9.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$9.class new file mode 100644 index 00000000..e5ad916e Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI$9.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI.class new file mode 100644 index 00000000..fdefc8b5 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/SearchImage_GUI.class differ diff --git a/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$1.class b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$1.class new file mode 100644 index 00000000..6a2f53f1 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$2.class b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$2.class new file mode 100644 index 00000000..16bbf49f Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$3.class b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$3.class new file mode 100644 index 00000000..a3ae5059 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/intro/BillOfRights_GUI.class b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI.class new file mode 100644 index 00000000..9d951522 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$1.class b/Dozentenmodul/bin/gui/intro/Login_GUI$1.class new file mode 100644 index 00000000..a5df5dde Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/Login_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$2.class b/Dozentenmodul/bin/gui/intro/Login_GUI$2.class new file mode 100644 index 00000000..e012848d Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/Login_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$3.class b/Dozentenmodul/bin/gui/intro/Login_GUI$3.class new file mode 100644 index 00000000..110634ac Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/Login_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$4.class b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class new file mode 100644 index 00000000..6a5edcf2 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$5.class b/Dozentenmodul/bin/gui/intro/Login_GUI$5.class new file mode 100644 index 00000000..95da5c83 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/Login_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI.class b/Dozentenmodul/bin/gui/intro/Login_GUI.class new file mode 100644 index 00000000..8da7aa27 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/Login_GUI.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class new file mode 100644 index 00000000..ab46596e Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class new file mode 100644 index 00000000..6e02e951 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class new file mode 100644 index 00000000..6f117bda Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class new file mode 100644 index 00000000..9833fb28 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class new file mode 100644 index 00000000..89c32672 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class new file mode 100644 index 00000000..f2be5a62 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class new file mode 100644 index 00000000..89669271 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class new file mode 100644 index 00000000..ac611e57 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class new file mode 100644 index 00000000..40333b3d Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class new file mode 100644 index 00000000..0ce905d2 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class new file mode 100644 index 00000000..dfe0fd6d Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class new file mode 100644 index 00000000..ffa1370e Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class new file mode 100644 index 00000000..1c2b587b Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class differ diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class new file mode 100644 index 00000000..60fcb543 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class new file mode 100644 index 00000000..a61250c1 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class new file mode 100644 index 00000000..bfa90045 Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class new file mode 100644 index 00000000..056f8f8d Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class new file mode 100644 index 00000000..e74b203f Binary files /dev/null and b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$1.class new file mode 100644 index 00000000..dd70f264 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$2.class new file mode 100644 index 00000000..22209c73 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class new file mode 100644 index 00000000..808b6d99 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class new file mode 100644 index 00000000..fd1db594 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class new file mode 100644 index 00000000..05c6ac16 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$1.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$1.class new file mode 100644 index 00000000..47c63d0c Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$2.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$2.class new file mode 100644 index 00000000..892b1146 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$3.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$3.class new file mode 100644 index 00000000..90035c9c Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$4.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$4.class new file mode 100644 index 00000000..5f75304e Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$5.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$5.class new file mode 100644 index 00000000..cffdc75a Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$6.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$6.class new file mode 100644 index 00000000..50c6fd03 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$7.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$7.class new file mode 100644 index 00000000..d75be1b5 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI.class new file mode 100644 index 00000000..52d083e0 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$1.class new file mode 100644 index 00000000..efca8a22 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$2.class new file mode 100644 index 00000000..c7ac4cbd Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$3.class new file mode 100644 index 00000000..7d2bf4b7 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$4.class new file mode 100644 index 00000000..64422578 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$5.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$5.class new file mode 100644 index 00000000..6faabeed Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$6.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$6.class new file mode 100644 index 00000000..ceeea067 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI.class new file mode 100644 index 00000000..573cd051 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$1.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$1.class new file mode 100644 index 00000000..8ae5f63c Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class new file mode 100644 index 00000000..c67eb15c Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class new file mode 100644 index 00000000..9392da27 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class new file mode 100644 index 00000000..665f51d1 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$1.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$1.class new file mode 100644 index 00000000..20320054 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$2.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$2.class new file mode 100644 index 00000000..5648a1e6 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$3.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$3.class new file mode 100644 index 00000000..bc0e3d3e Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$4.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$4.class new file mode 100644 index 00000000..51852440 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$5.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$5.class new file mode 100644 index 00000000..bb626fb9 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class new file mode 100644 index 00000000..b08d2945 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class new file mode 100644 index 00000000..659fea33 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class new file mode 100644 index 00000000..d5aedb77 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$1.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$1.class new file mode 100644 index 00000000..e13684eb Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$2.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$2.class new file mode 100644 index 00000000..ab0ca727 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$3.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$3.class new file mode 100644 index 00000000..9be48f4a Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$4.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$4.class new file mode 100644 index 00000000..089015f7 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$5.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$5.class new file mode 100644 index 00000000..12d258fb Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$6.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$6.class new file mode 100644 index 00000000..e3015c86 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$7.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$7.class new file mode 100644 index 00000000..d306ed22 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI.class new file mode 100644 index 00000000..87d19a51 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$1.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$1.class new file mode 100644 index 00000000..b8590387 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$2.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$2.class new file mode 100644 index 00000000..975fb7c1 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$3.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$3.class new file mode 100644 index 00000000..9d4fc780 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$4.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$4.class new file mode 100644 index 00000000..46f15114 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI.class new file mode 100644 index 00000000..92a6a519 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI.class differ diff --git a/Dozentenmodul/bin/org.eclipse.core.resources.prefs b/Dozentenmodul/bin/org.eclipse.core.resources.prefs index 49b9df2a..61583c81 100644 --- a/Dozentenmodul/bin/org.eclipse.core.resources.prefs +++ b/Dozentenmodul/bin/org.eclipse.core.resources.prefs @@ -1,2 +1,2 @@ eclipse.preferences.version=1 -encoding//src/gui/EditVeranstaltungAllgemein_GUI.java=UTF-8 +encoding//src/gui/lecture/EditLectureAllgemein_GUI.java=UTF-8 diff --git a/Dozentenmodul/src/GUI/BillOfRights_GUI.java b/Dozentenmodul/src/GUI/BillOfRights_GUI.java deleted file mode 100644 index a18ce291..00000000 --- a/Dozentenmodul/src/GUI/BillOfRights_GUI.java +++ /dev/null @@ -1,192 +0,0 @@ -package gui; - -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.WindowAdapter; -import java.awt.event.WindowEvent; -import java.io.File; -import java.io.IOException; - -import javax.swing.JButton; -import javax.swing.JCheckBox; -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.JScrollPane; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.ini4j.InvalidFileFormatException; -import org.ini4j.Wini; - - - -@SuppressWarnings("serial") -public class BillOfRights_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JButton fwdButton; - JCheckBox chckbxAkzeptieren; - - /** - * Create the dialog. - */ - public BillOfRights_GUI() { - setResizable(false); - - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet das Programm beim Klick auf das X - System.exit(0); - } - }); - try { - //Setzt das Look & Feel auf das 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*"); - - //Zentiert das Fenster in der Bildschirmmitte - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 567, 60); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Hinweis"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Bitte lesen und best\u00E4tigen Sie folgende rechtliche Hinweise"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 22); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 95, 567, 485); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JTextArea txtrLoremIpsumDolor = new JTextArea(); - txtrLoremIpsumDolor.setWrapStyleWord(true); - txtrLoremIpsumDolor.setLineWrap(true); - txtrLoremIpsumDolor.setEditable(false); - JScrollPane scr=new JScrollPane(txtrLoremIpsumDolor); - scr.setBounds(0, 0, 567, 477); - txtrLoremIpsumDolor.setBounds(0, 0, 567, 477); - txtrLoremIpsumDolor.setText("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. \r\n\r\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. \r\n\r\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis. \r\n\r\nAt vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat. \r\n\r\nConsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus. \r\n\r\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. \r\n\r\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. \r\n\r\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo"); - - contentPanel.add(scr); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 630, 587, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - fwdButton = new JButton("Weiter"); - fwdButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - ini.put("main", "BillOfRights",true); - ini.store(); - } catch (InvalidFileFormatException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - VmWareLink_GUI ac=new VmWareLink_GUI(); - ac.setVisible(true); - dispose(); - } - }); - fwdButton.setEnabled(false); - - buttonPane.add(fwdButton); - } - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 617, 587, 2); - getContentPane().add(separator); - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 82, 587, 2); - getContentPane().add(separator); - } - - chckbxAkzeptieren = new JCheckBox("Ja, ich akzeptiere die Vereinbarung. Benachrichtigung nicht mehr anzeigen."); - chckbxAkzeptieren.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - //Beim Akzeptieren der Bestätigung wird der Weiter-Button verfügbar gemacht - if(chckbxAkzeptieren.isSelected()==true) - { - - fwdButton.setEnabled(true); - - } - else - { - - } - } - }); - chckbxAkzeptieren.setBackground(SystemColor.menu); - chckbxAkzeptieren.setBounds(10, 587, 567, 23); - getContentPane().add(chckbxAkzeptieren); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - mnNewMenu_1.setHorizontalAlignment(SwingConstants.CENTER); - 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/EditImageAllgemein_GUI.java b/Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java deleted file mode 100644 index 1d30e9d0..00000000 --- a/Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java +++ /dev/null @@ -1,350 +0,0 @@ -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.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.Map; - -import javax.swing.JButton; -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.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 javax.swing.border.TitledBorder; - -import org.apache.thrift.TException; - -import models.Image; -import models.person; -import server.Server.Client; -import thrift.ThriftConnection; -//import org.eclipse.wb.swing.FocusTraversalOnArray; -import java.awt.Component; - -@SuppressWarnings("serial") -public class EditImageAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField imagename; - ThriftConnection con=new ThriftConnection(); - Client client=con.getThriftConnection(); - private JPanel panel_2; - private JLabel lblNewLabel; - private JTextPane txtpnBitteWhlenSie; - private JPanel buttonPane; - private JButton backButton; - private JButton okButton; - - /** - * Create the dialog. - */ - public EditImageAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung bei einem Klick auf das X - con.closeThriftConnection(); - System.exit(0); - } - }); - //Verhindert das vergrößern des Fensters - setResizable(false); - - try { - 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 der Bildmitte - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - initData(); - getContentPane().setLayout(null); - { - panel_2 = new JPanel(); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(10, 11, 577, 57); - getContentPane().add(panel_2); - panel_2.setLayout(null); - { - lblNewLabel = new JLabel("Bearbeiten Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel_2.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - 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_2.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 245, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEditable(false); - Vorname.setEnabled(false); - Vorname.setBackground(Color.WHITE); - Vorname.setText(person.verantwortlicher.getVorname()); - Vorname.setColumns(10); - Vorname.setBounds(145, 245, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 276, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setBackground(Color.WHITE); - Nachname.setText(person.verantwortlicher.getName()); - Nachname.setColumns(10); - Nachname.setBounds(145, 276, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 307, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setBackground(Color.WHITE); - Hochschule.setText(person.verantwortlicher.getHochschule()); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 307, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 338, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setBackground(Color.WHITE); - EMail.setText(person.verantwortlicher.getEMail()); - EMail.setColumns(10); - EMail.setBounds(145, 338, 350, 20); - panel_1.add(EMail); - - JLabel lblImagename = new JLabel("Imagename: *"); - lblImagename.setBackground(SystemColor.menu); - lblImagename.setBounds(10, 31, 125, 20); - panel_1.add(lblImagename); - - imagename = new JTextField(); - imagename.setToolTipText("Bitte geben Sie hier den Namen des Image ein, z.B. \"Programmieren\"."); - imagename.setBackground(Color.WHITE); - imagename.setText(Image.image.getImagename()); - imagename.setColumns(10); - imagename.setBounds(145, 31, 350, 20); - panel_1.add(imagename); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setBounds(145, 62, 350, 110); - panel_1.add(txtrGebenSieBitte); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(10, 442, 136, 14); - contentPanel.add(lblPflichtfelder); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Durch den Klick auf Button Hauptmenpü wird dieses Fenster unsichtbar und das Hauptmenü sichtbar - con.closeThriftConnection(); - EditImageAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Bearbeiten"); - lblNewLabel_1.setBounds(146, 11, 71, 14); - contentPanel.add(lblNewLabel_1); - { - buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - backButton = new JButton("Zur\u00FCck"); - backButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar - //Image.image.setImagename(imagename.getText()); - con.closeThriftConnection(); - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - backButton.setActionCommand("CANCEL"); - buttonPane.add(backButton); - - } - { - okButton = new JButton("Weiter"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - System.out.println("text length="+imagename.getText().length()); - //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar - - //TODO - //Prüfung ob alle notwendigen Felder ausgefüllt sind --> funktioniert aktuell nicht - //der Button wechselt beim Klick auf die nächste Seite, selbst wenn kein handler implementiert ist... WTF??? - if(imagename.getText().length() <= 0){ - JOptionPane.showMessageDialog(null, - "Bitte geben Sie einen Labornamen ein.", - "Daten nicht vollständig", - JOptionPane.WARNING_MESSAGE); - } else { - Image.image.setNewName(imagename.getText()); - con.closeThriftConnection(); - EditImageTechnisch_GUI ea=new EditImageTechnisch_GUI(); - ea.setVisible(true); - dispose(); - }//end else - } - }); - - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - } - - 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); - //setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{getContentPane(), panel_2, lblNewLabel, txtpnBitteWhlenSie, contentPanel, panel_1, label, Vorname, label_7, Nachname, label_8, Hochschule, label_9, EMail, lblImagename, imagename, txtrGebenSieBitte, panel, lblPflichtfelder, lblHauptmen, label_1, lblVlimage, label_2, lblNewLabel_1, buttonPane, backButton, okButton, separator, separator_1, menuBar, mnNewMenu_1, mntmFaq, mntmOtrs})); - - } - - public void initData(){ - try { - - Map map=client.getImageData(Image.image.getImageId(),Image.image.getVersion()); - if(map.get("internet").equals("0")){ - Image.image.setInternet(false); - } - else - { - Image.image.setInternet(true); - } - if(map.get("license").equals("0")){ - Image.image.setLicensed(false); - } - else{ - Image.image.setLicensed(true); - } - Image.image.setImagename(map.get("name")); - Image.image.setRam(Integer.parseInt(map.get("ram"))); - Image.image.setCpu(Integer.parseInt(map.get("cpu"))); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - -} diff --git a/Dozentenmodul/src/GUI/EditImageTechnisch_GUI.java b/Dozentenmodul/src/GUI/EditImageTechnisch_GUI.java deleted file mode 100644 index 3c6109ae..00000000 --- a/Dozentenmodul/src/GUI/EditImageTechnisch_GUI.java +++ /dev/null @@ -1,366 +0,0 @@ -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.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.HashMap; -import java.util.Map; - -import javax.swing.ButtonGroup; -import javax.swing.JButton; -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.JSpinner; -import javax.swing.JTextArea; -import javax.swing.JTextPane; -import javax.swing.SpinnerNumberModel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -import org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; - -import models.Image; - -@SuppressWarnings("serial") -public class EditImageTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JSpinner spinnerCPU; - JSpinner spinnerRam; - JRadioButton rdbtnlicenseJa; - JRadioButton rdbtnlicenseNein; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - private final ButtonGroup buttonGrouplicense = new ButtonGroup(); - private final ButtonGroup buttonGroupInternet = new ButtonGroup(); - - - /** - * Create the dialog. - */ - public EditImageTechnisch_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung bei Klick auf das X - - System.exit(0); - } - - }); - //Verhindert das Vergrößern des Fensters - setResizable(false); - - try { - //setzt das Look & Feel - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Titel des Fensters - setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 95); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - rdbtnlicenseJa = new JRadioButton("Ja"); - rdbtnlicenseJa.setSelected(true); - buttonGrouplicense.add(rdbtnlicenseJa); - rdbtnlicenseJa.setBounds(266, 29, 109, 23); - panel_1.add(rdbtnlicenseJa); - - rdbtnlicenseNein = new JRadioButton("Nein"); - buttonGrouplicense.add(rdbtnlicenseNein); - rdbtnlicenseNein.setBounds(377, 29, 109, 23); - panel_1.add(rdbtnlicenseNein); - if(Image.image.isLicensed()==true){ - rdbtnlicenseJa.setSelected(true); - } - else - { - rdbtnlicenseNein.setSelected(true); - } - - - - JLabel lblInternetIstInnerhalb = new JLabel("Internet ist innerhalb des Image gesperrt:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - rdbtnInternetJa = new JRadioButton("Ja"); - buttonGroupInternet.add(rdbtnInternetJa); - rdbtnInternetJa.setBounds(266, 57, 109, 23); - panel_1.add(rdbtnInternetJa); - - rdbtnInternetNein = new JRadioButton("Nein"); - rdbtnInternetNein.setSelected(true); - buttonGroupInternet.add(rdbtnInternetNein); - rdbtnInternetNein.setBounds(377, 57, 109, 23); - panel_1.add(rdbtnInternetNein); - if(Image.image.isInternet()==true){ - rdbtnInternetJa.setSelected(true); - } - else - { - rdbtnInternetNein.setSelected(true); - } - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Macht dieses Fenster unsichtbar und das vorhergehende Fenster sichtbar - EditImageTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - - JPanel panel_2 = new JPanel(); - panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(10, 172, 557, 338); - contentPanel.add(panel_2); - - JTextArea txtrHinweisSolltenSie = new JTextArea(); - txtrHinweisSolltenSie.setBackground(SystemColor.menu); - txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); - txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); - txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); - panel_2.add(txtrHinweisSolltenSie); - - JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); - lblNewLabel_3.setBounds(10, 91, 280, 20); - panel_2.add(lblNewLabel_3); - - JLabel lblMindestens = new JLabel("mindestens"); - lblMindestens.setBounds(315, 91, 60, 20); - panel_2.add(lblMindestens); - - spinnerRam = new JSpinner(); - spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); - spinnerRam.setBounds(385, 88, 29, 20); - spinnerRam.setValue(Image.image.getRam()); - panel_2.add(spinnerRam); - - JLabel lblGbyte = new JLabel("GByte"); - lblGbyte.setBounds(424, 91, 46, 20); - panel_2.add(lblGbyte); - - JTextArea txtrBeispielWindows = new JTextArea(); - txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); - txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows.setBackground(SystemColor.menu); - txtrBeispielWindows.setBounds(20, 111, 280, 55); - panel_2.add(txtrBeispielWindows); - - JTextArea txtrBeispielWindows_1 = new JTextArea(); - txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); - txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows_1.setBackground(SystemColor.menu); - txtrBeispielWindows_1.setBounds(20, 226, 280, 55); - panel_2.add(txtrBeispielWindows_1); - - JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); - lblWieVieleCpus.setBounds(10, 201, 280, 20); - panel_2.add(lblWieVieleCpus); - - JLabel label_3 = new JLabel("mindestens"); - label_3.setBounds(315, 201, 60, 20); - panel_2.add(label_3); - - spinnerCPU = new JSpinner(); - spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); - spinnerCPU.setBounds(385, 198, 29, 20); - spinnerCPU.setValue(Image.image.getCpu()); - panel_2.add(spinnerCPU); - - JLabel lblKerne = new JLabel("Kerne"); - lblKerne.setBounds(424, 201, 46, 20); - panel_2.add(lblKerne); - { - 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) { - //Setzt die Imagewerte in das Model - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - //Öffnet das vorherige Fenster - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_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) { - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - //Öffnet das nächste Fenster - FTPEditUploader_GUI ea=new FTPEditUploader_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_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/EingabeImageAllgemein_GUI.java b/Dozentenmodul/src/GUI/EingabeImageAllgemein_GUI.java deleted file mode 100644 index da4f6997..00000000 --- a/Dozentenmodul/src/GUI/EingabeImageAllgemein_GUI.java +++ /dev/null @@ -1,302 +0,0 @@ -package gui; - - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import javax.swing.JTextField; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; - -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import javax.swing.JTextArea; - -import models.Image; -import models.person; - -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; - -@SuppressWarnings("serial") -public class EingabeImageAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField imagename; - - /** - * Create the dialog. - */ - public EingabeImageAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet das Fenster auf X - System.exit(0); - } - @Override - public void windowOpened(WindowEvent arg0) { - imagename.requestFocusInWindow(); - } - }); - //Verhindert das Vergrößern des Fensters - setResizable(false); - - try { - //setzt das Look & Feel - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Titel - setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 245, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEnabled(false); - Vorname.setEditable(false); - Vorname.setBackground(Color.WHITE); - Vorname.setText(person.verantwortlicher.getVorname()); - Vorname.setColumns(10); - Vorname.setBounds(145, 245, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 276, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setBackground(Color.WHITE); - Nachname.setText(person.verantwortlicher.getName()); - Nachname.setColumns(10); - Nachname.setBounds(145, 276, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 307, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setBackground(Color.WHITE); - Hochschule.setText(person.verantwortlicher.getHochschule()); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 307, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 338, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setBackground(Color.WHITE); - EMail.setText(person.verantwortlicher.getEMail()); - EMail.setColumns(10); - EMail.setBounds(145, 338, 350, 20); - panel_1.add(EMail); - - JLabel lblImagename = new JLabel("Imagename: *"); - lblImagename.setBackground(SystemColor.menu); - lblImagename.setBounds(10, 31, 125, 20); - panel_1.add(lblImagename); - - - imagename = new JTextField(); - imagename.setBackground(Color.WHITE); - imagename.setText((String) null); - imagename.setColumns(10); - imagename.setBounds(145, 31, 350, 20); - imagename.setText(Image.image.getImagename()); //null am Anfang, aber speichert die Eingabe, wenn man zurück kommt zur Seite - panel_1.add(imagename); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setEditable(false); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setBounds(145, 62, 350, 110); - panel_1.add(txtrGebenSieBitte); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(10, 442, 136, 14); - contentPanel.add(lblPflichtfelder); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Öffnet das Hauptmenü - EingabeImageAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton backButton = new JButton("Zur\u00FCck"); - backButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - Image.image.setImagename(imagename.getText()); - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - backButton.setActionCommand("Cancel"); - buttonPane.add(backButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - //Prüft die Eingabe - if(imagename.getText().isEmpty()==false && Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) - { - //Schreibt die Daten in das Model - Image.image.setImagename(imagename.getText()); - EingabeImageTechnisch_GUI ea=new EingabeImageTechnisch_GUI(); - ea.setVisible(true); - dispose(); - } - else{ - JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); - } - } - }); - continueButton.setActionCommand("OK"); - buttonPane.add(continueButton); - getRootPane().setDefaultButton(continueButton); - } - } - - 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); - - }//end main -} diff --git a/Dozentenmodul/src/GUI/EingabeImageTechnisch_GUI.java b/Dozentenmodul/src/GUI/EingabeImageTechnisch_GUI.java deleted file mode 100644 index f31f811d..00000000 --- a/Dozentenmodul/src/GUI/EingabeImageTechnisch_GUI.java +++ /dev/null @@ -1,364 +0,0 @@ -package gui; - - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import javax.swing.JTextArea; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import javax.swing.JRadioButton; -import javax.swing.ButtonGroup; -import javax.swing.JSpinner; -import javax.swing.SpinnerNumberModel; - -import models.Image; - -@SuppressWarnings("serial") -public class EingabeImageTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JSpinner spinnerCPU; - JSpinner spinnerRam; - JRadioButton rdbtnlicenseJa; - JRadioButton rdbtnlicenseNein; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - private final ButtonGroup buttonGrouplicense = new ButtonGroup(); - private final ButtonGroup buttonGroupInternet = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EingabeImageTechnisch_GUI dialog = new EingabeImageTechnisch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EingabeImageTechnisch_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("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 124); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - rdbtnlicenseNein = new JRadioButton("Nein"); - buttonGrouplicense.add(rdbtnlicenseNein); - rdbtnlicenseNein.setBounds(377, 29, 46, 23); - panel_1.add(rdbtnlicenseNein); - - rdbtnInternetNein = new JRadioButton("Nein"); - rdbtnInternetNein.setSelected(true); - buttonGroupInternet.add(rdbtnInternetNein); - rdbtnInternetNein.setBounds(377, 57, 46, 23); - panel_1.add(rdbtnInternetNein); - - JLabel lblInternetIstInnerhalb = new JLabel("Internet ist f\u00FCr dieses Image gesperrt:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - JButton btnInternetSettings = new JButton("Einstellungen..."); - btnInternetSettings.setEnabled(false); - btnInternetSettings.setBounds(439, 57, 108, 23); - panel_1.add(btnInternetSettings); - - rdbtnInternetJa = new JRadioButton("Ja"); - - buttonGroupInternet.add(rdbtnInternetJa); - rdbtnInternetJa.setBounds(266, 57, 41, 23); - panel_1.add(rdbtnInternetJa); - - rdbtnlicenseJa = new JRadioButton("Ja"); - rdbtnlicenseJa.setSelected(true); - buttonGrouplicense.add(rdbtnlicenseJa); - rdbtnlicenseJa.setBounds(266, 29, 41, 23); - panel_1.add(rdbtnlicenseJa); - - JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblLizenzserverEintragen = new JLabel("Lizenzserver eintragen:"); - lblLizenzserverEintragen.setBounds(10, 85, 250, 20); - panel_1.add(lblLizenzserverEintragen); - - JButton btnLicenseServer = new JButton("Server-Adresse..."); - btnLicenseServer.setEnabled(false); - btnLicenseServer.setBounds(266, 84, 157, 23); - panel_1.add(btnLicenseServer); - - JPanel panel_2 = new JPanel(); - panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(11, 196, 557, 338); - contentPanel.add(panel_2); - - JLabel lblGbyte = new JLabel("GByte"); - lblGbyte.setBounds(424, 91, 46, 20); - panel_2.add(lblGbyte); - - spinnerCPU = new JSpinner(); - spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); - spinnerCPU.setBounds(385, 188, 29, 20); - panel_2.add(spinnerCPU); - - JTextArea txtrBeispielWindows = new JTextArea(); - txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); - txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows.setBackground(SystemColor.menu); - txtrBeispielWindows.setBounds(10, 122, 280, 55); - panel_2.add(txtrBeispielWindows); - - - - JLabel lblKerne = new JLabel("Kerne"); - lblKerne.setBounds(424, 191, 46, 20); - panel_2.add(lblKerne); - - JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); - lblWieVieleCpus.setBounds(10, 191, 280, 20); - panel_2.add(lblWieVieleCpus); - - spinnerRam = new JSpinner(); - spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); - spinnerRam.setBounds(385, 88, 29, 20); - panel_2.add(spinnerRam); - - JLabel label_3 = new JLabel("mindestens"); - label_3.setBounds(315, 191, 60, 20); - panel_2.add(label_3); - - JLabel lblMindestens = new JLabel("mindestens"); - lblMindestens.setBounds(315, 91, 60, 20); - panel_2.add(lblMindestens); - - JTextArea txtrBeispielWindows_1 = new JTextArea(); - txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); - txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows_1.setBackground(SystemColor.menu); - txtrBeispielWindows_1.setBounds(10, 222, 280, 55); - panel_2.add(txtrBeispielWindows_1); - - JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); - lblNewLabel_3.setBounds(10, 91, 280, 20); - panel_2.add(lblNewLabel_3); - - JTextArea txtrHinweisSolltenSie = new JTextArea(); - txtrHinweisSolltenSie.setBackground(SystemColor.menu); - txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); - txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); - txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); - panel_2.add(txtrHinweisSolltenSie); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeImageTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton cancelButton = new JButton("Zur\u00FCck"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("OK"); - buttonPane.add(cancelButton); - //getRootPane().setDefaultButton(cancelButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - FTPUploader_GUI ea=new FTPUploader_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - continueButton.setActionCommand("Cancel"); - buttonPane.add(continueButton); - getRootPane().setDefaultButton(continueButton); - } - } - - 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 deleted file mode 100644 index 5b2d4751..00000000 --- a/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java +++ /dev/null @@ -1,504 +0,0 @@ -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.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -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.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JSeparator; -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 models.Image; -import models.Lecture; -import models.person; -import javax.swing.JTextArea; -import java.awt.ScrollPane; -import java.util.Calendar; -import java.util.Date; - -import com.toedter.calendar.JDateChooser; -import javax.swing.JRadioButton; - -@SuppressWarnings("serial") -public class EingabeVeranstaltungAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField txtFldVeranstaltungsname; - JTextArea description; - JRadioButton radioButtonyes; - JRadioButton radioButtonno; - JDateChooser dateChooserend; - JDateChooser dateChooserstart; - Date startDate = new Date(); - Date endDate; - int maxLifeTime = 180; // Anzahl Tage, die eine Veranstaltung in der Zukunft - // aktiv sein darf - boolean isDateOrderCorrect, isDateMaxLifeTimeCorrect, - isAllInformationReady = false; - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EingabeVeranstaltungAllgemein_GUI dialog = new EingabeVeranstaltungAllgemein_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EingabeVeranstaltungAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - - @Override - public void windowOpened(WindowEvent arg0) { - txtFldVeranstaltungsname.requestFocusInWindow(); - } - }); - 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("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie - .setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 331, 557, 162); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 33, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEditable(false); - Vorname.setEnabled(false); - Vorname.setText(person.verantwortlicher.getVorname()); - Vorname.setBackground(Color.WHITE); - Vorname.setColumns(10); - Vorname.setBounds(145, 33, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 64, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setText(person.verantwortlicher.getName()); - Nachname.setBackground(Color.WHITE); - Nachname.setColumns(10); - Nachname.setBounds(145, 64, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 95, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setText(person.verantwortlicher.getHochschule()); - Hochschule.setBackground(Color.WHITE); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 95, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 126, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setText(person.verantwortlicher.getEMail()); - EMail.setBackground(Color.WHITE); - EMail.setColumns(10); - EMail.setBounds(145, 126, 350, 20); - panel_1.add(EMail); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeVeranstaltungAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - - JPanel 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); - - txtFldVeranstaltungsname = new JTextField(); - txtFldVeranstaltungsname.setColumns(10); - txtFldVeranstaltungsname.setBounds(200, 22, 347, 20); - txtFldVeranstaltungsname.setText(Lecture.lecture.getName()); - panel_2.add(txtFldVeranstaltungsname); - - JTextArea textArea = new JTextArea(); - textArea.setEditable(false); - 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 lblDesc = new JLabel("Beschreibung: *"); - lblDesc.setBounds(10, 111, 180, 14); - panel_2.add(lblDesc); - - ScrollPane scrollPane = new ScrollPane(); - scrollPane.setBounds(200, 104, 347, 78); - panel_2.add(scrollPane); - description = new JTextArea(); - description.setFont(new Font("Tahoma", Font.PLAIN, 11)); - description.setLineWrap(true); - description.setText(Lecture.lecture.getDesc()); - scrollPane.add(description); - description.setBounds(0, 0, 4, 22); - scrollPane.add(description); - - dateChooserend = new JDateChooser(); - endDate = addDays(new Date(), maxLifeTime); // Datum darf weiter als 6 - // Monate in der Zukunft - // liegen - dateChooserend.setDate(endDate); - if (Lecture.lecture.getEnddate() == null) { - // is not defined yet - dateChooserend.setDate(endDate); - } else { - // already defined from last visit on this page - dateChooserend.setDate(Lecture.lecture.getEnddate()); - } - dateChooserend.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserend.setBounds(404, 188, 143, 20); - panel_2.add(dateChooserend); - - JLabel lblBis = new JLabel("bis:"); - lblBis.setBounds(378, 188, 21, 20); - panel_2.add(lblBis); - - dateChooserstart = new JDateChooser(); - if (Lecture.lecture.getStartdate() == null) { - // is not defined yet - dateChooserstart.setDate(startDate); - } else { - // already defined from last visit on this page - dateChooserstart.setDate(Lecture.lecture.getStartdate()); - } - dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserstart.setBounds(226, 188, 143, 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, 194, 127, 14); - panel_2.add(label_10); - - JLabel label_11 = new JLabel("Aktiv:"); - label_11.setBounds(10, 229, 127, 14); - panel_2.add(label_11); - - radioButtonyes = new JRadioButton("Ja"); - radioButtonyes.setSelected(true); - radioButtonyes.setBounds(200, 225, 73, 23); - panel_2.add(radioButtonyes); - - radioButtonno = new JRadioButton("Nein"); - radioButtonyes.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - radioButtonyes.setSelected(true); - radioButtonno.setSelected(false); - } - }); - radioButtonno.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - radioButtonno.setSelected(true); - radioButtonyes.setSelected(false); - } - }); - radioButtonno.setBounds(296, 225, 73, 23); - panel_2.add(radioButtonno); - - JLabel lblimVmchooserSichtbar = new JLabel("(im VMChooser sichtbar)"); - lblimVmchooserSichtbar.setBounds(10, 245, 127, 14); - panel_2.add(lblimVmchooserSichtbar); - - JLabel lblmaxMonate = new JLabel("(max. 6 Monate)"); - lblmaxMonate.setBounds(10, 208, 127, 14); - panel_2.add(lblmaxMonate); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton backButton = new JButton("Zur\u00FCck"); - backButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if (radioButtonyes.isSelected() == true) { - Lecture.lecture.setActive(true); - } else { - Lecture.lecture.setActive(false); - } - - Lecture.lecture.setName(txtFldVeranstaltungsname - .getText()); - Lecture.lecture.setDesc(description.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setStartdate(dateChooserstart.getDate()); - Image.image.setImagename(txtFldVeranstaltungsname - .getText()); - - MainMenue_GUI sr = new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - backButton.setActionCommand("Cancel"); - buttonPane.add(backButton); - getRootPane().setDefaultButton(backButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - // liegt das End-Datum vor dem Start-Datum? - if (dateChooserend.getDate().before( - dateChooserstart.getDate())) { - // datum ist falsch rum - isDateOrderCorrect = false; - JOptionPane - .showMessageDialog( - null, - "Das End-Datum liegt vor dem Start-Datum. Bitte ändern.", - "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); - } else { - // bereit - isDateOrderCorrect = true; - } - // liegt das eingegebene Datum nach dem erlaubten - // End-Datum? - if (dateChooserend.getDate().after(endDate)) { - // Datum zu weit weg - isDateMaxLifeTimeCorrect = false; - JOptionPane.showMessageDialog(null, - "Das End-Datum liegt zu weit in der Zukunft. Erlaubt ist maximal:\n" - + endDate, "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); - } else { - // bereit - isDateMaxLifeTimeCorrect = true; - } - // Prüfen ob alles eingegeben wurde - if (txtFldVeranstaltungsname.getText().isEmpty() == true - || description.getText().isEmpty() == true) { - // mind 1 Textfeld ist leer - isAllInformationReady = false; - JOptionPane - .showMessageDialog( - null, - "Bitte geben Sie einen Veranstaltungsnamen und eine Beschreibung ein.", - "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); - } else { - // Textfelder bereit - isAllInformationReady = true; - } - - // welcher Radiobutton ist geklickt? - if (radioButtonyes.isSelected() == true) { - Lecture.lecture.setActive(true); - } else { - Lecture.lecture.setActive(false); - } - // Prüfe ob alle Eingaben korrekt sind, dann mache - // weiter - if (isAllInformationReady == true - && isDateMaxLifeTimeCorrect == true - && isDateOrderCorrect == true) { - // everything is ok, proceed - Lecture.lecture.setName(txtFldVeranstaltungsname - .getText()); - Lecture.lecture.setDesc(description.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setStartdate(dateChooserstart - .getDate()); - Image.image.setImagename(txtFldVeranstaltungsname - .getText()); - - LinkImage_GUI ev = new LinkImage_GUI(); - ev.setVisible(true); - dispose(); - } - - } - }); - continueButton.setActionCommand("OK"); - buttonPane.add(continueButton); - } - } - - 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); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(32, 602, 136, 14); - getContentPane().add(lblPflichtfelder); - - 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 Date addDays(Date date, int days) { - Calendar cal = Calendar.getInstance(); - cal.setTime(date); - cal.add(Calendar.DATE, days); // minus number would decrement the days - return cal.getTime(); - } -} diff --git a/Dozentenmodul/src/GUI/ExtendedSearch_GUI.java b/Dozentenmodul/src/GUI/ExtendedSearch_GUI.java deleted file mode 100644 index 7f042cae..00000000 --- a/Dozentenmodul/src/GUI/ExtendedSearch_GUI.java +++ /dev/null @@ -1,234 +0,0 @@ -package gui; - - -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.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.JButton; -import javax.swing.JCheckBox; -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.JSeparator; -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; - -@SuppressWarnings("serial") -public class ExtendedSearch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField textField; - private JTextField textField_1; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - ExtendedSearch_GUI dialog = new ExtendedSearch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public ExtendedSearch_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); - - 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("Weitere Suchoptionen"); - 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("beschreibung"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Image-Typ", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 11, 557, 95); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Image-Typ"); - lblNewLabel_2.setBounds(10, 39, 176, 20); - panel_1.add(lblNewLabel_2); - - JCheckBox chckbxBestehendesImage = new JCheckBox("Bestehendes Image"); - chckbxBestehendesImage.setSelected(true); - chckbxBestehendesImage.setBounds(192, 38, 138, 23); - panel_1.add(chckbxBestehendesImage); - - JCheckBox chckbxRohling = new JCheckBox("Rohling"); - chckbxRohling.setSelected(true); - chckbxRohling.setBounds(332, 38, 97, 23); - panel_1.add(chckbxRohling); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBorder(new TitledBorder(null, "Image-Inhalt", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 117, 557, 95); - contentPanel.add(panel); - - JLabel lblEnthalteneSoftware = new JLabel("Enthaltene Software"); - lblEnthalteneSoftware.setBounds(10, 39, 176, 20); - panel.add(lblEnthalteneSoftware); - - textField = new JTextField(); - textField.setBounds(196, 39, 351, 20); - panel.add(textField); - textField.setColumns(10); - - JLabel lblNewLabel_1 = new JLabel("Bitte mit ; getrennt angeben"); - lblNewLabel_1.setBounds(196, 70, 351, 14); - panel.add(lblNewLabel_1); - - JPanel panel_2 = new JPanel(); - panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Informationen zum Ersteller", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(10, 223, 557, 123); - contentPanel.add(panel_2); - - JLabel lblNachnameDesErstellers = new JLabel("Nachname des Erstellers"); - lblNachnameDesErstellers.setBounds(10, 39, 176, 20); - panel_2.add(lblNachnameDesErstellers); - - textField_1 = new JTextField(); - textField_1.setColumns(10); - textField_1.setBounds(196, 39, 351, 20); - panel_2.add(textField_1); - - JLabel lblHochschuleuniversitt = new JLabel("Hochschule/Universit\u00E4t"); - lblHochschuleuniversitt.setBounds(10, 70, 176, 20); - panel_2.add(lblHochschuleuniversitt); - - JComboBox comboBox = new JComboBox(); - comboBox.setBounds(196, 70, 351, 20); - panel_2.add(comboBox); - { - 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) { - - - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("\u00DCbernehmen"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - - FTPUploader_GUI ea=new FTPUploader_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/FTPDownloader_GUI.java b/Dozentenmodul/src/GUI/FTPDownloader_GUI.java deleted file mode 100644 index cb53fc3d..00000000 --- a/Dozentenmodul/src/GUI/FTPDownloader_GUI.java +++ /dev/null @@ -1,370 +0,0 @@ -package gui; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import java.io.File; - -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import ftp.DownloadTask; - -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.awt.SystemColor; -import java.awt.Font; -import javax.swing.JTextPane; -import javax.swing.JSeparator; - -import models.Image; - -import org.apache.thrift.TException; - -import server.Server.Client; -import server.User; -import thrift.ThriftConnection; - -@SuppressWarnings("serial") -public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; - JLabel downspeed; - User user; - JProgressBar progressBar; - String host = "141.79.128.121"; - int port = 21; - String username = "openslx"; - String password = "openslx-ng"; - String downloadFile = ""; - static String arg = ""; - DownloadTask task; - JLabel bytesreadlbl; - JLabel lblNewLabel_3; - JLabel labelVerbleibend; - long filesize; - double speed; - long bytesread; - JLabel labelZeit; - boolean taskrun = false; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); - JButton buttonback = new JButton("Zur\u00FCck"); - - /** - * Launch the application. - */ - /* - * public static void main(String[] args) { EventQueue.invokeLater(new - * Runnable() { public void run() { try { FTPDownloader frame = new - * FTPDownloader(); frame.setVisible(true); } catch (Exception e) { - * e.printStackTrace(); } } }); } - */ - - /** - * Create the frame. - */ - public FTPDownloader_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - if (taskrun == true) { - try { - client.DeleteFtpUser(user.userName); - thrift.closeThriftConnection(); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - dispose(); - } - }); - setResizable(false); - // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - - setBackground(Color.WHITE); - setTitle("Dozentenmodul *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top = (screenSize.height - 722) / 2; - int left = (screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton( - "Speicherort ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc = new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - - fc.showOpenDialog(getParent()); - File dir = fc.getSelectedFile(); - lblNewLabel.setText(dir.getAbsolutePath()); - } - }); - - btnSpeicherortAuswhlen.setBounds(57, 124, 141, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblNewLabel = new JLabel("C:\\"); - lblNewLabel.setBounds(208, 124, 238, 23); - contentPanel.add(lblNewLabel); - - JButton btnDownloadStarten = new JButton("Download starten"); - btnDownloadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonDownloadActionPerformed(arg0); - } - }); - - btnDownloadStarten.setBounds(57, 168, 141, 23); - contentPanel.add(btnDownloadStarten); - - progressBar = new JProgressBar(0, 100); - progressBar.setStringPainted(true); - - progressBar.setBounds(57, 202, 497, 30); - contentPanel.add(progressBar); - - JLabel lblDownloadgeschwindigkeit = new JLabel( - "Downloadgeschwindigkeit:"); - lblDownloadgeschwindigkeit.setBounds(57, 243, 141, 14); - contentPanel.add(lblDownloadgeschwindigkeit); - - downspeed = new JLabel("0"); - downspeed.setBounds(308, 243, 95, 14); - contentPanel.add(downspeed); - - JLabel lblNewLabel_1 = new JLabel("Fertig:"); - lblNewLabel_1.setBounds(57, 293, 46, 14); - contentPanel.add(lblNewLabel_1); - - bytesreadlbl = new JLabel(""); - bytesreadlbl.setBounds(66, 244, 108, 14); - contentPanel.add(bytesreadlbl); - - JLabel lblNewLabel_2 = new JLabel("von:"); - lblNewLabel_2.setBounds(226, 293, 46, 14); - contentPanel.add(lblNewLabel_2); - - lblNewLabel_3 = new JLabel(""); - lblNewLabel_3.setBounds(235, 244, 108, 14); - contentPanel.add(lblNewLabel_3); - - JLabel lblMbVerbleibend = new JLabel("Verbleibend:"); - lblMbVerbleibend.setBounds(57, 318, 71, 14); - contentPanel.add(lblMbVerbleibend); - - labelVerbleibend = new JLabel(""); - labelVerbleibend.setBounds(91, 269, 108, 14); - contentPanel.add(labelVerbleibend); - - JLabel lblGeschtzteVerbleibendeZeit = new JLabel( - "Gesch\u00E4tzte Verbleibende Zeit:"); - lblGeschtzteVerbleibendeZeit.setBounds(57, 268, 150, 14); - contentPanel.add(lblGeschtzteVerbleibendeZeit); - - labelZeit = new JLabel(""); - labelZeit.setBounds(261, 219, 117, 14); - contentPanel.add(labelZeit); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel label = new JLabel("Eingabe Ihrer Daten"); - label.setFont(new Font("Tahoma", Font.BOLD, 18)); - label.setBounds(10, 11, 509, 22); - panel.add(label); - - JTextPane textPane = new JTextPane(); - textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - textPane.setEditable(false); - textPane.setBackground(SystemColor.menu); - textPane.setBounds(10, 36, 509, 32); - panel.add(textPane); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel label_1 = new JLabel("Hauptmen\u00FC"); - label_1.setForeground(Color.BLUE); - label_1.setBounds(20, 88, 61, 20); - contentPanel.add(label_1); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(80, 91, 14, 14); - contentPanel.add(label_2); - - JLabel label_3 = new JLabel("VL-Image"); - label_3.setForeground(Color.BLUE); - label_3.setBounds(91, 88, 46, 20); - contentPanel.add(label_3); - - JLabel label_4 = new JLabel(">"); - label_4.setBounds(139, 91, 14, 14); - contentPanel.add(label_4); - - JLabel label_5 = new JLabel("Neu/Bearbeiten"); - label_5.setBounds(149, 91, 108, 14); - contentPanel.add(label_5); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(-10, 648, 597, 2); - contentPanel.add(separator_1); - - JLabel label_6 = new JLabel("1."); - label_6.setBounds(24, 128, 23, 14); - contentPanel.add(label_6); - - JLabel label_7 = new JLabel("2."); - label_7.setBounds(24, 172, 23, 14); - contentPanel.add(label_7); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - buttonback.setEnabled(false); - buttonback.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if (taskrun == true) { - task.cancel(true); - try { - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - thrift.closeThriftConnection(); - SearchEditImage_GUI se=new SearchEditImage_GUI(); - se.setVisible(true); - dispose(); - } - }); - buttonback.setActionCommand("Cancel"); - buttonPane.add(buttonback); - } - } - setVisible(true); - - } - - private void buttonDownloadActionPerformed(ActionEvent event) { - - progressBar.setValue(0); - - try { - user = client.getFtpUser(); - - downloadFile=client.getPathOfImage(Image.image.getImageId(),Image.image.getVersion()); - - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - task = new DownloadTask(host, port, user.userName, user.password, - downloadFile, lblNewLabel.getText(), this); - task.addPropertyChangeListener(this); - task.execute(); - taskrun = true; - - } - - public void propertyChange(PropertyChangeEvent arg0) { - - int progress = 0; - if ("progress" == arg0.getPropertyName()) { - progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - if (progress == 100) { - buttonback.setEnabled(true); - } - } - - if ("speed" == arg0.getPropertyName()) { - speed = (double) arg0.getNewValue(); - // if(speed<=1){ - - downspeed.setText(String.valueOf(speed).substring(0, - String.valueOf(speed).lastIndexOf(".") + 3) - + " MB/s"); - - // }else - // { - // double MBSpeed=speed/1024; - // downspeed.setText(String.valueOf((MBSpeed)).substring(0, - // String.valueOf(MBSpeed).indexOf("."))); - // } - - } - if ("bytesread" == arg0.getPropertyName()) { - bytesread = (long) arg0.getNewValue(); - bytesreadlbl.setText((bytesread / 1024 / 1024) + " MB"); - labelVerbleibend - .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) - + " MB"); - - labelZeit - .setText(String - .valueOf( - ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) - .substring( - 0, - String.valueOf( - (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) - .lastIndexOf(".")) - + " Minuten"); - - } - if ("filesize" == arg0.getPropertyName()) { - filesize = (long) arg0.getNewValue(); - lblNewLabel_3.setText((filesize / 1024 / 1024) + " MB"); - - } - - } -} \ No newline at end of file diff --git a/Dozentenmodul/src/GUI/FTPUploader_GUI.java b/Dozentenmodul/src/GUI/FTPUploader_GUI.java deleted file mode 100644 index 93ea12e7..00000000 --- a/Dozentenmodul/src/GUI/FTPUploader_GUI.java +++ /dev/null @@ -1,512 +0,0 @@ -package gui; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.EventQueue; -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.WindowAdapter; -import java.awt.event.WindowEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.io.File; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.JSeparator; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import models.Image; -import models.person; -import org.apache.thrift.TException; -import server.Server.Client; -import thrift.ThriftConnection; -//import util.XMLCreator; -import ftp.UploadTask; - -@SuppressWarnings("serial") -public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; - JProgressBar progressBar; - String host = "141.79.128.121"; - int port = 21; - server.User user; - String filename = ""; - File uploadFile; - static String arg = ""; - UploadTask task; - JLabel UpSpeed; - JLabel labelfertig; - JLabel labelfilesize; - JLabel labelZeit; - JLabel labelverbleibend; - long filesize; - double speed; - long bytesread; - boolean taskrun = false; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); - JButton finishButton = new JButton("Fertigstellen"); - JButton btnUploadStarten = new JButton("Upload auf Server starten"); - JButton btnZurck = new JButton("Zur\u00FCck"); - int progress = 0; // progress of upload - - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - FTPUploader_GUI frame = new FTPUploader_GUI(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public FTPUploader_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - if (taskrun == true) { - try { - - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - } - }); - setResizable(false); - // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - // filename=name; - setBackground(Color.WHITE); - setTitle("Dozentenmodul *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, 250); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc = new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.FILES_ONLY); - - fc.showOpenDialog(getParent()); - File file = fc.getSelectedFile(); - // check if a file is selected and exists - if (file != null) { - System.out.println("File to upload exists"); - uploadFile = file; - filename = uploadFile.getName(); - lblNewLabel.setText(file.getAbsolutePath()); - } else { - System.out.println("No file selected"); - lblNewLabel.setText(""); - }// end if - } - }); - - btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblNewLabel = new JLabel(""); - lblNewLabel.addPropertyChangeListener(new PropertyChangeListener() { - public void propertyChange(PropertyChangeEvent arg0) { - if (lblNewLabel.getText().isEmpty()) { - // wenn leer, dann upload button nicht freigeben - btnUploadStarten.setEnabled(false); - } else { - // wenn leer, dann upload button nicht freigeben - btnUploadStarten.setEnabled(true); - } - } - }); - lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT); - lblNewLabel.setBounds(285, 124, 302, 23); - contentPanel.add(lblNewLabel); - - btnUploadStarten.setEnabled(false); - btnUploadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonUploadActionPerformed(arg0); - - } - }); - - btnUploadStarten.setBounds(102, 168, 173, 23); - contentPanel.add(btnUploadStarten); - - progressBar = new JProgressBar(0, 100); - progressBar.setStringPainted(true); - - progressBar.setBounds(102, 202, 485, 30); - contentPanel.add(progressBar); - - JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:"); - lblUploadgeschwindigkeit.setBounds(102, 243, 141, 14); - contentPanel.add(lblUploadgeschwindigkeit); - - JLabel label_1 = new JLabel("Fertig:"); - label_1.setBounds(102, 293, 46, 14); - contentPanel.add(label_1); - - labelfertig = new JLabel("0"); - labelfertig.setHorizontalAlignment(SwingConstants.LEFT); - labelfertig.setBounds(183, 293, 108, 14); - contentPanel.add(labelfertig); - - UpSpeed = new JLabel("0"); - UpSpeed.setHorizontalAlignment(SwingConstants.LEFT); - UpSpeed.setBounds(374, 243, 117, 14); - contentPanel.add(UpSpeed); - - JLabel label_4 = new JLabel("von:"); - label_4.setBounds(318, 293, 46, 14); - contentPanel.add(label_4); - - labelfilesize = new JLabel("0"); - labelfilesize.setHorizontalAlignment(SwingConstants.LEFT); - labelfilesize.setBounds(374, 293, 117, 14); - contentPanel.add(labelfilesize); - - JLabel label_6 = new JLabel("Verbleibend:"); - label_6.setBounds(102, 318, 71, 14); - contentPanel.add(label_6); - - JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - label_7.setBounds(102, 268, 150, 14); - contentPanel.add(label_7); - - labelZeit = new JLabel("0"); - labelZeit.setHorizontalAlignment(SwingConstants.LEFT); - labelZeit.setBounds(374, 268, 117, 14); - contentPanel.add(labelZeit); - - labelverbleibend = new JLabel("0"); - labelverbleibend.setHorizontalAlignment(SwingConstants.LEFT); - labelverbleibend.setBounds(183, 318, 108, 14); - contentPanel.add(labelverbleibend); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel lblUploadIhresImage = new JLabel("Upload Ihres Image"); - lblUploadIhresImage.setFont(new Font("Tahoma", Font.BOLD, 18)); - lblUploadIhresImage.setBounds(10, 11, 509, 22); - panel.add(lblUploadIhresImage); - - JTextPane txtpnFhreSieBitte = new JTextPane(); - txtpnFhreSieBitte - .setText("F\u00FChre Sie bitte die folgenden 3 Schritte aus um Ihr Image auf unseren Server zu laden."); - txtpnFhreSieBitte.setEditable(false); - txtpnFhreSieBitte.setBackground(SystemColor.menu); - txtpnFhreSieBitte.setBounds(10, 36, 509, 32); - panel.add(txtpnFhreSieBitte); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setForeground(Color.BLUE); - lblNewLabel_1.setBounds(20, 88, 61, 20); - contentPanel.add(lblNewLabel_1); - - JLabel label_3 = new JLabel(">"); - label_3.setBounds(80, 91, 14, 14); - contentPanel.add(label_3); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(91, 88, 46, 20); - contentPanel.add(lblVlimage); - - JLabel label_5 = new JLabel(">"); - label_5.setBounds(139, 91, 14, 14); - contentPanel.add(label_5); - - JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); - lblNeubearbeiten.setBounds(149, 91, 108, 14); - contentPanel.add(lblNeubearbeiten); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - contentPanel.add(separator_1); - - JButton btnCopyFileTo = new JButton("Copy File to Prod"); - btnCopyFileTo.setEnabled(false); - btnCopyFileTo.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - System.out.println("Copying file to " + user.path + "/" - + uploadFile.getName()); - client.startFileCopy(user.path + "/" + uploadFile.getName()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - }); - btnCopyFileTo.setBounds(102, 343, 173, 23); - contentPanel.add(btnCopyFileTo); - - JLabel lblShritt = new JLabel("Schritt 1:"); - lblShritt.setBounds(24, 128, 57, 14); - contentPanel.add(lblShritt); - - JLabel lblSchritt = new JLabel("Schritt 2:"); - lblSchritt.setBounds(24, 172, 57, 14); - contentPanel.add(lblSchritt); - - JLabel lblSchritt_1 = new JLabel("Schritt 3:"); - lblSchritt_1.setBounds(20, 391, 57, 14); - contentPanel.add(lblSchritt_1); - - JLabel lblKlickenSieAuf = new JLabel( - "Klicken Sie auf \"Fertigstellen\"."); - lblKlickenSieAuf.setBounds(98, 391, 241, 14); - contentPanel.add(lblKlickenSieAuf); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - // Button for starting upload - // JButton finishButton = new JButton("Fertigstellen"); - finishButton.setEnabled(false); - finishButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - writeData(); - dispose(); - MainMenue_GUI m = new MainMenue_GUI(); - m.setVisible(true); - if (taskrun == true) { - try { - client.DeleteFtpUser(user.userName); - thrift.closeThriftConnection(); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - - } - }); - - btnZurck.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - dispose(); - EingabeImageTechnisch_GUI m = new EingabeImageTechnisch_GUI(); - m.setVisible(true); - } - }); - btnZurck.setActionCommand("Cancel"); - buttonPane.add(btnZurck); - finishButton.setActionCommand("Cancel"); - buttonPane.add(finishButton); - } - } - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnHillfe = new JMenu("Hillfe"); - menuBar.add(mnHillfe); - setVisible(true); - - } - - private void buttonUploadActionPerformed(ActionEvent event) { - // File (or directory) with old name - // File file = new File(lblNewLabel.getText()); - - // File (or directory) with new name - // System.out.println(file.getAbsolutePath().substring(0,file.getAbsolutePath().lastIndexOf("\\"))+"\\"+vm.vl.getLaborname()+".vmdk"); - // File file2 = new - // File(file.getAbsoluteFile()+"\\"+vm.vl.getLaborname()+".vmdk"); - - // Rename file (or directory) - // boolean success = file.renameTo(file2); - // if (!success) { - // File was not successfully renamed - // System.out.println("Not OK"); - // } - // else - // { - // System.out.println("OK"); - // } - progressBar.setValue(0); - btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick - // und - - try { - user = client.getFtpUser(); - System.out.println("name" + user.userName); - System.out.println("path" + user.path); - System.out.println("pass" + user.password); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); - - System.out.println(formatter.format(new Date()) + "_" - + person.verantwortlicher.getHochschule() + "_" - + person.verantwortlicher.getUsername() + "_" - + Image.image.getImagename() + ".vmdk"); - Image.image.setNewName(formatter.format(new Date()) + "_" - + person.verantwortlicher.getHochschule() + "_" - + person.verantwortlicher.getUsername() + "_" - + Image.image.getImagename() + ".vmdk"); - task = new UploadTask(host, port, user.userName, user.password, - user.path, uploadFile); - - task.addPropertyChangeListener(this); - task.execute(); - taskrun = true; - - // createXML(); - // TransferToSatellit(); - - } - - public void propertyChange(PropertyChangeEvent arg0) { - progress = 0; - if ("progress" == arg0.getPropertyName()) { - progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - - // Button zum Fertigstellen freischalten, wenn 100% erreicht sind - if (progress == 100) { - finishButton.setEnabled(true); - - } - if (progress == 0 || progress == 100) { - // not uploading currently - btnZurck.setEnabled(true); - } else { - // currently uploading, don't let user interact - btnZurck.setEnabled(false); - } - - } - - if ("speed" == arg0.getPropertyName()) { - speed = (double) arg0.getNewValue(); - // if(speed<=1){ - - UpSpeed.setText(String.valueOf(speed).substring(0, - String.valueOf(speed).lastIndexOf(".") + 3) - + " MB/s"); - - // }else - // { - // double MBSpeed=speed/1024; - // downspeed.setText(String.valueOf((MBSpeed)).substring(0, - // String.valueOf(MBSpeed).indexOf("."))); - // } - - } - if ("bytesread" == arg0.getPropertyName()) { - bytesread = (long) arg0.getNewValue(); - labelfertig.setText((bytesread / 1024 / 1024) + " MB"); - labelverbleibend - .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) - + " MB"); - - labelZeit - .setText(String - .valueOf( - ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) - .substring( - 0, - String.valueOf( - (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) - .lastIndexOf(".")) - + " Minuten"); - - } - if ("filesize" == arg0.getPropertyName()) { - filesize = (long) arg0.getNewValue(); - labelfilesize.setText((filesize / 1024 / 1024) + " MB"); - - } - - } - - public boolean writeData() { - - try { - - client.writeVLdata(Image.image.getImagename(), - person.verantwortlicher.getVorname(), - person.verantwortlicher.getName(), - person.verantwortlicher.getHochschule(), - person.verantwortlicher.getEMail(), - person.verantwortlicher.getTel(), - person.verantwortlicher.getFakultät(), - Image.image.isLicensed(), Image.image.isInternet(), - Image.image.getRam(), Image.image.getCpu(), - "/srv/openslx/nfs/temp/" + Image.image.getNewName()); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return false; - } - return true; - - } -} \ No newline at end of file diff --git a/Dozentenmodul/src/GUI/LinkImage_GUI.java b/Dozentenmodul/src/GUI/LinkImage_GUI.java deleted file mode 100644 index b4052778..00000000 --- a/Dozentenmodul/src/GUI/LinkImage_GUI.java +++ /dev/null @@ -1,471 +0,0 @@ -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.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.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 LinkImage_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - JComboBox comboBox; - JTable tableAllImages; - private JTextField textFieldName; - String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", - "Verantwortlicher", "Letztes Update", "Schlagwort" }; - ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - LinkImage_GUI dialog = new LinkImage_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public LinkImage_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - - @Override - public void windowOpened(WindowEvent arg0) { - textFieldName.requestFocusInWindow(); - } - }); - 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("Suche nach VL-Image"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie - .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 49, 557, 131); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - textFieldName = new JTextField(); - textFieldName.addKeyListener(new KeyAdapter() { - @Override - public void keyReleased(KeyEvent e) { - String stext = textFieldName.getText(); - modelAll.setRowCount(0); - initTableModel(modelAll); - - if (stext != "") - for (int i = 0; i < modelAll.getRowCount(); i++) { - - if (modelAll.getValueAt(i, 0).toString() - .startsWith(stext)) { - - } else { - modelAll.removeRow(i); - } - } - - } - - }); - - textFieldName.setBounds(270, 30, 250, 20); - panel_1.add(textFieldName); - textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel( - "Erweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - ExtendedSearch_GUI es = new ExtendedSearch_GUI(); - es.setVisible(true); - } - }); - lblErweiterteSuche.setForeground(Color.BLUE); - - lblErweiterteSuche.setBounds(431, 106, 89, 14); - panel_1.add(lblErweiterteSuche); - - comboBox = new JComboBox(); - try { - List 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) { - - LinkImage_GUI.this.setVisible(false); - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); - contentPanel.add(lblNewLabel_1); - - JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); - - tabbedPane.setBounds(10, 197, 557, 300); - contentPanel.add(tabbedPane); - - JScrollPane scrollPaneMyImage = new JScrollPane(); - JTable tablemyImages = new JTable(); - tablemyImages.setModel(model); - tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - JScrollPane scrollPaneAllImages = new JScrollPane(); - tableAllImages = new JTable(); - tableAllImages.setModel(modelAll); - tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - scrollPaneAllImages.setViewportView(tableAllImages); - tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); - - scrollPaneMyImage.setViewportView(tablemyImages); - tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); - - JScrollPane scrollPaneCoopImages = new JScrollPane(); - JTable tableCoopImages = new JTable(); - tableCoopImages.setModel(model); - tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - scrollPaneCoopImages.setViewportView(tableCoopImages); - tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, - null); - 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); - - 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 cancelButton = new JButton("Zur\u00FCck"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - con.closeThriftConnection(); - EingabeVeranstaltungAllgemein_GUI eVAG = new EingabeVeranstaltungAllgemein_GUI(); - eVAG.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("CANCEL"); - buttonPane.add(cancelButton); - getRootPane().setDefaultButton(cancelButton); - } - { - JButton doLinkButton = new JButton( - "Veranstaltung erzeugen und abschlie\u00DFen"); - doLinkButton.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("Veranstaltung anlegen um: " - + 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()); - JOptionPane - .showMessageDialog( - null, - "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmenü zurück.", - "Veranstaltung angelegt", - JOptionPane.PLAIN_MESSAGE); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - JOptionPane - .showMessageDialog( - null, - "Beim Anlegen Ihrer Veranstaltung ist ein Fehler aufgetreten.", - "Error", JOptionPane.ERROR_MESSAGE); - } - con.closeThriftConnection(); - dispose(); - - } - }); - doLinkButton.setActionCommand("OK"); - buttonPane.add(doLinkButton); - } - } - - 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 images; - try { - images = client.getImageList(); - Iterator i = images.iterator(); - List ListObj = new ArrayList(); - 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/Login_GUI.java b/Dozentenmodul/src/GUI/Login_GUI.java deleted file mode 100644 index 172895d6..00000000 --- a/Dozentenmodul/src/GUI/Login_GUI.java +++ /dev/null @@ -1,260 +0,0 @@ -package gui; - -import java.awt.Dimension; -import java.awt.EventQueue; -import java.awt.Image; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.io.File; -import java.io.IOException; - -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JPasswordField; -import javax.swing.JTextField; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.SessionData; -import models.person; -import org.apache.thrift.TException; -//import org.apache.thrift.protocol.TBinaryProtocol; -//import org.apache.thrift.protocol.TProtocol; -import org.ini4j.Wini; -//import thrift.AuthenticationException; -//import thrift.ImageServer; -//import thrift.InvalidTokenException; -//import thrift.SessionData; -import thrift.MasterThriftConnection; -import thrift.ImageServer.Client; -import thrift.UserInfo; - -import config.config_file; - -@SuppressWarnings("serial") -public class Login_GUI extends JFrame { - - private JPanel contentPane; - private JTextField username; - private JPasswordField pass; - - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - // Prüfe und Erzeuge gegebenfalls Config - config_file cf = new config_file(); - boolean conf = cf.createConfig(); - if (conf == true) { - // Aufruf und Anzeige des Login Fensters - Login_GUI frame = new Login_GUI(); - frame.setVisible(true); - } else { - JOptionPane.showMessageDialog(null, - "Fehler beim erzeugen der Konfigurationsfile", - "Message", JOptionPane.ERROR_MESSAGE); - } - - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public Login_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - - // Fenster darf nicht vergrößert werden - setResizable(false); - try { - // Setzt das Look and Feel auf System - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - // Titel des Fensters setzen - setTitle("Dozentenmodul *Prototyp*"); - // Aktion die beim Schließen durchgeführt werden soll - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - // Größe des Fensters definieren - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top = (screenSize.height - 400) / 2; - int left = (screenSize.width - 603) / 2; - setBounds(left, top, 603, 400); - // Erzeugen eines Panels - contentPane = new JPanel(); - // Hintergrund Farbe des Panels setzen - contentPane.setBackground(SystemColor.menu); - // Rahmen des Fensters setzen - contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); - setContentPane(contentPane); - // Layout setzen - contentPane.setLayout(null); - // Label für das Logo erzeugen - JLabel imgLabel = new JLabel(); - // Größe und Position des Logos festelegen - imgLabel.setBounds(150, 11, 350, 142); - // Pfadangabe des Logos - - ImageIcon icon = new ImageIcon(getClass().getResource( - "/Logo_bwLehrpool.png"), "Logo"); - // Skalierung des Logos - Image scaled = icon.getImage().getScaledInstance(270, 64, 0); - imgLabel.setIcon(new ImageIcon(scaled)); - // Hinzufügen des Logos in das Fenster - contentPane.add(imgLabel); - - // Erzeugen und Hinzufügen des Labels - JLabel LabelUser = new JLabel("bwIDM-Benutzername:"); - LabelUser.setBounds(111, 164, 134, 20); - contentPane.add(LabelUser); - - // Erzeugen und Hinzufügen des Textfeldes - username = new JTextField(); - username.setToolTipText("Bitte geben Sie Ihren bwIDM-Benutzernamen ein."); - username.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - performLogin(); - } - }); - username.setBounds(304, 164, 196, 20); - contentPane.add(username); - username.setColumns(10); - - // Erzeugen und Hinzufügen des Labels - JLabel LabelPass = new JLabel("bwIDM-Passwort:"); - LabelPass.setBounds(111, 195, 134, 20); - contentPane.add(LabelPass); - - // Erzeugen, Hinzufügen und definierung der Aktion des Buttons - JButton BtnLogin = new JButton("Login"); - BtnLogin.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - performLogin(); - }// end actionPerformed - }); - - BtnLogin.setBounds(304, 244, 196, 23); - contentPane.add(BtnLogin); - - // Erzeugen und Hinzufügen des Passwortfeldes - pass = new JPasswordField(); - pass.setToolTipText("Bitte geben Sie Ihr bwIDM-Passwort ein."); - pass.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - performLogin(); - } - }); - pass.setBounds(304, 195, 196, 20); - contentPane.add(pass); - }// end LoginGUI() - - //Versuche den Benutzer einzuloggen - public void performLogin() { - // Aufruf der Ldap Klasse, welche die Ldap überprüfung vornimmt - // Ldap check=new Ldap(); - boolean login = true; - // boolean login=check.LdapAuth(username.getText(), new - // String(pass.getPassword())); - MasterThriftConnection thrift = new MasterThriftConnection(); - Client client = thrift.getMasterThriftConnection(); - String token = null; - final thrift.SessionData result; - try { - String passText = new String(pass.getPassword()); - System.out.println(username.getText() + " " + passText); - result = client.authenticate(username.getText(), passText); - - } catch (thrift.AuthenticationException e) { - System.out.println("Authentifizierung fehlgeschlagen: " + e.message); - JOptionPane.showMessageDialog(null, - "Benutzeranmeldung fehlgeschlagen: Bitte Benutzername und Passwort überprüfen.", - "Anmeldung fehlgeschlagen", - JOptionPane.ERROR_MESSAGE); - - return; - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return; - } - System.out - .println("Konnte mich beim MasterServer authentifizieren. Meine Session-ID ist " - + result.sessionId - + ", mein Token für den Satelliten " - + result.authToken); - token = result.authToken; - if (login == true) { - - try { - Wini ini = new Wini(new File("C:\\Users\\" - + System.getProperty("user.name") - + "\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - // Prüfe ob Bills Of Rights schon akzeptiert wurden, wenn nicht - // zeige diese an - if (ini.get("main", "BillOfRights", boolean.class) == false) { - // Erstellen einer Instanz der Aktionsauswahl - BillOfRights_GUI re = new BillOfRights_GUI(); - re.setVisible(true); - // Schließen des Fensters nach erfolgreichen Login - setVisible(false); - } else { - // Prüfe ob die Links zu vmware angezeigt werden sollen - if (ini.get("main", "vmware", boolean.class) == false) { - VmWareLink_GUI vm = new VmWareLink_GUI(); - vm.setVisible(true); - setVisible(false); - } else { - UserInfo user = client.getUserFromToken(token); - - String hochschule = user.eMail.substring(user.eMail - .indexOf("@") + 1, user.eMail.indexOf(".", - user.eMail.indexOf("@"))); - // System.out.println("hochschule="+hochschule); - - person.verantwortlicher.setUsername(username.getText()); - person.verantwortlicher.setName(user.lastName); - person.verantwortlicher.setVorname(user.firstName); - person.verantwortlicher.setEMail(user.eMail); - person.verantwortlicher.setHochschule(hochschule); - // Öffne das Hauprmenü - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - setVisible(false); - } - } - } catch (IOException | TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } else { - JOptionPane.showMessageDialog(null, "Login denied!", "Message", - JOptionPane.INFORMATION_MESSAGE); - } - }// end performLogin - -}// end class diff --git a/Dozentenmodul/src/GUI/MainMenue_GUI.java b/Dozentenmodul/src/GUI/MainMenue_GUI.java deleted file mode 100644 index 7cf7face..00000000 --- a/Dozentenmodul/src/GUI/MainMenue_GUI.java +++ /dev/null @@ -1,443 +0,0 @@ -package gui; - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JRadioButton; -import javax.swing.SwingConstants; -import javax.swing.ButtonGroup; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import javax.swing.ToolTipManager; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.ScrollPane; -import javax.swing.JTextArea; -import javax.swing.ImageIcon; - -@SuppressWarnings("serial") -public class MainMenue_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - String descNewImage, descEditImage, descDeleteImage, descSearchImage, - descNewLecture, descEditLecture, descDeleteLecture, - descSearchLecture = ""; - JRadioButton rdbtnImageNew; - JRadioButton rdbtnImageEdit; - JRadioButton rdbtnImageSearchDownload; - JRadioButton rdbtnVeranstaltungNew; - JRadioButton rdbtnImageDelete; - JRadioButton rdbtnVeranstaltungEdit; - private final ButtonGroup buttonGroup = new ButtonGroup(); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - MainMenue_GUI dialog = new MainMenue_GUI(); - dialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - }// end main - - /** - * Create the dialog. - */ - public MainMenue_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - 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, 545, 366); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 567, 69); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Hauptmen\u00FC"); - 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("Bitte w\u00E4hlen Sie ihre gew\u00FCnschte Aktion."); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 22); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 104, 567, 502); - contentPanel.setBackground(SystemColor.menu); - - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panelImage = new JPanel(); - panelImage.setBackground(SystemColor.menu); - panelImage.setBorder(new TitledBorder(null, "VL-Image", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelImage.setBounds(10, 146, 270, 170); - contentPanel.add(panelImage); - panelImage.setLayout(null); - - rdbtnImageNew = new JRadioButton("Neu"); - rdbtnImageNew - .setToolTipText("Hier k\u00F6nnen Sie eine standard Laborvorlage downloaden"); - rdbtnImageNew.setBounds(6, 22, 159, 23); - panelImage.add(rdbtnImageNew); - rdbtnImageNew.setSelected(true); - buttonGroup.add(rdbtnImageNew); - rdbtnImageNew.setBackground(SystemColor.menu); - - rdbtnImageEdit = new JRadioButton("Bearbeiten"); - rdbtnImageEdit - .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); - rdbtnImageEdit.setBounds(6, 48, 185, 23); - panelImage.add(rdbtnImageEdit); - buttonGroup.add(rdbtnImageEdit); - rdbtnImageEdit.setHorizontalAlignment(SwingConstants.LEFT); - rdbtnImageEdit.setBackground(SystemColor.menu); - - rdbtnImageDelete = new JRadioButton("L\u00F6schen"); - rdbtnImageDelete.setEnabled(false); - buttonGroup.add(rdbtnImageDelete); - rdbtnImageDelete - .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); - rdbtnImageDelete.setHorizontalAlignment(SwingConstants.LEFT); - rdbtnImageDelete.setBackground(SystemColor.menu); - rdbtnImageDelete.setBounds(6, 74, 185, 23); - panelImage.add(rdbtnImageDelete); - - rdbtnImageSearchDownload = new JRadioButton("Suche und Download"); - rdbtnImageSearchDownload.setEnabled(false); - buttonGroup.add(rdbtnImageSearchDownload); - rdbtnImageSearchDownload - .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); - rdbtnImageSearchDownload.setHorizontalAlignment(SwingConstants.LEFT); - rdbtnImageSearchDownload.setBackground(SystemColor.menu); - rdbtnImageSearchDownload.setBounds(6, 100, 185, 23); - panelImage.add(rdbtnImageSearchDownload); - - JPanel panelDesc = new JPanel(); - panelDesc.setLayout(null); - panelDesc.setBorder(new TitledBorder(UIManager - .getBorder("TitledBorder.border"), "Erklärung", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelDesc.setBackground(SystemColor.menu); - panelDesc.setBounds(290, 146, 270, 170); - contentPanel.add(panelDesc); - - ScrollPane scrollPaneDesc = new ScrollPane(); - scrollPaneDesc.setBounds(10, 15, 250, 145); - final JTextArea txtDesc = new JTextArea(); - txtDesc.setLineWrap(true); - txtDesc.setWrapStyleWord(true); - txtDesc.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtDesc.setBackground(SystemColor.menu); - scrollPaneDesc.add(txtDesc); - // Pro AUswahl - txtDesc.setText("Legen Sie ein neues Image an und laden Sie anschließend die passende .vmdk-Datei hoch. Ein Image (wenn auch von einem anderen Dozenten) ist die Voraussetzung für eine Veranstaltung."); - panelDesc.add(scrollPaneDesc); - - JPanel panelVeranstaltung = new JPanel(); - panelVeranstaltung.setLayout(null); - panelVeranstaltung.setBorder(new TitledBorder(UIManager - .getBorder("TitledBorder.border"), "Veranstaltung (VMChooser)", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelVeranstaltung.setBackground(SystemColor.menu); - panelVeranstaltung.setBounds(10, 327, 270, 170); - contentPanel.add(panelVeranstaltung); - - rdbtnVeranstaltungNew = new JRadioButton("Neu"); - buttonGroup.add(rdbtnVeranstaltungNew); - rdbtnVeranstaltungNew - .setToolTipText("Hier k\u00F6nnen Sie Ihre Labordaten eingeben"); - rdbtnVeranstaltungNew.setBounds(6, 24, 185, 23); - panelVeranstaltung.add(rdbtnVeranstaltungNew); - rdbtnVeranstaltungNew.setBackground(SystemColor.menu); - - rdbtnVeranstaltungEdit = new JRadioButton("Bearbeiten"); - rdbtnVeranstaltungEdit - .setToolTipText("Hier k\u00F6nnen Sie einen Link auf ein bestehendes Labor erzeugen"); - rdbtnVeranstaltungEdit.setBounds(6, 50, 230, 23); - panelVeranstaltung.add(rdbtnVeranstaltungEdit); - buttonGroup.add(rdbtnVeranstaltungEdit); - rdbtnVeranstaltungEdit.setBackground(SystemColor.menu); - - JRadioButton rdbtnVeranstaltungDelete = new JRadioButton("L\u00F6schen"); - rdbtnVeranstaltungDelete.setEnabled(false); - rdbtnVeranstaltungDelete - .setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); - rdbtnVeranstaltungDelete.setBounds(6, 76, 175, 23); - panelVeranstaltung.add(rdbtnVeranstaltungDelete); - buttonGroup.add(rdbtnVeranstaltungDelete); - rdbtnVeranstaltungDelete.setBackground(SystemColor.menu); - - JRadioButton rdbtnVeranstaltungSearch = new JRadioButton("Suche"); - rdbtnVeranstaltungSearch.setEnabled(false); - buttonGroup.add(rdbtnVeranstaltungSearch); - rdbtnVeranstaltungSearch - .setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); - rdbtnVeranstaltungSearch.setBackground(SystemColor.menu); - rdbtnVeranstaltungSearch.setBounds(6, 102, 175, 23); - panelVeranstaltung.add(rdbtnVeranstaltungSearch); - - JLabel lblCrumbStart = new JLabel("Startseite"); - lblCrumbStart.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - Login_GUI lw = new Login_GUI(); - lw.setVisible(true); - MainMenue_GUI.this.setVisible(false); - } - }); - lblCrumbStart.setForeground(Color.BLUE); - lblCrumbStart.setBounds(10, 0, 52, 14); - contentPanel.add(lblCrumbStart); - - JLabel label = new JLabel(">"); - label.setBounds(60, 0, 13, 14); - contentPanel.add(label); - - JLabel lblRechtshinweis = new JLabel("Rechtshinweis"); - lblRechtshinweis.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - BillOfRights_GUI rb = new BillOfRights_GUI(); - rb.setVisible(true); - MainMenue_GUI.this.setVisible(false); - } - }); - lblRechtshinweis.setForeground(Color.BLUE); - lblRechtshinweis.setBounds(72, 0, 68, 14); - contentPanel.add(lblRechtshinweis); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(142, 0, 13, 14); - contentPanel.add(label_1); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setBounds(150, 0, 74, 14); - contentPanel.add(lblNewLabel_1); - - JPanel panelNews = new JPanel(); - panelNews.setLayout(null); - panelNews.setBorder(new TitledBorder(UIManager - .getBorder("TitledBorder.border"), "News", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelNews.setBackground(SystemColor.menu); - panelNews.setBounds(290, 327, 270, 170); - contentPanel.add(panelNews); - - ScrollPane scrollPaneNews = new ScrollPane(); - // scrollPaneDesc.setBounds(10, 15, 250, 145); - scrollPaneNews.setBounds(10, 15, 250, 145); - JTextArea txtNews = new JTextArea(); - txtNews.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtNews.setBackground(SystemColor.menu); - txtNews.setWrapStyleWord(true); - txtNews.setLineWrap(true); - txtNews.setText("Hier werden mal die Neuigkeiten stehen. Diese kommen direkt vom Satelliten, sind als HS-spezifisch :)"); - scrollPaneNews.add(txtNews); - panelNews.add(scrollPaneNews); - - /* - * Funktion Texte für das Klicken der RadioButtons - */ - rdbtnImageNew.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - descNewImage = "Legen Sie ein neues Image an und laden Sie anschließend die passende .vmdk-Datei hoch. Ein Image (wenn auch von einem anderen Dozenten) ist die Voraussetzung für eine Veranstaltung."; - txtDesc.setText(descNewImage); - } - }); - rdbtnImageEdit.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descEditImage = "Bearbeiten Sie die hinterlegten Informationen zu einem Image oder laden Sie eine neue .vmdk-Datei hoch."; - txtDesc.setText(descEditImage); - } - }); - rdbtnImageDelete.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descDeleteImage = "Suchen Sie alte und nicht mehr benötigte Images und löschen Sie diese."; - txtDesc.setText(descDeleteImage); - } - }); - rdbtnImageSearchDownload.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descSearchImage = "Suchen Sie nach bestimmten Images oder verschaffen Sie sich einen Überblick über alle verfügbaren Images. Sie können gewünschte Images umgehend herunterladen."; - txtDesc.setText(descSearchImage); - } - }); - rdbtnVeranstaltungNew.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descNewLecture = "Legen Sie eine neue Veranstaltung an und verknüpfen Sie diese mit einem bereits vorhandenem Image. Ihre neue Veranstaltung kann auch auf dem Image eines anderen Dozenten beruhen."; - txtDesc.setText(descNewLecture); - } - }); - rdbtnVeranstaltungEdit.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descEditLecture = "Bearbeiten Sie die hinterlegten Informationen zu einer Veranstaltung."; - txtDesc.setText(descEditLecture); - } - }); - rdbtnVeranstaltungDelete.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descDeleteLecture = "Suchen und löschen Sie eine Veranstaltung. Das hiermit verbundene Image bleibt erhalten."; - } - }); - rdbtnVeranstaltungSearch.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descSearchLecture = "Suchen Sie nach bestimmten Veranstaltungen oder verschaffen Sie sich einen Überblick über alle verfügbaren Veranstaltungen. Eventuell gibt es bereits etwas passendes für Ihre Vorlesung."; - txtDesc.setText(descSearchLecture); - } - }); - /* - * Ende der Radiobuttons - */ - - JLabel lblGrafik = new JLabel(""); - // ToolTipp für Grafik - lblGrafik - .setToolTipText("" - + "Ein virtuelles Labor besteht immer aus den beiden Komponenten
" - + "Image und Veranstaltung. Ein Image ist dabei die Grundlage f\u00FCr
" - + "mehrere Veranstaltungen. Somit kann eine neue Veranstaltung
" - + "erstellt werden, ohne ein neues Image hochladen zu m\u00FCssen.


" - + "Image: Das Image enth\u00E4lt die ben\u00F6tigte Software, die im
" - + "virtuellen Labor ben\u00F6tigt wird. Es wird von genau einem Dozenten
" - + "angelegt und besitzt einen allgemeinen Namen, z.B. \"Programmieren\".
" - + "Bei einem Image handelt es sich um eine Datei vom Typ VMDK.


" - + "Veranstaltung: Es k\u00F6nnen nun, basierend auf einem Image,
" - + " beliebig viele Veranstaltungen von unterschiedlichen Dozenten erstellt
" - + "werden. Diese k\u00F6nnten z.B. konkret \"Web-Entwicklung\" oder \"K\u00FCnstliche
" - + "Intelligenz\" lauten und referenzieren dabei auf das allgemeine Image
" - + "\"Programmieren\"."); - lblGrafik.setIcon(new ImageIcon(MainMenue_GUI.class - .getResource("/Image_zu_Veranstaltung_HDD.png"))); - // ToolTipp lange anzeigen - 60sec - ToolTipManager.sharedInstance().setDismissDelay(60000); - ToolTipManager.sharedInstance().registerComponent(lblGrafik); - lblGrafik.setBounds(82, 11, 391, 110); - contentPanel.add(lblGrafik); - - JTextPane txtpnUmDetaillierteInformationen = new JTextPane(); - txtpnUmDetaillierteInformationen - .setText("Um detaillierte Informationen zu erhalten, fahren Sie bitte mit der Maus \u00FCber die Grafik."); - txtpnUmDetaillierteInformationen.setEditable(false); - txtpnUmDetaillierteInformationen.setBackground(SystemColor.menu); - txtpnUmDetaillierteInformationen.setBounds(10, 113, 509, 22); - contentPanel.add(txtpnUmDetaillierteInformationen); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 630, 587, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton continueButton = new JButton("Weiter"); - - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if (rdbtnImageNew.isSelected() == true) { - EingabeImageAllgemein_GUI sr = new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } else if (rdbtnImageEdit.isSelected() == true) { - - SearchEditImage_GUI si = new SearchEditImage_GUI(); - si.setVisible(true); - dispose(); - } else if (rdbtnImageSearchDownload.isSelected() == true) { - SearchMethod_GUI sm = new SearchMethod_GUI(); - sm.setVisible(true); - dispose(); - } else if (rdbtnImageDelete.isSelected() == true) { - DeleteImage_GUI di = new DeleteImage_GUI(); - di.setVisible(true); - dispose(); - } else if (rdbtnVeranstaltungNew.isSelected() == true) { - EingabeVeranstaltungAllgemein_GUI av = new EingabeVeranstaltungAllgemein_GUI(); - av.setVisible(true); - dispose(); - } else if (rdbtnVeranstaltungEdit.isSelected() == true) { - SearchEditLecture_GUI sl = new SearchEditLecture_GUI(); - sl.setVisible(true); - dispose(); - } - } - }); - continueButton.setActionCommand("OK"); - buttonPane.add(continueButton); - getRootPane().setDefaultButton(continueButton); - } - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 617, 587, 2); - getContentPane().add(separator); - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 91, 587, 2); - getContentPane().add(separator); - } - - 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); - - }// end main - -}// end class diff --git a/Dozentenmodul/src/GUI/SearchImage_GUI.java b/Dozentenmodul/src/GUI/SearchImage_GUI.java deleted file mode 100644 index 53257f48..00000000 --- a/Dozentenmodul/src/GUI/SearchImage_GUI.java +++ /dev/null @@ -1,459 +0,0 @@ -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.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.ListSelectionModel; -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 org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; - -@SuppressWarnings("serial") -public class SearchImage_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - JComboBox comboBox; - JTable tableAllImages; - JTable tablemyImages; - private JTextField textFieldName; - JTabbedPane tabbedPane; - String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", - "Verantwortlicher", "Letztes Update", "Schlagwort" }; - ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); - final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); - final DefaultTableModel modelMyImages = new DefaultTableModel(titles, 0); - final TableRowSorter rowSorterAll = new TableRowSorter( - modelAll); - final TableRowSorter rowSorterMyImages = new TableRowSorter( - modelMyImages); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - SearchImage_GUI dialog = new SearchImage_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public SearchImage_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - // Beendet die Anwendung nach klick auf X - 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 VL-Image"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie - .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 49, 557, 131); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - textFieldName = new JTextField(); - // 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)); - rowSorterMyImages.setRowFilter(RowFilter.regexFilter( - textFieldName.getText(), 0)); - - } - } - }); - - textFieldName.setBounds(270, 30, 250, 20); - panel_1.add(textFieldName); - textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel( - "Erweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - // Öffnet das Fenster Extended GUI - ExtendedSearch_GUI es = new ExtendedSearch_GUI(); - es.setVisible(true); - } - }); - lblErweiterteSuche.setForeground(Color.BLUE); - - lblErweiterteSuche.setBounds(431, 106, 89, 14); - panel_1.add(lblErweiterteSuche); - - comboBox = new JComboBox(); - try { - // Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server - List list = client.getAllOS(); - // Leeres Item hinzufügen - comboBox.addItem(""); - for (int i = 0; i < list.size(); i++) { - // Hinzufügen der verfügbaren Betriebssysteme - comboBox.addItem(list.get(i)); - } - } catch (TException e2) { - // TODO Auto-generated catch block - e2.printStackTrace(); - } - // Registriert Auswahländerungen der Box - comboBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - // Prüft das die Auswahl nicht leer ist - if (comboBox.getSelectedItem().toString() != "") { - // Filtert nach dem ausgewählten Betriebssystem - rowSorterAll.setRowFilter(RowFilter.regexFilter(comboBox - .getSelectedItem().toString(), 2)); - rowSorterMyImages.setRowFilter(RowFilter.regexFilter( - comboBox.getSelectedItem().toString(), 2)); - } - } - - }); - 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) { - // Öffnet das Hauütmenü - SearchImage_GUI.this.setVisible(false); - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); - contentPanel.add(lblNewLabel_1); - - tabbedPane = new JTabbedPane(JTabbedPane.TOP); - tabbedPane.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - System.out.println(tabbedPane.getSelectedIndex()); - if (tabbedPane.getSelectedIndex() == 0) { - - } else if (tabbedPane.getSelectedIndex() == 1) { - String username = "Spitzer Tobias"; - rowSorterMyImages.setRowFilter(RowFilter.regexFilter( - username, 4)); - // rowSorterMyImages.toggleSortOrder(0); - } - - } - }); - - tabbedPane.setBounds(10, 197, 557, 300); - contentPanel.add(tabbedPane); - - JScrollPane scrollPaneMyImage = new JScrollPane(); - tablemyImages = new JTable(); - tablemyImages.setModel(modelMyImages); - 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(); - initTableModel(modelMyImages); - tablemyImages.setRowSorter(rowSorterMyImages); - - 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(); - initTableModel(modelAll); - tableAllImages.setRowSorter(rowSorterAll); - - 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); - 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 - FTPDownloader_GUI down = new FTPDownloader_GUI(); - down.setVisible(true); - SearchImage_GUI.this.setVisible(false); - } - }); - 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 cancelButton = new JButton("Zur\u00FCck"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - // Öffnet das Hauptmenü - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("OK"); - buttonPane.add(cancelButton); - getRootPane().setDefaultButton(cancelButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - con.closeThriftConnection(); - EditImageAllgemein_GUI ea = new EditImageAllgemein_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - continueButton.setActionCommand("Cancel"); - buttonPane.add(continueButton); - } - } - - 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 images; - try { - // Hole eine Liste der Images - - images = client.getImageList(); - Iterator i = images.iterator(); - - int x = 0; - - while (i.hasNext()) { - // erzeuge Objekte für die Tabelle - Object[] obj = { images.get(x).getImageName(), - images.get(x).getLicenseRestriction(), - images.get(x).getOsName(), - images.get(x).getLectureName(), - images.get(x).getUserData(), - images.get(x).getUpdateTime() }; - // 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; - } - -} diff --git a/Dozentenmodul/src/GUI/SearchMethod_GUI.java b/Dozentenmodul/src/GUI/SearchMethod_GUI.java deleted file mode 100644 index 24a12959..00000000 --- a/Dozentenmodul/src/GUI/SearchMethod_GUI.java +++ /dev/null @@ -1,243 +0,0 @@ -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.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.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -@SuppressWarnings("serial") -public class SearchMethod_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnNachEinemVlimage; - JRadioButton rdbtnNachEinerVeranstaltung; - private final ButtonGroup buttonGroup = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - SearchMethod_GUI dialog = new SearchMethod_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public SearchMethod_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("bwLehrpool Suite *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 603) / 2; - int left=(screenSize.width - 722) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 722); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Wählen Sie bitte die Suchmethode Ihrer Suche", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 36, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - rdbtnNachEinemVlimage = new JRadioButton("Nach einem VL-Image oder Vorlagen suchen"); - buttonGroup.add(rdbtnNachEinemVlimage); - rdbtnNachEinemVlimage.setBounds(6, 38, 545, 23); - panel_1.add(rdbtnNachEinemVlimage); - - JTextArea txtrHierKlickenWenn = new JTextArea(); - txtrHierKlickenWenn.setBackground(SystemColor.menu); - txtrHierKlickenWenn.setLineWrap(true); - txtrHierKlickenWenn.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrHierKlickenWenn.setText("Hier klicken, wenn Sie nach einem konkreten Image suchen, von dem Sie exakte Daten kennen. Hierzu geh\u00F6ren z.B. das Betriebssystem oder die installierte Software.\r\nEs werden zudem alle Vorlagen aufgelistet."); - txtrHierKlickenWenn.setBounds(25, 68, 518, 80); - panel_1.add(txtrHierKlickenWenn); - - JTextArea txtrHierKlickenWenn_1 = new JTextArea(); - txtrHierKlickenWenn_1.setText("Hier klicken, wenn Sie nur wissen f\u00FCr welche Veranstaltung das gesuchte Image verwendet wird. Hierzu geh\u00F6ren z.B. der Name des Dozenten oder der Name der Veranstaltung."); - txtrHierKlickenWenn_1.setLineWrap(true); - txtrHierKlickenWenn_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrHierKlickenWenn_1.setBackground(SystemColor.menu); - txtrHierKlickenWenn_1.setBounds(25, 210, 518, 80); - panel_1.add(txtrHierKlickenWenn_1); - - rdbtnNachEinerVeranstaltung = new JRadioButton("Nach einer Veranstaltung suchen"); - buttonGroup.add(rdbtnNachEinerVeranstaltung); - rdbtnNachEinerVeranstaltung.setBounds(6, 180, 545, 23); - panel_1.add(rdbtnNachEinerVeranstaltung); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - SearchMethod_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Suchmethode"); - lblNewLabel_1.setBounds(146, 11, 82, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if(rdbtnNachEinemVlimage.isSelected()==true) - { - SearchImage_GUI ea=new SearchImage_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/VmWareLink_GUI.java b/Dozentenmodul/src/GUI/VmWareLink_GUI.java deleted file mode 100644 index 43df06a6..00000000 --- a/Dozentenmodul/src/GUI/VmWareLink_GUI.java +++ /dev/null @@ -1,215 +0,0 @@ -package gui; - -import java.awt.Desktop; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.JCheckBox; -import javax.swing.event.ChangeListener; -import javax.swing.event.ChangeEvent; - -import org.ini4j.InvalidFileFormatException; -import org.ini4j.Wini; - - -@SuppressWarnings("serial") -public class VmWareLink_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JCheckBox chckbxNewCheckBox; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - VmWareLink_GUI dialog = new VmWareLink_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public VmWareLink_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("Dozentenmodul *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.setBounds(0, 0, 577, 80); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Hinweis VMWare Player"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 42); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 104, 567, 502); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JTextPane txtpnUmIhreVmdk = new JTextPane(); - txtpnUmIhreVmdk.setBackground(SystemColor.menu); - txtpnUmIhreVmdk.setEditable(false); - txtpnUmIhreVmdk.setText("F\u00FCr die Arbeit mit der bwLehrpool Suite wird zwingend ein VMWare Player ben\u00F6tigt. Diesen k\u00F6nnen Sie sich unter folgendem Link kostenfrei downloaden."); - txtpnUmIhreVmdk.setBounds(10, 16, 499, 66); - contentPanel.add(txtpnUmIhreVmdk); - - JLabel lblNewLabel_1 = new JLabel("Windows: "); - lblNewLabel_1.addMouseListener(new MouseAdapter() { - @Override - public void mouseReleased(MouseEvent arg0) { - URI url; - try { - url = new URI("https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"); - Desktop.getDesktop().browse(url); - } catch (URISyntaxException | IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - }); - - lblNewLabel_1.setBounds(10, 93, 499, 14); - contentPanel.add(lblNewLabel_1); - - chckbxNewCheckBox = new JCheckBox("Diese Benachrichtigung nicht mehr anzeigen."); - chckbxNewCheckBox.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - if(chckbxNewCheckBox.isSelected()==true) - { - try { - Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - ini.put("main", "vmware",true); - ini.store(); - } catch (InvalidFileFormatException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - } - }); - chckbxNewCheckBox.setBounds(6, 472, 555, 23); - contentPanel.add(chckbxNewCheckBox); - - JLabel lbllinuxvmwarePlayer = new JLabel("Linux: "); - lbllinuxvmwarePlayer.setBounds(10, 178, 499, 14); - contentPanel.add(lbllinuxvmwarePlayer); - - JLabel lblvmwarePlayerDownload = new JLabel("vmWare Player Download"); - lblvmwarePlayerDownload.setBounds(10, 118, 499, 14); - contentPanel.add(lblvmwarePlayerDownload); - - JLabel lblvmwarePlayerDownload_1 = new JLabel("vmWare Player Download"); - lblvmwarePlayerDownload_1.setBounds(10, 203, 499, 14); - contentPanel.add(lblvmwarePlayerDownload_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 630, 587, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - MainMenue_GUI ea=new MainMenue_GUI(); - ea.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 617, 587, 2); - getContentPane().add(separator); - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 91, 587, 2); - getContentPane().add(separator); - } - { - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - { - JMenu mnHilfe = new JMenu("Hilfe"); - menuBar.add(mnHilfe); - { - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnHilfe.add(mntmFaq); - } - { - JMenuItem mntmHilfe = new JMenuItem("Hilfe"); - mnHilfe.add(mntmHilfe); - } - } - } - - - - } -} diff --git a/Dozentenmodul/src/ftp/DownloadTask.java b/Dozentenmodul/src/ftp/DownloadTask.java index 8a643325..83ad2c15 100644 --- a/Dozentenmodul/src/ftp/DownloadTask.java +++ b/Dozentenmodul/src/ftp/DownloadTask.java @@ -1,6 +1,6 @@ package ftp; -import gui.FTPDownloader_GUI; +import gui.image.FTPDownloader_GUI; import java.io.File; import java.io.FileOutputStream; diff --git a/Dozentenmodul/src/gui/BillOfRights_GUI.java b/Dozentenmodul/src/gui/BillOfRights_GUI.java deleted file mode 100644 index a18ce291..00000000 --- a/Dozentenmodul/src/gui/BillOfRights_GUI.java +++ /dev/null @@ -1,192 +0,0 @@ -package gui; - -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.WindowAdapter; -import java.awt.event.WindowEvent; -import java.io.File; -import java.io.IOException; - -import javax.swing.JButton; -import javax.swing.JCheckBox; -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.JScrollPane; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.ini4j.InvalidFileFormatException; -import org.ini4j.Wini; - - - -@SuppressWarnings("serial") -public class BillOfRights_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JButton fwdButton; - JCheckBox chckbxAkzeptieren; - - /** - * Create the dialog. - */ - public BillOfRights_GUI() { - setResizable(false); - - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet das Programm beim Klick auf das X - System.exit(0); - } - }); - try { - //Setzt das Look & Feel auf das 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*"); - - //Zentiert das Fenster in der Bildschirmmitte - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 567, 60); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Hinweis"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Bitte lesen und best\u00E4tigen Sie folgende rechtliche Hinweise"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 22); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 95, 567, 485); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JTextArea txtrLoremIpsumDolor = new JTextArea(); - txtrLoremIpsumDolor.setWrapStyleWord(true); - txtrLoremIpsumDolor.setLineWrap(true); - txtrLoremIpsumDolor.setEditable(false); - JScrollPane scr=new JScrollPane(txtrLoremIpsumDolor); - scr.setBounds(0, 0, 567, 477); - txtrLoremIpsumDolor.setBounds(0, 0, 567, 477); - txtrLoremIpsumDolor.setText("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. \r\n\r\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. \r\n\r\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis. \r\n\r\nAt vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat. \r\n\r\nConsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus. \r\n\r\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. \r\n\r\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. \r\n\r\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo"); - - contentPanel.add(scr); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 630, 587, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - fwdButton = new JButton("Weiter"); - fwdButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - ini.put("main", "BillOfRights",true); - ini.store(); - } catch (InvalidFileFormatException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - VmWareLink_GUI ac=new VmWareLink_GUI(); - ac.setVisible(true); - dispose(); - } - }); - fwdButton.setEnabled(false); - - buttonPane.add(fwdButton); - } - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 617, 587, 2); - getContentPane().add(separator); - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 82, 587, 2); - getContentPane().add(separator); - } - - chckbxAkzeptieren = new JCheckBox("Ja, ich akzeptiere die Vereinbarung. Benachrichtigung nicht mehr anzeigen."); - chckbxAkzeptieren.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - //Beim Akzeptieren der Bestätigung wird der Weiter-Button verfügbar gemacht - if(chckbxAkzeptieren.isSelected()==true) - { - - fwdButton.setEnabled(true); - - } - else - { - - } - } - }); - chckbxAkzeptieren.setBackground(SystemColor.menu); - chckbxAkzeptieren.setBounds(10, 587, 567, 23); - getContentPane().add(chckbxAkzeptieren); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - mnNewMenu_1.setHorizontalAlignment(SwingConstants.CENTER); - 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/DeleteImage_GUI.java b/Dozentenmodul/src/gui/DeleteImage_GUI.java deleted file mode 100644 index 93859e33..00000000 --- a/Dozentenmodul/src/gui/DeleteImage_GUI.java +++ /dev/null @@ -1,439 +0,0 @@ -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.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 org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; - -@SuppressWarnings("serial") -public class DeleteImage_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - JComboBox comboBox; - JTable tableAllImages; - JTable tablemyImages; - private JTextField textFieldName; - JTabbedPane tabbedPane; - String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort"}; - ThriftConnection con=new ThriftConnection(); - Client client=con.getThriftConnection(); - final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 ); - final DefaultTableModel modelMyImages = new DefaultTableModel( titles, 0 ); - final TableRowSorter rowSorterAll = new TableRowSorter( modelAll ); - final TableRowSorter rowSorterMyImages = new TableRowSorter( modelMyImages ); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - DeleteImage_GUI dialog = new DeleteImage_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public DeleteImage_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung nach klick auf X - 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 VL-Image"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 49, 557, 131); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - textFieldName = new JTextField(); - //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)); - rowSorterMyImages.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); - - } - }}); - - - textFieldName.setBounds(270, 30, 250, 20); - panel_1.add(textFieldName); - textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel("Erweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Öffnet das Fenster Extended GUI - ExtendedSearch_GUI es=new ExtendedSearch_GUI(); - es.setVisible(true); - } - }); - lblErweiterteSuche.setForeground(Color.BLUE); - - lblErweiterteSuche.setBounds(431, 106, 89, 14); - panel_1.add(lblErweiterteSuche); - - comboBox = new JComboBox(); - try { - //Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server - List list=client.getAllOS(); - //Leeres Item hinzufügen - comboBox.addItem(""); - for(int i=0;i"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); - contentPanel.add(lblNewLabel_1); - - tabbedPane = new JTabbedPane(JTabbedPane.TOP); - tabbedPane.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - System.out.println(tabbedPane.getSelectedIndex()); - if(tabbedPane.getSelectedIndex()==0){ - - - - } - else if(tabbedPane.getSelectedIndex()==1){ - String username="Spitzer Tobias"; - rowSorterMyImages.setRowFilter(RowFilter.regexFilter(username, 4)); - //rowSorterMyImages.toggleSortOrder(0); - } - - } - }); - - tabbedPane.setBounds(10, 197, 557, 300); - contentPanel.add(tabbedPane); - - JScrollPane scrollPaneMyImage = new JScrollPane(); - tablemyImages=new JTable(); - tablemyImages.setModel(modelMyImages); - 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(); - initTableModel(modelMyImages); - tablemyImages.setRowSorter(rowSorterMyImages); - initTableModel(modelAll); - - 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(); - - 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(); - tableAllImages.setRowSorter(rowSorterAll); - - scrollPaneAllImages.setViewportView(tableAllImages); - tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); - - scrollPaneCoopImages.setViewportView(tableCoopImages); - tabbedPane.addTab("Kooperative Images", 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 btnDelete = new JButton("L\u00F6schen"); - btnDelete.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - //Öffnet den Downloader - FTPDownloader_GUI down=new FTPDownloader_GUI(); - down.setVisible(true); - DeleteImage_GUI.this.setVisible(false); - } - }); - btnDelete.setBounds(449, 508, 118, 23); - contentPanel.add(btnDelete); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton mainButton = new JButton("Hauptmen\u00FC"); - mainButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - EditImageAllgemein_GUI ea=new EditImageAllgemein_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - mainButton.setActionCommand("Cancel"); - buttonPane.add(mainButton); - } - } - - 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 images; - try { - //Hole eine Liste der Images - - images = client.getImageList(); - Iterator i=images.iterator(); - - int x=0; - - while(i.hasNext()) - { - //erzeuge Objekte für die Tabelle - Object [] obj={images.get(x).getImageName(),images.get(x).getLicenseRestriction(),images.get(x).getOsName(),images.get(x).getLectureName(),images.get(x).getUserData(),images.get(x).getUpdateTime()}; - //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; - } - - } - - diff --git a/Dozentenmodul/src/gui/EditImageAllgemein_GUI.java b/Dozentenmodul/src/gui/EditImageAllgemein_GUI.java deleted file mode 100644 index 1d30e9d0..00000000 --- a/Dozentenmodul/src/gui/EditImageAllgemein_GUI.java +++ /dev/null @@ -1,350 +0,0 @@ -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.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.Map; - -import javax.swing.JButton; -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.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 javax.swing.border.TitledBorder; - -import org.apache.thrift.TException; - -import models.Image; -import models.person; -import server.Server.Client; -import thrift.ThriftConnection; -//import org.eclipse.wb.swing.FocusTraversalOnArray; -import java.awt.Component; - -@SuppressWarnings("serial") -public class EditImageAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField imagename; - ThriftConnection con=new ThriftConnection(); - Client client=con.getThriftConnection(); - private JPanel panel_2; - private JLabel lblNewLabel; - private JTextPane txtpnBitteWhlenSie; - private JPanel buttonPane; - private JButton backButton; - private JButton okButton; - - /** - * Create the dialog. - */ - public EditImageAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung bei einem Klick auf das X - con.closeThriftConnection(); - System.exit(0); - } - }); - //Verhindert das vergrößern des Fensters - setResizable(false); - - try { - 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 der Bildmitte - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - initData(); - getContentPane().setLayout(null); - { - panel_2 = new JPanel(); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(10, 11, 577, 57); - getContentPane().add(panel_2); - panel_2.setLayout(null); - { - lblNewLabel = new JLabel("Bearbeiten Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel_2.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - 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_2.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 245, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEditable(false); - Vorname.setEnabled(false); - Vorname.setBackground(Color.WHITE); - Vorname.setText(person.verantwortlicher.getVorname()); - Vorname.setColumns(10); - Vorname.setBounds(145, 245, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 276, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setBackground(Color.WHITE); - Nachname.setText(person.verantwortlicher.getName()); - Nachname.setColumns(10); - Nachname.setBounds(145, 276, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 307, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setBackground(Color.WHITE); - Hochschule.setText(person.verantwortlicher.getHochschule()); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 307, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 338, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setBackground(Color.WHITE); - EMail.setText(person.verantwortlicher.getEMail()); - EMail.setColumns(10); - EMail.setBounds(145, 338, 350, 20); - panel_1.add(EMail); - - JLabel lblImagename = new JLabel("Imagename: *"); - lblImagename.setBackground(SystemColor.menu); - lblImagename.setBounds(10, 31, 125, 20); - panel_1.add(lblImagename); - - imagename = new JTextField(); - imagename.setToolTipText("Bitte geben Sie hier den Namen des Image ein, z.B. \"Programmieren\"."); - imagename.setBackground(Color.WHITE); - imagename.setText(Image.image.getImagename()); - imagename.setColumns(10); - imagename.setBounds(145, 31, 350, 20); - panel_1.add(imagename); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setBounds(145, 62, 350, 110); - panel_1.add(txtrGebenSieBitte); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(10, 442, 136, 14); - contentPanel.add(lblPflichtfelder); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Durch den Klick auf Button Hauptmenpü wird dieses Fenster unsichtbar und das Hauptmenü sichtbar - con.closeThriftConnection(); - EditImageAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Bearbeiten"); - lblNewLabel_1.setBounds(146, 11, 71, 14); - contentPanel.add(lblNewLabel_1); - { - buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - backButton = new JButton("Zur\u00FCck"); - backButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar - //Image.image.setImagename(imagename.getText()); - con.closeThriftConnection(); - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - backButton.setActionCommand("CANCEL"); - buttonPane.add(backButton); - - } - { - okButton = new JButton("Weiter"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - System.out.println("text length="+imagename.getText().length()); - //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar - - //TODO - //Prüfung ob alle notwendigen Felder ausgefüllt sind --> funktioniert aktuell nicht - //der Button wechselt beim Klick auf die nächste Seite, selbst wenn kein handler implementiert ist... WTF??? - if(imagename.getText().length() <= 0){ - JOptionPane.showMessageDialog(null, - "Bitte geben Sie einen Labornamen ein.", - "Daten nicht vollständig", - JOptionPane.WARNING_MESSAGE); - } else { - Image.image.setNewName(imagename.getText()); - con.closeThriftConnection(); - EditImageTechnisch_GUI ea=new EditImageTechnisch_GUI(); - ea.setVisible(true); - dispose(); - }//end else - } - }); - - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - } - - 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); - //setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{getContentPane(), panel_2, lblNewLabel, txtpnBitteWhlenSie, contentPanel, panel_1, label, Vorname, label_7, Nachname, label_8, Hochschule, label_9, EMail, lblImagename, imagename, txtrGebenSieBitte, panel, lblPflichtfelder, lblHauptmen, label_1, lblVlimage, label_2, lblNewLabel_1, buttonPane, backButton, okButton, separator, separator_1, menuBar, mnNewMenu_1, mntmFaq, mntmOtrs})); - - } - - public void initData(){ - try { - - Map map=client.getImageData(Image.image.getImageId(),Image.image.getVersion()); - if(map.get("internet").equals("0")){ - Image.image.setInternet(false); - } - else - { - Image.image.setInternet(true); - } - if(map.get("license").equals("0")){ - Image.image.setLicensed(false); - } - else{ - Image.image.setLicensed(true); - } - Image.image.setImagename(map.get("name")); - Image.image.setRam(Integer.parseInt(map.get("ram"))); - Image.image.setCpu(Integer.parseInt(map.get("cpu"))); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - -} diff --git a/Dozentenmodul/src/gui/EditImageTechnisch_GUI.java b/Dozentenmodul/src/gui/EditImageTechnisch_GUI.java deleted file mode 100644 index 3c6109ae..00000000 --- a/Dozentenmodul/src/gui/EditImageTechnisch_GUI.java +++ /dev/null @@ -1,366 +0,0 @@ -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.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.HashMap; -import java.util.Map; - -import javax.swing.ButtonGroup; -import javax.swing.JButton; -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.JSpinner; -import javax.swing.JTextArea; -import javax.swing.JTextPane; -import javax.swing.SpinnerNumberModel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -import org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; - -import models.Image; - -@SuppressWarnings("serial") -public class EditImageTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JSpinner spinnerCPU; - JSpinner spinnerRam; - JRadioButton rdbtnlicenseJa; - JRadioButton rdbtnlicenseNein; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - private final ButtonGroup buttonGrouplicense = new ButtonGroup(); - private final ButtonGroup buttonGroupInternet = new ButtonGroup(); - - - /** - * Create the dialog. - */ - public EditImageTechnisch_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung bei Klick auf das X - - System.exit(0); - } - - }); - //Verhindert das Vergrößern des Fensters - setResizable(false); - - try { - //setzt das Look & Feel - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Titel des Fensters - setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 95); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - rdbtnlicenseJa = new JRadioButton("Ja"); - rdbtnlicenseJa.setSelected(true); - buttonGrouplicense.add(rdbtnlicenseJa); - rdbtnlicenseJa.setBounds(266, 29, 109, 23); - panel_1.add(rdbtnlicenseJa); - - rdbtnlicenseNein = new JRadioButton("Nein"); - buttonGrouplicense.add(rdbtnlicenseNein); - rdbtnlicenseNein.setBounds(377, 29, 109, 23); - panel_1.add(rdbtnlicenseNein); - if(Image.image.isLicensed()==true){ - rdbtnlicenseJa.setSelected(true); - } - else - { - rdbtnlicenseNein.setSelected(true); - } - - - - JLabel lblInternetIstInnerhalb = new JLabel("Internet ist innerhalb des Image gesperrt:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - rdbtnInternetJa = new JRadioButton("Ja"); - buttonGroupInternet.add(rdbtnInternetJa); - rdbtnInternetJa.setBounds(266, 57, 109, 23); - panel_1.add(rdbtnInternetJa); - - rdbtnInternetNein = new JRadioButton("Nein"); - rdbtnInternetNein.setSelected(true); - buttonGroupInternet.add(rdbtnInternetNein); - rdbtnInternetNein.setBounds(377, 57, 109, 23); - panel_1.add(rdbtnInternetNein); - if(Image.image.isInternet()==true){ - rdbtnInternetJa.setSelected(true); - } - else - { - rdbtnInternetNein.setSelected(true); - } - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Macht dieses Fenster unsichtbar und das vorhergehende Fenster sichtbar - EditImageTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - - JPanel panel_2 = new JPanel(); - panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(10, 172, 557, 338); - contentPanel.add(panel_2); - - JTextArea txtrHinweisSolltenSie = new JTextArea(); - txtrHinweisSolltenSie.setBackground(SystemColor.menu); - txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); - txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); - txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); - panel_2.add(txtrHinweisSolltenSie); - - JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); - lblNewLabel_3.setBounds(10, 91, 280, 20); - panel_2.add(lblNewLabel_3); - - JLabel lblMindestens = new JLabel("mindestens"); - lblMindestens.setBounds(315, 91, 60, 20); - panel_2.add(lblMindestens); - - spinnerRam = new JSpinner(); - spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); - spinnerRam.setBounds(385, 88, 29, 20); - spinnerRam.setValue(Image.image.getRam()); - panel_2.add(spinnerRam); - - JLabel lblGbyte = new JLabel("GByte"); - lblGbyte.setBounds(424, 91, 46, 20); - panel_2.add(lblGbyte); - - JTextArea txtrBeispielWindows = new JTextArea(); - txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); - txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows.setBackground(SystemColor.menu); - txtrBeispielWindows.setBounds(20, 111, 280, 55); - panel_2.add(txtrBeispielWindows); - - JTextArea txtrBeispielWindows_1 = new JTextArea(); - txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); - txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows_1.setBackground(SystemColor.menu); - txtrBeispielWindows_1.setBounds(20, 226, 280, 55); - panel_2.add(txtrBeispielWindows_1); - - JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); - lblWieVieleCpus.setBounds(10, 201, 280, 20); - panel_2.add(lblWieVieleCpus); - - JLabel label_3 = new JLabel("mindestens"); - label_3.setBounds(315, 201, 60, 20); - panel_2.add(label_3); - - spinnerCPU = new JSpinner(); - spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); - spinnerCPU.setBounds(385, 198, 29, 20); - spinnerCPU.setValue(Image.image.getCpu()); - panel_2.add(spinnerCPU); - - JLabel lblKerne = new JLabel("Kerne"); - lblKerne.setBounds(424, 201, 46, 20); - panel_2.add(lblKerne); - { - 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) { - //Setzt die Imagewerte in das Model - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - //Öffnet das vorherige Fenster - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_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) { - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - //Öffnet das nächste Fenster - FTPEditUploader_GUI ea=new FTPEditUploader_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_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/EditLinkImage_GUI.java b/Dozentenmodul/src/gui/EditLinkImage_GUI.java deleted file mode 100644 index 8de896c3..00000000 --- a/Dozentenmodul/src/gui/EditLinkImage_GUI.java +++ /dev/null @@ -1,436 +0,0 @@ -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 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;iErweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - ExtendedSearch_GUI es=new ExtendedSearch_GUI(); - es.setVisible(true); - } - }); - lblErweiterteSuche.setForeground(Color.BLUE); - - lblErweiterteSuche.setBounds(431, 106, 89, 14); - panel_1.add(lblErweiterteSuche); - - comboBox = new JComboBox(); - try { - List list=client.getAllOS(); - comboBox.addItem(""); - for(int i=0;i"); - 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 images; - try { - images = client.getImageList(); - Iterator i=images.iterator(); - List ListObj = new ArrayList(); - 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 deleted file mode 100644 index c6be7580..00000000 --- a/Dozentenmodul/src/gui/EditVeranstaltungAllgemein_GUI.java +++ /dev/null @@ -1,411 +0,0 @@ -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.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -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.JSeparator; -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 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; -import javax.swing.ButtonGroup; - - -@SuppressWarnings("serial") -public class EditVeranstaltungAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField textFieldLaborname; - JTextArea description; - JRadioButton radioButtonyes; - JDateChooser dateChooserend; - JDateChooser dateChooserstart; - JRadioButton radioButtonno; - private final ButtonGroup buttonGroup = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EditVeranstaltungAllgemein_GUI dialog = new EditVeranstaltungAllgemein_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EditVeranstaltungAllgemein_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("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 331, 557, 162); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 33, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEditable(false); - Vorname.setEnabled(false); - Vorname.setText(person.verantwortlicher.getVorname()); - Vorname.setBackground(Color.WHITE); - Vorname.setColumns(10); - Vorname.setBounds(145, 33, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 64, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setText(person.verantwortlicher.getName()); - Nachname.setBackground(Color.WHITE); - Nachname.setColumns(10); - Nachname.setBounds(145, 64, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 95, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setText(person.verantwortlicher.getHochschule()); - Hochschule.setBackground(Color.WHITE); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 95, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 126, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setText(person.verantwortlicher.getEMail()); - EMail.setBackground(Color.WHITE); - EMail.setColumns(10); - EMail.setBounds(145, 126, 350, 20); - panel_1.add(EMail); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EditVeranstaltungAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - - JPanel 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.setText(Lecture.lecture.getName()); - 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("Beschreibung: *"); - 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.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.setDate(Lecture.lecture.getEnddate()); - 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.setDate(Lecture.lecture.getStartdate()); - 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"); - 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); - - radioButtonno = new JRadioButton("Nein"); - buttonGroup.add(radioButtonno); - 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); - 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(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); - 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(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()); - - - LinkImage_GUI ev=new LinkImage_GUI(); - ev.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); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(32, 602, 136, 14); - getContentPane().add(lblPflichtfelder); - - 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); - - } - - -} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/EingabeImageAllgemein_GUI.java b/Dozentenmodul/src/gui/EingabeImageAllgemein_GUI.java deleted file mode 100644 index da4f6997..00000000 --- a/Dozentenmodul/src/gui/EingabeImageAllgemein_GUI.java +++ /dev/null @@ -1,302 +0,0 @@ -package gui; - - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import javax.swing.JTextField; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; - -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import javax.swing.JTextArea; - -import models.Image; -import models.person; - -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; - -@SuppressWarnings("serial") -public class EingabeImageAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField imagename; - - /** - * Create the dialog. - */ - public EingabeImageAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet das Fenster auf X - System.exit(0); - } - @Override - public void windowOpened(WindowEvent arg0) { - imagename.requestFocusInWindow(); - } - }); - //Verhindert das Vergrößern des Fensters - setResizable(false); - - try { - //setzt das Look & Feel - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Titel - setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 245, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEnabled(false); - Vorname.setEditable(false); - Vorname.setBackground(Color.WHITE); - Vorname.setText(person.verantwortlicher.getVorname()); - Vorname.setColumns(10); - Vorname.setBounds(145, 245, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 276, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setBackground(Color.WHITE); - Nachname.setText(person.verantwortlicher.getName()); - Nachname.setColumns(10); - Nachname.setBounds(145, 276, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 307, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setBackground(Color.WHITE); - Hochschule.setText(person.verantwortlicher.getHochschule()); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 307, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 338, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setBackground(Color.WHITE); - EMail.setText(person.verantwortlicher.getEMail()); - EMail.setColumns(10); - EMail.setBounds(145, 338, 350, 20); - panel_1.add(EMail); - - JLabel lblImagename = new JLabel("Imagename: *"); - lblImagename.setBackground(SystemColor.menu); - lblImagename.setBounds(10, 31, 125, 20); - panel_1.add(lblImagename); - - - imagename = new JTextField(); - imagename.setBackground(Color.WHITE); - imagename.setText((String) null); - imagename.setColumns(10); - imagename.setBounds(145, 31, 350, 20); - imagename.setText(Image.image.getImagename()); //null am Anfang, aber speichert die Eingabe, wenn man zurück kommt zur Seite - panel_1.add(imagename); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setEditable(false); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setBounds(145, 62, 350, 110); - panel_1.add(txtrGebenSieBitte); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(10, 442, 136, 14); - contentPanel.add(lblPflichtfelder); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Öffnet das Hauptmenü - EingabeImageAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton backButton = new JButton("Zur\u00FCck"); - backButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - Image.image.setImagename(imagename.getText()); - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - backButton.setActionCommand("Cancel"); - buttonPane.add(backButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - //Prüft die Eingabe - if(imagename.getText().isEmpty()==false && Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) - { - //Schreibt die Daten in das Model - Image.image.setImagename(imagename.getText()); - EingabeImageTechnisch_GUI ea=new EingabeImageTechnisch_GUI(); - ea.setVisible(true); - dispose(); - } - else{ - JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); - } - } - }); - continueButton.setActionCommand("OK"); - buttonPane.add(continueButton); - getRootPane().setDefaultButton(continueButton); - } - } - - 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); - - }//end main -} diff --git a/Dozentenmodul/src/gui/EingabeImageTechnisch_GUI.java b/Dozentenmodul/src/gui/EingabeImageTechnisch_GUI.java deleted file mode 100644 index 7c26ca23..00000000 --- a/Dozentenmodul/src/gui/EingabeImageTechnisch_GUI.java +++ /dev/null @@ -1,364 +0,0 @@ -package gui; - - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import javax.swing.JTextArea; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import javax.swing.JRadioButton; -import javax.swing.ButtonGroup; -import javax.swing.JSpinner; -import javax.swing.SpinnerNumberModel; - -import models.Image; - -@SuppressWarnings("serial") -public class EingabeImageTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JSpinner spinnerCPU; - JSpinner spinnerRam; - JRadioButton rdbtnlicenseJa; - JRadioButton rdbtnlicenseNein; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - private final ButtonGroup buttonGrouplicense = new ButtonGroup(); - private final ButtonGroup buttonGroupInternet = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EingabeImageTechnisch_GUI dialog = new EingabeImageTechnisch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EingabeImageTechnisch_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("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 124); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - rdbtnlicenseNein = new JRadioButton("Nein"); - buttonGrouplicense.add(rdbtnlicenseNein); - rdbtnlicenseNein.setBounds(377, 29, 46, 23); - panel_1.add(rdbtnlicenseNein); - - rdbtnInternetNein = new JRadioButton("Nein"); - rdbtnInternetNein.setSelected(true); - buttonGroupInternet.add(rdbtnInternetNein); - rdbtnInternetNein.setBounds(377, 57, 46, 23); - panel_1.add(rdbtnInternetNein); - - JLabel lblInternetIstInnerhalb = new JLabel("Internet ist f\u00FCr dieses Image gesperrt:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - JButton btnInternetSettings = new JButton("Einstellungen..."); - btnInternetSettings.setEnabled(false); - btnInternetSettings.setBounds(439, 57, 108, 23); - panel_1.add(btnInternetSettings); - - rdbtnInternetJa = new JRadioButton("Ja"); - - buttonGroupInternet.add(rdbtnInternetJa); - rdbtnInternetJa.setBounds(266, 57, 41, 23); - panel_1.add(rdbtnInternetJa); - - rdbtnlicenseJa = new JRadioButton("Ja"); - rdbtnlicenseJa.setSelected(true); - buttonGrouplicense.add(rdbtnlicenseJa); - rdbtnlicenseJa.setBounds(266, 29, 41, 23); - panel_1.add(rdbtnlicenseJa); - - JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblLizenzserverEintragen = new JLabel("Lizenzserver eintragen:"); - lblLizenzserverEintragen.setBounds(10, 85, 250, 20); - panel_1.add(lblLizenzserverEintragen); - - JButton btnLicenseServer = new JButton("Server-Adresse..."); - btnLicenseServer.setEnabled(false); - btnLicenseServer.setBounds(266, 84, 157, 23); - panel_1.add(btnLicenseServer); - - JPanel panel_2 = new JPanel(); - panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(11, 196, 557, 338); - contentPanel.add(panel_2); - - JLabel lblGbyte = new JLabel("GByte"); - lblGbyte.setBounds(424, 91, 46, 20); - panel_2.add(lblGbyte); - - spinnerCPU = new JSpinner(); - spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); - spinnerCPU.setBounds(385, 188, 29, 20); - panel_2.add(spinnerCPU); - - JTextArea txtrBeispielWindows = new JTextArea(); - txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); - txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows.setBackground(SystemColor.menu); - txtrBeispielWindows.setBounds(10, 122, 280, 55); - panel_2.add(txtrBeispielWindows); - - - - JLabel lblKerne = new JLabel("Kerne"); - lblKerne.setBounds(424, 191, 46, 20); - panel_2.add(lblKerne); - - JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); - lblWieVieleCpus.setBounds(10, 191, 280, 20); - panel_2.add(lblWieVieleCpus); - - spinnerRam = new JSpinner(); - spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); - spinnerRam.setBounds(385, 88, 29, 20); - panel_2.add(spinnerRam); - - JLabel label_3 = new JLabel("mindestens"); - label_3.setBounds(315, 191, 60, 20); - panel_2.add(label_3); - - JLabel lblMindestens = new JLabel("mindestens"); - lblMindestens.setBounds(315, 91, 60, 20); - panel_2.add(lblMindestens); - - JTextArea txtrBeispielWindows_1 = new JTextArea(); - txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); - txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows_1.setBackground(SystemColor.menu); - txtrBeispielWindows_1.setBounds(10, 222, 280, 55); - panel_2.add(txtrBeispielWindows_1); - - JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); - lblNewLabel_3.setBounds(10, 91, 280, 20); - panel_2.add(lblNewLabel_3); - - JTextArea txtrHinweisSolltenSie = new JTextArea(); - txtrHinweisSolltenSie.setBackground(SystemColor.menu); - txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); - txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); - txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); - panel_2.add(txtrHinweisSolltenSie); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeImageTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton cancelButton = new JButton("Zur\u00FCck"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("OK"); - buttonPane.add(cancelButton); - //getRootPane().setDefaultButton(cancelButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - FTPUploader_GUI ea=new FTPUploader_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - continueButton.setActionCommand("Cancel"); - buttonPane.add(continueButton); - getRootPane().setDefaultButton(continueButton); - } - } - - 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 deleted file mode 100644 index 5b2d4751..00000000 --- a/Dozentenmodul/src/gui/EingabeVeranstaltungAllgemein_GUI.java +++ /dev/null @@ -1,504 +0,0 @@ -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.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -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.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JSeparator; -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 models.Image; -import models.Lecture; -import models.person; -import javax.swing.JTextArea; -import java.awt.ScrollPane; -import java.util.Calendar; -import java.util.Date; - -import com.toedter.calendar.JDateChooser; -import javax.swing.JRadioButton; - -@SuppressWarnings("serial") -public class EingabeVeranstaltungAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField txtFldVeranstaltungsname; - JTextArea description; - JRadioButton radioButtonyes; - JRadioButton radioButtonno; - JDateChooser dateChooserend; - JDateChooser dateChooserstart; - Date startDate = new Date(); - Date endDate; - int maxLifeTime = 180; // Anzahl Tage, die eine Veranstaltung in der Zukunft - // aktiv sein darf - boolean isDateOrderCorrect, isDateMaxLifeTimeCorrect, - isAllInformationReady = false; - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EingabeVeranstaltungAllgemein_GUI dialog = new EingabeVeranstaltungAllgemein_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EingabeVeranstaltungAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - - @Override - public void windowOpened(WindowEvent arg0) { - txtFldVeranstaltungsname.requestFocusInWindow(); - } - }); - 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("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie - .setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 331, 557, 162); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 33, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEditable(false); - Vorname.setEnabled(false); - Vorname.setText(person.verantwortlicher.getVorname()); - Vorname.setBackground(Color.WHITE); - Vorname.setColumns(10); - Vorname.setBounds(145, 33, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 64, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setText(person.verantwortlicher.getName()); - Nachname.setBackground(Color.WHITE); - Nachname.setColumns(10); - Nachname.setBounds(145, 64, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 95, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setText(person.verantwortlicher.getHochschule()); - Hochschule.setBackground(Color.WHITE); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 95, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 126, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setText(person.verantwortlicher.getEMail()); - EMail.setBackground(Color.WHITE); - EMail.setColumns(10); - EMail.setBounds(145, 126, 350, 20); - panel_1.add(EMail); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeVeranstaltungAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - - JPanel 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); - - txtFldVeranstaltungsname = new JTextField(); - txtFldVeranstaltungsname.setColumns(10); - txtFldVeranstaltungsname.setBounds(200, 22, 347, 20); - txtFldVeranstaltungsname.setText(Lecture.lecture.getName()); - panel_2.add(txtFldVeranstaltungsname); - - JTextArea textArea = new JTextArea(); - textArea.setEditable(false); - 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 lblDesc = new JLabel("Beschreibung: *"); - lblDesc.setBounds(10, 111, 180, 14); - panel_2.add(lblDesc); - - ScrollPane scrollPane = new ScrollPane(); - scrollPane.setBounds(200, 104, 347, 78); - panel_2.add(scrollPane); - description = new JTextArea(); - description.setFont(new Font("Tahoma", Font.PLAIN, 11)); - description.setLineWrap(true); - description.setText(Lecture.lecture.getDesc()); - scrollPane.add(description); - description.setBounds(0, 0, 4, 22); - scrollPane.add(description); - - dateChooserend = new JDateChooser(); - endDate = addDays(new Date(), maxLifeTime); // Datum darf weiter als 6 - // Monate in der Zukunft - // liegen - dateChooserend.setDate(endDate); - if (Lecture.lecture.getEnddate() == null) { - // is not defined yet - dateChooserend.setDate(endDate); - } else { - // already defined from last visit on this page - dateChooserend.setDate(Lecture.lecture.getEnddate()); - } - dateChooserend.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserend.setBounds(404, 188, 143, 20); - panel_2.add(dateChooserend); - - JLabel lblBis = new JLabel("bis:"); - lblBis.setBounds(378, 188, 21, 20); - panel_2.add(lblBis); - - dateChooserstart = new JDateChooser(); - if (Lecture.lecture.getStartdate() == null) { - // is not defined yet - dateChooserstart.setDate(startDate); - } else { - // already defined from last visit on this page - dateChooserstart.setDate(Lecture.lecture.getStartdate()); - } - dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserstart.setBounds(226, 188, 143, 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, 194, 127, 14); - panel_2.add(label_10); - - JLabel label_11 = new JLabel("Aktiv:"); - label_11.setBounds(10, 229, 127, 14); - panel_2.add(label_11); - - radioButtonyes = new JRadioButton("Ja"); - radioButtonyes.setSelected(true); - radioButtonyes.setBounds(200, 225, 73, 23); - panel_2.add(radioButtonyes); - - radioButtonno = new JRadioButton("Nein"); - radioButtonyes.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - radioButtonyes.setSelected(true); - radioButtonno.setSelected(false); - } - }); - radioButtonno.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - radioButtonno.setSelected(true); - radioButtonyes.setSelected(false); - } - }); - radioButtonno.setBounds(296, 225, 73, 23); - panel_2.add(radioButtonno); - - JLabel lblimVmchooserSichtbar = new JLabel("(im VMChooser sichtbar)"); - lblimVmchooserSichtbar.setBounds(10, 245, 127, 14); - panel_2.add(lblimVmchooserSichtbar); - - JLabel lblmaxMonate = new JLabel("(max. 6 Monate)"); - lblmaxMonate.setBounds(10, 208, 127, 14); - panel_2.add(lblmaxMonate); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton backButton = new JButton("Zur\u00FCck"); - backButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if (radioButtonyes.isSelected() == true) { - Lecture.lecture.setActive(true); - } else { - Lecture.lecture.setActive(false); - } - - Lecture.lecture.setName(txtFldVeranstaltungsname - .getText()); - Lecture.lecture.setDesc(description.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setStartdate(dateChooserstart.getDate()); - Image.image.setImagename(txtFldVeranstaltungsname - .getText()); - - MainMenue_GUI sr = new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - backButton.setActionCommand("Cancel"); - buttonPane.add(backButton); - getRootPane().setDefaultButton(backButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - // liegt das End-Datum vor dem Start-Datum? - if (dateChooserend.getDate().before( - dateChooserstart.getDate())) { - // datum ist falsch rum - isDateOrderCorrect = false; - JOptionPane - .showMessageDialog( - null, - "Das End-Datum liegt vor dem Start-Datum. Bitte ändern.", - "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); - } else { - // bereit - isDateOrderCorrect = true; - } - // liegt das eingegebene Datum nach dem erlaubten - // End-Datum? - if (dateChooserend.getDate().after(endDate)) { - // Datum zu weit weg - isDateMaxLifeTimeCorrect = false; - JOptionPane.showMessageDialog(null, - "Das End-Datum liegt zu weit in der Zukunft. Erlaubt ist maximal:\n" - + endDate, "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); - } else { - // bereit - isDateMaxLifeTimeCorrect = true; - } - // Prüfen ob alles eingegeben wurde - if (txtFldVeranstaltungsname.getText().isEmpty() == true - || description.getText().isEmpty() == true) { - // mind 1 Textfeld ist leer - isAllInformationReady = false; - JOptionPane - .showMessageDialog( - null, - "Bitte geben Sie einen Veranstaltungsnamen und eine Beschreibung ein.", - "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); - } else { - // Textfelder bereit - isAllInformationReady = true; - } - - // welcher Radiobutton ist geklickt? - if (radioButtonyes.isSelected() == true) { - Lecture.lecture.setActive(true); - } else { - Lecture.lecture.setActive(false); - } - // Prüfe ob alle Eingaben korrekt sind, dann mache - // weiter - if (isAllInformationReady == true - && isDateMaxLifeTimeCorrect == true - && isDateOrderCorrect == true) { - // everything is ok, proceed - Lecture.lecture.setName(txtFldVeranstaltungsname - .getText()); - Lecture.lecture.setDesc(description.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setStartdate(dateChooserstart - .getDate()); - Image.image.setImagename(txtFldVeranstaltungsname - .getText()); - - LinkImage_GUI ev = new LinkImage_GUI(); - ev.setVisible(true); - dispose(); - } - - } - }); - continueButton.setActionCommand("OK"); - buttonPane.add(continueButton); - } - } - - 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); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(32, 602, 136, 14); - getContentPane().add(lblPflichtfelder); - - 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 Date addDays(Date date, int days) { - Calendar cal = Calendar.getInstance(); - cal.setTime(date); - cal.add(Calendar.DATE, days); // minus number would decrement the days - return cal.getTime(); - } -} diff --git a/Dozentenmodul/src/gui/ExtendedSearch_GUI.java b/Dozentenmodul/src/gui/ExtendedSearch_GUI.java deleted file mode 100644 index 7f042cae..00000000 --- a/Dozentenmodul/src/gui/ExtendedSearch_GUI.java +++ /dev/null @@ -1,234 +0,0 @@ -package gui; - - -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.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.JButton; -import javax.swing.JCheckBox; -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.JSeparator; -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; - -@SuppressWarnings("serial") -public class ExtendedSearch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField textField; - private JTextField textField_1; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - ExtendedSearch_GUI dialog = new ExtendedSearch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public ExtendedSearch_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); - - 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("Weitere Suchoptionen"); - 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("beschreibung"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Image-Typ", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 11, 557, 95); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Image-Typ"); - lblNewLabel_2.setBounds(10, 39, 176, 20); - panel_1.add(lblNewLabel_2); - - JCheckBox chckbxBestehendesImage = new JCheckBox("Bestehendes Image"); - chckbxBestehendesImage.setSelected(true); - chckbxBestehendesImage.setBounds(192, 38, 138, 23); - panel_1.add(chckbxBestehendesImage); - - JCheckBox chckbxRohling = new JCheckBox("Rohling"); - chckbxRohling.setSelected(true); - chckbxRohling.setBounds(332, 38, 97, 23); - panel_1.add(chckbxRohling); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBorder(new TitledBorder(null, "Image-Inhalt", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 117, 557, 95); - contentPanel.add(panel); - - JLabel lblEnthalteneSoftware = new JLabel("Enthaltene Software"); - lblEnthalteneSoftware.setBounds(10, 39, 176, 20); - panel.add(lblEnthalteneSoftware); - - textField = new JTextField(); - textField.setBounds(196, 39, 351, 20); - panel.add(textField); - textField.setColumns(10); - - JLabel lblNewLabel_1 = new JLabel("Bitte mit ; getrennt angeben"); - lblNewLabel_1.setBounds(196, 70, 351, 14); - panel.add(lblNewLabel_1); - - JPanel panel_2 = new JPanel(); - panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Informationen zum Ersteller", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(10, 223, 557, 123); - contentPanel.add(panel_2); - - JLabel lblNachnameDesErstellers = new JLabel("Nachname des Erstellers"); - lblNachnameDesErstellers.setBounds(10, 39, 176, 20); - panel_2.add(lblNachnameDesErstellers); - - textField_1 = new JTextField(); - textField_1.setColumns(10); - textField_1.setBounds(196, 39, 351, 20); - panel_2.add(textField_1); - - JLabel lblHochschuleuniversitt = new JLabel("Hochschule/Universit\u00E4t"); - lblHochschuleuniversitt.setBounds(10, 70, 176, 20); - panel_2.add(lblHochschuleuniversitt); - - JComboBox comboBox = new JComboBox(); - comboBox.setBounds(196, 70, 351, 20); - panel_2.add(comboBox); - { - 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) { - - - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("\u00DCbernehmen"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - - FTPUploader_GUI ea=new FTPUploader_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/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/FTPDownloader_GUI.java deleted file mode 100644 index cb53fc3d..00000000 --- a/Dozentenmodul/src/gui/FTPDownloader_GUI.java +++ /dev/null @@ -1,370 +0,0 @@ -package gui; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import java.io.File; - -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import ftp.DownloadTask; - -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.awt.SystemColor; -import java.awt.Font; -import javax.swing.JTextPane; -import javax.swing.JSeparator; - -import models.Image; - -import org.apache.thrift.TException; - -import server.Server.Client; -import server.User; -import thrift.ThriftConnection; - -@SuppressWarnings("serial") -public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; - JLabel downspeed; - User user; - JProgressBar progressBar; - String host = "141.79.128.121"; - int port = 21; - String username = "openslx"; - String password = "openslx-ng"; - String downloadFile = ""; - static String arg = ""; - DownloadTask task; - JLabel bytesreadlbl; - JLabel lblNewLabel_3; - JLabel labelVerbleibend; - long filesize; - double speed; - long bytesread; - JLabel labelZeit; - boolean taskrun = false; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); - JButton buttonback = new JButton("Zur\u00FCck"); - - /** - * Launch the application. - */ - /* - * public static void main(String[] args) { EventQueue.invokeLater(new - * Runnable() { public void run() { try { FTPDownloader frame = new - * FTPDownloader(); frame.setVisible(true); } catch (Exception e) { - * e.printStackTrace(); } } }); } - */ - - /** - * Create the frame. - */ - public FTPDownloader_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - if (taskrun == true) { - try { - client.DeleteFtpUser(user.userName); - thrift.closeThriftConnection(); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - dispose(); - } - }); - setResizable(false); - // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - - setBackground(Color.WHITE); - setTitle("Dozentenmodul *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top = (screenSize.height - 722) / 2; - int left = (screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton( - "Speicherort ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc = new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - - fc.showOpenDialog(getParent()); - File dir = fc.getSelectedFile(); - lblNewLabel.setText(dir.getAbsolutePath()); - } - }); - - btnSpeicherortAuswhlen.setBounds(57, 124, 141, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblNewLabel = new JLabel("C:\\"); - lblNewLabel.setBounds(208, 124, 238, 23); - contentPanel.add(lblNewLabel); - - JButton btnDownloadStarten = new JButton("Download starten"); - btnDownloadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonDownloadActionPerformed(arg0); - } - }); - - btnDownloadStarten.setBounds(57, 168, 141, 23); - contentPanel.add(btnDownloadStarten); - - progressBar = new JProgressBar(0, 100); - progressBar.setStringPainted(true); - - progressBar.setBounds(57, 202, 497, 30); - contentPanel.add(progressBar); - - JLabel lblDownloadgeschwindigkeit = new JLabel( - "Downloadgeschwindigkeit:"); - lblDownloadgeschwindigkeit.setBounds(57, 243, 141, 14); - contentPanel.add(lblDownloadgeschwindigkeit); - - downspeed = new JLabel("0"); - downspeed.setBounds(308, 243, 95, 14); - contentPanel.add(downspeed); - - JLabel lblNewLabel_1 = new JLabel("Fertig:"); - lblNewLabel_1.setBounds(57, 293, 46, 14); - contentPanel.add(lblNewLabel_1); - - bytesreadlbl = new JLabel(""); - bytesreadlbl.setBounds(66, 244, 108, 14); - contentPanel.add(bytesreadlbl); - - JLabel lblNewLabel_2 = new JLabel("von:"); - lblNewLabel_2.setBounds(226, 293, 46, 14); - contentPanel.add(lblNewLabel_2); - - lblNewLabel_3 = new JLabel(""); - lblNewLabel_3.setBounds(235, 244, 108, 14); - contentPanel.add(lblNewLabel_3); - - JLabel lblMbVerbleibend = new JLabel("Verbleibend:"); - lblMbVerbleibend.setBounds(57, 318, 71, 14); - contentPanel.add(lblMbVerbleibend); - - labelVerbleibend = new JLabel(""); - labelVerbleibend.setBounds(91, 269, 108, 14); - contentPanel.add(labelVerbleibend); - - JLabel lblGeschtzteVerbleibendeZeit = new JLabel( - "Gesch\u00E4tzte Verbleibende Zeit:"); - lblGeschtzteVerbleibendeZeit.setBounds(57, 268, 150, 14); - contentPanel.add(lblGeschtzteVerbleibendeZeit); - - labelZeit = new JLabel(""); - labelZeit.setBounds(261, 219, 117, 14); - contentPanel.add(labelZeit); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel label = new JLabel("Eingabe Ihrer Daten"); - label.setFont(new Font("Tahoma", Font.BOLD, 18)); - label.setBounds(10, 11, 509, 22); - panel.add(label); - - JTextPane textPane = new JTextPane(); - textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - textPane.setEditable(false); - textPane.setBackground(SystemColor.menu); - textPane.setBounds(10, 36, 509, 32); - panel.add(textPane); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel label_1 = new JLabel("Hauptmen\u00FC"); - label_1.setForeground(Color.BLUE); - label_1.setBounds(20, 88, 61, 20); - contentPanel.add(label_1); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(80, 91, 14, 14); - contentPanel.add(label_2); - - JLabel label_3 = new JLabel("VL-Image"); - label_3.setForeground(Color.BLUE); - label_3.setBounds(91, 88, 46, 20); - contentPanel.add(label_3); - - JLabel label_4 = new JLabel(">"); - label_4.setBounds(139, 91, 14, 14); - contentPanel.add(label_4); - - JLabel label_5 = new JLabel("Neu/Bearbeiten"); - label_5.setBounds(149, 91, 108, 14); - contentPanel.add(label_5); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(-10, 648, 597, 2); - contentPanel.add(separator_1); - - JLabel label_6 = new JLabel("1."); - label_6.setBounds(24, 128, 23, 14); - contentPanel.add(label_6); - - JLabel label_7 = new JLabel("2."); - label_7.setBounds(24, 172, 23, 14); - contentPanel.add(label_7); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - buttonback.setEnabled(false); - buttonback.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if (taskrun == true) { - task.cancel(true); - try { - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - thrift.closeThriftConnection(); - SearchEditImage_GUI se=new SearchEditImage_GUI(); - se.setVisible(true); - dispose(); - } - }); - buttonback.setActionCommand("Cancel"); - buttonPane.add(buttonback); - } - } - setVisible(true); - - } - - private void buttonDownloadActionPerformed(ActionEvent event) { - - progressBar.setValue(0); - - try { - user = client.getFtpUser(); - - downloadFile=client.getPathOfImage(Image.image.getImageId(),Image.image.getVersion()); - - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - task = new DownloadTask(host, port, user.userName, user.password, - downloadFile, lblNewLabel.getText(), this); - task.addPropertyChangeListener(this); - task.execute(); - taskrun = true; - - } - - public void propertyChange(PropertyChangeEvent arg0) { - - int progress = 0; - if ("progress" == arg0.getPropertyName()) { - progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - if (progress == 100) { - buttonback.setEnabled(true); - } - } - - if ("speed" == arg0.getPropertyName()) { - speed = (double) arg0.getNewValue(); - // if(speed<=1){ - - downspeed.setText(String.valueOf(speed).substring(0, - String.valueOf(speed).lastIndexOf(".") + 3) - + " MB/s"); - - // }else - // { - // double MBSpeed=speed/1024; - // downspeed.setText(String.valueOf((MBSpeed)).substring(0, - // String.valueOf(MBSpeed).indexOf("."))); - // } - - } - if ("bytesread" == arg0.getPropertyName()) { - bytesread = (long) arg0.getNewValue(); - bytesreadlbl.setText((bytesread / 1024 / 1024) + " MB"); - labelVerbleibend - .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) - + " MB"); - - labelZeit - .setText(String - .valueOf( - ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) - .substring( - 0, - String.valueOf( - (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) - .lastIndexOf(".")) - + " Minuten"); - - } - if ("filesize" == arg0.getPropertyName()) { - filesize = (long) arg0.getNewValue(); - lblNewLabel_3.setText((filesize / 1024 / 1024) + " MB"); - - } - - } -} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/FTPEditUploader_GUI.java deleted file mode 100644 index e7252898..00000000 --- a/Dozentenmodul/src/gui/FTPEditUploader_GUI.java +++ /dev/null @@ -1,427 +0,0 @@ -package gui; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.EventQueue; -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.WindowAdapter; -import java.awt.event.WindowEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.io.File; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.JSeparator; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import models.Image; -import models.person; -//import models.person; - -import org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; -import ftp.UploadTask; - - -@SuppressWarnings("serial") -public class FTPEditUploader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; - JProgressBar progressBar; - String host="141.79.128.121"; - int port=21; - server.User user; - String filename=""; - File uploadFile; - static String arg=""; - UploadTask task; - JLabel UpSpeed; - JLabel labelfertig; - JLabel labelfilesize; - JLabel labelZeit; - JLabel labelverbleibend; - long filesize; - double speed; - long bytesread; - boolean taskrun=false; - ThriftConnection thrift=new ThriftConnection(); - Client client=thrift.getThriftConnection(); - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - FTPEditUploader_GUI frame = new FTPEditUploader_GUI(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public FTPEditUploader_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - if(taskrun==true) - { - try { - - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - } - }); - setResizable(false); - //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - //filename=name; - setBackground(Color.WHITE); - setTitle("Dozentenmodul *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, 250); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton("VMDK ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc=new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.FILES_ONLY); - - fc.showOpenDialog(getParent()); - File dir=fc.getSelectedFile(); - uploadFile=dir; - filename=uploadFile.getName(); - lblNewLabel.setText(dir.getAbsolutePath()); - } - }); - - btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblNewLabel = new JLabel(""); - lblNewLabel.setBounds(184, 124, 255, 23); - contentPanel.add(lblNewLabel); - - JButton btnDownloadStarten = new JButton("Upload starten"); - btnDownloadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonUploadActionPerformed(arg0); - - } - }); - - btnDownloadStarten.setBounds(10, 330, 141, 23); - contentPanel.add(btnDownloadStarten); - - progressBar = new JProgressBar(0,100); - progressBar.setStringPainted(true); - - - progressBar.setBounds(10, 158, 577, 30); - contentPanel.add(progressBar); - - JLabel label = new JLabel("Downloadgeschwindigkeit:"); - label.setBounds(10, 199, 141, 14); - contentPanel.add(label); - - JLabel label_1 = new JLabel("Fertig:"); - label_1.setBounds(10, 249, 46, 14); - contentPanel.add(label_1); - - labelfertig = new JLabel("0"); - labelfertig.setBounds(66, 249, 108, 14); - contentPanel.add(labelfertig); - - UpSpeed = new JLabel("0"); - UpSpeed.setBounds(329, 199, 95, 14); - contentPanel.add(UpSpeed); - - JLabel label_4 = new JLabel("von:"); - label_4.setBounds(184, 249, 46, 14); - contentPanel.add(label_4); - - labelfilesize = new JLabel("0"); - labelfilesize.setBounds(240, 249, 108, 14); - contentPanel.add(labelfilesize); - - JLabel label_6 = new JLabel("Verbleibend:"); - label_6.setBounds(10, 274, 71, 14); - contentPanel.add(label_6); - - JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - label_7.setBounds(10, 224, 150, 14); - contentPanel.add(label_7); - - labelZeit = new JLabel("0"); - labelZeit.setBounds(329, 224, 117, 14); - contentPanel.add(labelZeit); - - labelverbleibend = new JLabel("0"); - labelverbleibend.setBounds(91, 274, 108, 14); - contentPanel.add(labelverbleibend); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel label_2 = new JLabel("Eingabe Ihrer Daten"); - label_2.setFont(new Font("Tahoma", Font.BOLD, 18)); - label_2.setBounds(10, 11, 509, 22); - panel.add(label_2); - - JTextPane textPane = new JTextPane(); - textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - textPane.setEditable(false); - textPane.setBackground(SystemColor.menu); - textPane.setBounds(10, 36, 509, 32); - panel.add(textPane); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setForeground(Color.BLUE); - lblNewLabel_1.setBounds(20, 88, 61, 20); - contentPanel.add(lblNewLabel_1); - - JLabel label_3 = new JLabel(">"); - label_3.setBounds(80, 91, 14, 14); - contentPanel.add(label_3); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(91, 88, 46, 20); - contentPanel.add(lblVlimage); - - JLabel label_5 = new JLabel(">"); - label_5.setBounds(139, 91, 14, 14); - contentPanel.add(label_5); - - JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); - lblNeubearbeiten.setBounds(149, 91, 108, 14); - contentPanel.add(lblNeubearbeiten); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - contentPanel.add(separator_1); - - JButton btnCopyFileTo = new JButton("Copy File to Prod"); - btnCopyFileTo.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - client.startFileCopy(user.path+"/"+uploadFile.getName()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - }); - btnCopyFileTo.setBounds(10, 375, 264, 23); - contentPanel.add(btnCopyFileTo); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - JButton ButtonReady = new JButton("Abschlie\u00DFen"); - ButtonReady.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - updateData(); - dispose(); - MainMenue_GUI m=new MainMenue_GUI(); - m.setVisible(true); - - if(taskrun==true) - { - try { - client.DeleteFtpUser(user.userName); - - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - thrift.closeThriftConnection(); - } - }); - - JButton buttonCancel = new JButton("Schlie\u00DFen"); - buttonCancel.setActionCommand("Cancel"); - buttonPane.add(buttonCancel); - ButtonReady.setActionCommand("Cancel"); - buttonPane.add(ButtonReady); - } - } - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnHillfe = new JMenu("Hillfe"); - menuBar.add(mnHillfe); - setVisible(true); - - } - - private void buttonUploadActionPerformed(ActionEvent event) { - // File (or directory) with old name - // File file = new File(lblNewLabel.getText()); - - // File (or directory) with new name - //System.out.println(file.getAbsolutePath().substring(0,file.getAbsolutePath().lastIndexOf("\\"))+"\\"+vm.vl.getLaborname()+".vmdk"); - //File file2 = new File(file.getAbsoluteFile()+"\\"+vm.vl.getLaborname()+".vmdk"); - - - // Rename file (or directory) - //boolean success = file.renameTo(file2); - //if (!success) { - // File was not successfully renamed - //System.out.println("Not OK"); - //} - //else - //{ - //System.out.println("OK"); - //} - progressBar.setValue(0); - - try { - user=client.getFtpUser(); - System.out.println("name"+user.userName); - System.out.println("path"+user.path); - System.out.println("pass"+user.password); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); - Image.image.setNewName(formatter.format(new Date()) + "_" - + person.verantwortlicher.getHochschule() + "_" - + person.verantwortlicher.getUsername() + "_" - + Image.image.getImagename() + ".vmdk"); - task=new UploadTask(host,port,user.userName,user.password,user.path, uploadFile); - - task.addPropertyChangeListener(this); - task.execute(); - taskrun=true; - - //createXML(); - //TransferToSatellit(); - - - } - - public void propertyChange(PropertyChangeEvent arg0) { - if ("progress" == arg0.getPropertyName()) { - int progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - } - if("speed"==arg0.getPropertyName()){ - speed=(double)arg0.getNewValue(); - //if(speed<=1){ - - UpSpeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s"); - - // }else - //{ - //double MBSpeed=speed/1024; - //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf("."))); - //} - - } - if("bytesread"==arg0.getPropertyName()) - { - bytesread=(long)arg0.getNewValue(); - labelfertig.setText((bytesread/1024/1024)+" MB"); - labelverbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB"); - - - labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten"); - - - } - if("filesize"==arg0.getPropertyName()) - { - filesize=(long)arg0.getNewValue(); - labelfilesize.setText((filesize/1024/1024)+" MB"); - - } - - } - - public boolean updateData(){ - - try { - - - System.out.println("Start Update"); - client.updateImageData(Image.image.getImagename(),Image.image.getNewName(), Image.image.isLicensed(), Image.image.isInternet(), Image.image.getRam(), Image.image.getCpu(),Image.image.getImageId(),Image.image.getVersion()); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return false; - } - return true; - - - } -} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/FTPUploader_GUI.java b/Dozentenmodul/src/gui/FTPUploader_GUI.java deleted file mode 100644 index 3dd6a906..00000000 --- a/Dozentenmodul/src/gui/FTPUploader_GUI.java +++ /dev/null @@ -1,482 +0,0 @@ -package gui; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.EventQueue; -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.WindowAdapter; -import java.awt.event.WindowEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.io.File; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.JSeparator; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import models.Image; -import models.person; -import org.apache.thrift.TException; -import server.Server.Client; -import thrift.ThriftConnection; -//import util.XMLCreator; -import ftp.UploadTask; - -@SuppressWarnings("serial") -public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; - JProgressBar progressBar; - String host = "141.79.128.121"; - int port = 21; - server.User user; - String filename = ""; - File uploadFile; - static String arg = ""; - UploadTask task; - JLabel UpSpeed; - JLabel labelfertig; - JLabel labelfilesize; - JLabel labelZeit; - JLabel labelverbleibend; - long filesize; - double speed; - long bytesread; - boolean taskrun = false; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); - JButton finishButton = new JButton("Fertigstellen"); - JButton btnUploadStarten = new JButton("Upload auf Server starten"); - JButton btnZurck = new JButton("Zur\u00FCck"); - int progress = 0; // progress of upload - - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - FTPUploader_GUI frame = new FTPUploader_GUI(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public FTPUploader_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - if (taskrun == true) { - try { - - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - } - }); - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - // filename=name; - setBackground(Color.WHITE); - setTitle("Dozentenmodul *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, 250); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc = new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.FILES_ONLY); - - fc.showOpenDialog(getParent()); - File file = fc.getSelectedFile(); - // check if a file is selected and exists - if (file != null) { - System.out.println("File to upload exists"); - uploadFile = file; - filename = uploadFile.getName(); - lblNewLabel.setText(file.getAbsolutePath()); - } else { - System.out.println("No file selected"); - lblNewLabel.setText(""); - }// end if - } - }); - - btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblNewLabel = new JLabel(""); - lblNewLabel.addPropertyChangeListener(new PropertyChangeListener() { - public void propertyChange(PropertyChangeEvent arg0) { - if (lblNewLabel.getText().isEmpty()) { - // wenn leer, dann upload button nicht freigeben - btnUploadStarten.setEnabled(false); - } else { - // wenn leer, dann upload button nicht freigeben - btnUploadStarten.setEnabled(true); - } - } - }); - lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT); - lblNewLabel.setBounds(285, 124, 302, 23); - contentPanel.add(lblNewLabel); - - btnUploadStarten.setEnabled(false); - btnUploadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonUploadActionPerformed(arg0); - - } - }); - - btnUploadStarten.setBounds(102, 168, 173, 23); - contentPanel.add(btnUploadStarten); - - progressBar = new JProgressBar(0, 100); - progressBar.setStringPainted(true); - - progressBar.setBounds(102, 202, 485, 30); - contentPanel.add(progressBar); - - JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:"); - lblUploadgeschwindigkeit.setBounds(102, 243, 141, 14); - contentPanel.add(lblUploadgeschwindigkeit); - - JLabel label_1 = new JLabel("Fertig:"); - label_1.setBounds(102, 293, 46, 14); - contentPanel.add(label_1); - - labelfertig = new JLabel("0"); - labelfertig.setHorizontalAlignment(SwingConstants.LEFT); - labelfertig.setBounds(183, 293, 108, 14); - contentPanel.add(labelfertig); - - UpSpeed = new JLabel("0"); - UpSpeed.setHorizontalAlignment(SwingConstants.LEFT); - UpSpeed.setBounds(374, 243, 117, 14); - contentPanel.add(UpSpeed); - - JLabel label_4 = new JLabel("von:"); - label_4.setBounds(318, 293, 46, 14); - contentPanel.add(label_4); - - labelfilesize = new JLabel("0"); - labelfilesize.setHorizontalAlignment(SwingConstants.LEFT); - labelfilesize.setBounds(374, 293, 117, 14); - contentPanel.add(labelfilesize); - - JLabel label_6 = new JLabel("Verbleibend:"); - label_6.setBounds(102, 318, 71, 14); - contentPanel.add(label_6); - - JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - label_7.setBounds(102, 268, 150, 14); - contentPanel.add(label_7); - - labelZeit = new JLabel("0"); - labelZeit.setHorizontalAlignment(SwingConstants.LEFT); - labelZeit.setBounds(374, 268, 117, 14); - contentPanel.add(labelZeit); - - labelverbleibend = new JLabel("0"); - labelverbleibend.setHorizontalAlignment(SwingConstants.LEFT); - labelverbleibend.setBounds(183, 318, 108, 14); - contentPanel.add(labelverbleibend); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel lblUploadIhresImage = new JLabel("Upload Ihres Image"); - lblUploadIhresImage.setFont(new Font("Tahoma", Font.BOLD, 18)); - lblUploadIhresImage.setBounds(10, 11, 509, 22); - panel.add(lblUploadIhresImage); - - JTextPane txtpnFhreSieBitte = new JTextPane(); - txtpnFhreSieBitte - .setText("F\u00FChre Sie bitte die folgenden 3 Schritte aus um Ihr Image auf unseren Server zu laden."); - txtpnFhreSieBitte.setEditable(false); - txtpnFhreSieBitte.setBackground(SystemColor.menu); - txtpnFhreSieBitte.setBounds(10, 36, 509, 32); - panel.add(txtpnFhreSieBitte); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setForeground(Color.BLUE); - lblNewLabel_1.setBounds(20, 88, 61, 20); - contentPanel.add(lblNewLabel_1); - - JLabel label_3 = new JLabel(">"); - label_3.setBounds(80, 91, 14, 14); - contentPanel.add(label_3); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(91, 88, 46, 20); - contentPanel.add(lblVlimage); - - JLabel label_5 = new JLabel(">"); - label_5.setBounds(139, 91, 14, 14); - contentPanel.add(label_5); - - JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); - lblNeubearbeiten.setBounds(149, 91, 108, 14); - contentPanel.add(lblNeubearbeiten); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - contentPanel.add(separator_1); - - JButton btnCopyFileTo = new JButton("Copy File to Prod"); - btnCopyFileTo.setEnabled(false); - btnCopyFileTo.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - System.out.println("Copying file to " + user.path + "/" - + uploadFile.getName()); - client.startFileCopy(user.path + "/" + uploadFile.getName()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - }); - btnCopyFileTo.setBounds(102, 343, 173, 23); - contentPanel.add(btnCopyFileTo); - - JLabel lblShritt = new JLabel("Schritt 1:"); - lblShritt.setBounds(24, 128, 57, 14); - contentPanel.add(lblShritt); - - JLabel lblSchritt = new JLabel("Schritt 2:"); - lblSchritt.setBounds(24, 172, 57, 14); - contentPanel.add(lblSchritt); - - JLabel lblSchritt_1 = new JLabel("Schritt 3:"); - lblSchritt_1.setBounds(20, 391, 57, 14); - contentPanel.add(lblSchritt_1); - - JLabel lblKlickenSieAuf = new JLabel( - "Klicken Sie auf \"Fertigstellen\"."); - lblKlickenSieAuf.setBounds(98, 391, 241, 14); - contentPanel.add(lblKlickenSieAuf); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - finishButton.setEnabled(false); - finishButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - writeData(); - dispose(); - MainMenue_GUI m = new MainMenue_GUI(); - m.setVisible(true); - if (taskrun == true) { - try { - client.DeleteFtpUser(user.userName); - thrift.closeThriftConnection(); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - - } - }); - - btnZurck.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - dispose(); - EingabeImageTechnisch_GUI m = new EingabeImageTechnisch_GUI(); - m.setVisible(true); - } - }); - btnZurck.setActionCommand("Cancel"); - buttonPane.add(btnZurck); - finishButton.setActionCommand("Cancel"); - buttonPane.add(finishButton); - } - } - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnHillfe = new JMenu("Hillfe"); - menuBar.add(mnHillfe); - setVisible(true); - - } - - private void buttonUploadActionPerformed(ActionEvent event) { - - progressBar.setValue(0); - btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick - // und - - try { - user = client.getFtpUser(); - System.out.println("name" + user.userName); - System.out.println("path" + user.path); - System.out.println("pass" + user.password); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); - - System.out.println(formatter.format(new Date()) + "_" - + person.verantwortlicher.getHochschule() + "_" - + person.verantwortlicher.getUsername() + "_" - + Image.image.getImagename() + ".vmdk"); - Image.image.setNewName(formatter.format(new Date()) + "_" - + person.verantwortlicher.getHochschule() + "_" - + person.verantwortlicher.getUsername() + "_" - + Image.image.getImagename() + ".vmdk"); - task = new UploadTask(host, port, user.userName, user.password, - user.path, uploadFile); - - task.addPropertyChangeListener(this); - task.execute(); - taskrun = true; - - } - - public void propertyChange(PropertyChangeEvent arg0) { - progress = 0; - if ("progress" == arg0.getPropertyName()) { - progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - - // Button zum Fertigstellen freischalten, wenn 100% erreicht sind - if (progress == 100) { - finishButton.setEnabled(true); - - } - if (progress == 0 || progress == 100) { - // not uploading currently - btnZurck.setEnabled(true); - } else { - // currently uploading, don't let user interact - btnZurck.setEnabled(false); - } - - } - - if ("speed" == arg0.getPropertyName()) { - speed = (double) arg0.getNewValue(); - // if(speed<=1){ - - UpSpeed.setText(String.valueOf(speed).substring(0, - String.valueOf(speed).lastIndexOf(".") + 3) - + " MB/s"); - - } - if ("bytesread" == arg0.getPropertyName()) { - bytesread = (long) arg0.getNewValue(); - labelfertig.setText((bytesread / 1024 / 1024) + " MB"); - labelverbleibend - .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) - + " MB"); - - labelZeit - .setText(String - .valueOf( - ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) - .substring( - 0, - String.valueOf( - (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) - .lastIndexOf(".")) - + " Minuten"); - - } - if ("filesize" == arg0.getPropertyName()) { - filesize = (long) arg0.getNewValue(); - labelfilesize.setText((filesize / 1024 / 1024) + " MB"); - - } - - } - - public boolean writeData() { - - try { - - client.writeVLdata(Image.image.getImagename(), - person.verantwortlicher.getVorname(), - person.verantwortlicher.getName(), - person.verantwortlicher.getHochschule(), - person.verantwortlicher.getEMail(), - person.verantwortlicher.getTel(), - person.verantwortlicher.getFakultät(), - Image.image.isLicensed(), Image.image.isInternet(), - Image.image.getRam(), Image.image.getCpu(), - "/srv/openslx/nfs/temp/" + Image.image.getNewName()); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return false; - } - return true; - - } -} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/LinkImage_GUI.java b/Dozentenmodul/src/gui/LinkImage_GUI.java deleted file mode 100644 index b4052778..00000000 --- a/Dozentenmodul/src/gui/LinkImage_GUI.java +++ /dev/null @@ -1,471 +0,0 @@ -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.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.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 LinkImage_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - JComboBox comboBox; - JTable tableAllImages; - private JTextField textFieldName; - String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", - "Verantwortlicher", "Letztes Update", "Schlagwort" }; - ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - LinkImage_GUI dialog = new LinkImage_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public LinkImage_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - - @Override - public void windowOpened(WindowEvent arg0) { - textFieldName.requestFocusInWindow(); - } - }); - 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("Suche nach VL-Image"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie - .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 49, 557, 131); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - textFieldName = new JTextField(); - textFieldName.addKeyListener(new KeyAdapter() { - @Override - public void keyReleased(KeyEvent e) { - String stext = textFieldName.getText(); - modelAll.setRowCount(0); - initTableModel(modelAll); - - if (stext != "") - for (int i = 0; i < modelAll.getRowCount(); i++) { - - if (modelAll.getValueAt(i, 0).toString() - .startsWith(stext)) { - - } else { - modelAll.removeRow(i); - } - } - - } - - }); - - textFieldName.setBounds(270, 30, 250, 20); - panel_1.add(textFieldName); - textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel( - "Erweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - ExtendedSearch_GUI es = new ExtendedSearch_GUI(); - es.setVisible(true); - } - }); - lblErweiterteSuche.setForeground(Color.BLUE); - - lblErweiterteSuche.setBounds(431, 106, 89, 14); - panel_1.add(lblErweiterteSuche); - - comboBox = new JComboBox(); - try { - List 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) { - - LinkImage_GUI.this.setVisible(false); - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); - contentPanel.add(lblNewLabel_1); - - JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); - - tabbedPane.setBounds(10, 197, 557, 300); - contentPanel.add(tabbedPane); - - JScrollPane scrollPaneMyImage = new JScrollPane(); - JTable tablemyImages = new JTable(); - tablemyImages.setModel(model); - tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - JScrollPane scrollPaneAllImages = new JScrollPane(); - tableAllImages = new JTable(); - tableAllImages.setModel(modelAll); - tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - scrollPaneAllImages.setViewportView(tableAllImages); - tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); - - scrollPaneMyImage.setViewportView(tablemyImages); - tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); - - JScrollPane scrollPaneCoopImages = new JScrollPane(); - JTable tableCoopImages = new JTable(); - tableCoopImages.setModel(model); - tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - scrollPaneCoopImages.setViewportView(tableCoopImages); - tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, - null); - 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); - - 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 cancelButton = new JButton("Zur\u00FCck"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - con.closeThriftConnection(); - EingabeVeranstaltungAllgemein_GUI eVAG = new EingabeVeranstaltungAllgemein_GUI(); - eVAG.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("CANCEL"); - buttonPane.add(cancelButton); - getRootPane().setDefaultButton(cancelButton); - } - { - JButton doLinkButton = new JButton( - "Veranstaltung erzeugen und abschlie\u00DFen"); - doLinkButton.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("Veranstaltung anlegen um: " - + 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()); - JOptionPane - .showMessageDialog( - null, - "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmenü zurück.", - "Veranstaltung angelegt", - JOptionPane.PLAIN_MESSAGE); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - JOptionPane - .showMessageDialog( - null, - "Beim Anlegen Ihrer Veranstaltung ist ein Fehler aufgetreten.", - "Error", JOptionPane.ERROR_MESSAGE); - } - con.closeThriftConnection(); - dispose(); - - } - }); - doLinkButton.setActionCommand("OK"); - buttonPane.add(doLinkButton); - } - } - - 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 images; - try { - images = client.getImageList(); - Iterator i = images.iterator(); - List ListObj = new ArrayList(); - 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/Login_GUI.java b/Dozentenmodul/src/gui/Login_GUI.java deleted file mode 100644 index 172895d6..00000000 --- a/Dozentenmodul/src/gui/Login_GUI.java +++ /dev/null @@ -1,260 +0,0 @@ -package gui; - -import java.awt.Dimension; -import java.awt.EventQueue; -import java.awt.Image; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.io.File; -import java.io.IOException; - -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JPasswordField; -import javax.swing.JTextField; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.SessionData; -import models.person; -import org.apache.thrift.TException; -//import org.apache.thrift.protocol.TBinaryProtocol; -//import org.apache.thrift.protocol.TProtocol; -import org.ini4j.Wini; -//import thrift.AuthenticationException; -//import thrift.ImageServer; -//import thrift.InvalidTokenException; -//import thrift.SessionData; -import thrift.MasterThriftConnection; -import thrift.ImageServer.Client; -import thrift.UserInfo; - -import config.config_file; - -@SuppressWarnings("serial") -public class Login_GUI extends JFrame { - - private JPanel contentPane; - private JTextField username; - private JPasswordField pass; - - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - // Prüfe und Erzeuge gegebenfalls Config - config_file cf = new config_file(); - boolean conf = cf.createConfig(); - if (conf == true) { - // Aufruf und Anzeige des Login Fensters - Login_GUI frame = new Login_GUI(); - frame.setVisible(true); - } else { - JOptionPane.showMessageDialog(null, - "Fehler beim erzeugen der Konfigurationsfile", - "Message", JOptionPane.ERROR_MESSAGE); - } - - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public Login_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - - // Fenster darf nicht vergrößert werden - setResizable(false); - try { - // Setzt das Look and Feel auf System - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - // Titel des Fensters setzen - setTitle("Dozentenmodul *Prototyp*"); - // Aktion die beim Schließen durchgeführt werden soll - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - // Größe des Fensters definieren - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top = (screenSize.height - 400) / 2; - int left = (screenSize.width - 603) / 2; - setBounds(left, top, 603, 400); - // Erzeugen eines Panels - contentPane = new JPanel(); - // Hintergrund Farbe des Panels setzen - contentPane.setBackground(SystemColor.menu); - // Rahmen des Fensters setzen - contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); - setContentPane(contentPane); - // Layout setzen - contentPane.setLayout(null); - // Label für das Logo erzeugen - JLabel imgLabel = new JLabel(); - // Größe und Position des Logos festelegen - imgLabel.setBounds(150, 11, 350, 142); - // Pfadangabe des Logos - - ImageIcon icon = new ImageIcon(getClass().getResource( - "/Logo_bwLehrpool.png"), "Logo"); - // Skalierung des Logos - Image scaled = icon.getImage().getScaledInstance(270, 64, 0); - imgLabel.setIcon(new ImageIcon(scaled)); - // Hinzufügen des Logos in das Fenster - contentPane.add(imgLabel); - - // Erzeugen und Hinzufügen des Labels - JLabel LabelUser = new JLabel("bwIDM-Benutzername:"); - LabelUser.setBounds(111, 164, 134, 20); - contentPane.add(LabelUser); - - // Erzeugen und Hinzufügen des Textfeldes - username = new JTextField(); - username.setToolTipText("Bitte geben Sie Ihren bwIDM-Benutzernamen ein."); - username.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - performLogin(); - } - }); - username.setBounds(304, 164, 196, 20); - contentPane.add(username); - username.setColumns(10); - - // Erzeugen und Hinzufügen des Labels - JLabel LabelPass = new JLabel("bwIDM-Passwort:"); - LabelPass.setBounds(111, 195, 134, 20); - contentPane.add(LabelPass); - - // Erzeugen, Hinzufügen und definierung der Aktion des Buttons - JButton BtnLogin = new JButton("Login"); - BtnLogin.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - performLogin(); - }// end actionPerformed - }); - - BtnLogin.setBounds(304, 244, 196, 23); - contentPane.add(BtnLogin); - - // Erzeugen und Hinzufügen des Passwortfeldes - pass = new JPasswordField(); - pass.setToolTipText("Bitte geben Sie Ihr bwIDM-Passwort ein."); - pass.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - performLogin(); - } - }); - pass.setBounds(304, 195, 196, 20); - contentPane.add(pass); - }// end LoginGUI() - - //Versuche den Benutzer einzuloggen - public void performLogin() { - // Aufruf der Ldap Klasse, welche die Ldap überprüfung vornimmt - // Ldap check=new Ldap(); - boolean login = true; - // boolean login=check.LdapAuth(username.getText(), new - // String(pass.getPassword())); - MasterThriftConnection thrift = new MasterThriftConnection(); - Client client = thrift.getMasterThriftConnection(); - String token = null; - final thrift.SessionData result; - try { - String passText = new String(pass.getPassword()); - System.out.println(username.getText() + " " + passText); - result = client.authenticate(username.getText(), passText); - - } catch (thrift.AuthenticationException e) { - System.out.println("Authentifizierung fehlgeschlagen: " + e.message); - JOptionPane.showMessageDialog(null, - "Benutzeranmeldung fehlgeschlagen: Bitte Benutzername und Passwort überprüfen.", - "Anmeldung fehlgeschlagen", - JOptionPane.ERROR_MESSAGE); - - return; - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return; - } - System.out - .println("Konnte mich beim MasterServer authentifizieren. Meine Session-ID ist " - + result.sessionId - + ", mein Token für den Satelliten " - + result.authToken); - token = result.authToken; - if (login == true) { - - try { - Wini ini = new Wini(new File("C:\\Users\\" - + System.getProperty("user.name") - + "\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - // Prüfe ob Bills Of Rights schon akzeptiert wurden, wenn nicht - // zeige diese an - if (ini.get("main", "BillOfRights", boolean.class) == false) { - // Erstellen einer Instanz der Aktionsauswahl - BillOfRights_GUI re = new BillOfRights_GUI(); - re.setVisible(true); - // Schließen des Fensters nach erfolgreichen Login - setVisible(false); - } else { - // Prüfe ob die Links zu vmware angezeigt werden sollen - if (ini.get("main", "vmware", boolean.class) == false) { - VmWareLink_GUI vm = new VmWareLink_GUI(); - vm.setVisible(true); - setVisible(false); - } else { - UserInfo user = client.getUserFromToken(token); - - String hochschule = user.eMail.substring(user.eMail - .indexOf("@") + 1, user.eMail.indexOf(".", - user.eMail.indexOf("@"))); - // System.out.println("hochschule="+hochschule); - - person.verantwortlicher.setUsername(username.getText()); - person.verantwortlicher.setName(user.lastName); - person.verantwortlicher.setVorname(user.firstName); - person.verantwortlicher.setEMail(user.eMail); - person.verantwortlicher.setHochschule(hochschule); - // Öffne das Hauprmenü - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - setVisible(false); - } - } - } catch (IOException | TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } else { - JOptionPane.showMessageDialog(null, "Login denied!", "Message", - JOptionPane.INFORMATION_MESSAGE); - } - }// end performLogin - -}// end class diff --git a/Dozentenmodul/src/gui/MainMenue_GUI.java b/Dozentenmodul/src/gui/MainMenue_GUI.java deleted file mode 100644 index 3c75c74f..00000000 --- a/Dozentenmodul/src/gui/MainMenue_GUI.java +++ /dev/null @@ -1,443 +0,0 @@ -package gui; - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JRadioButton; -import javax.swing.SwingConstants; -import javax.swing.ButtonGroup; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import javax.swing.ToolTipManager; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.ScrollPane; -import javax.swing.JTextArea; -import javax.swing.ImageIcon; - -@SuppressWarnings("serial") -public class MainMenue_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - String descNewImage, descEditImage, descDeleteImage, descSearchImage, - descNewLecture, descEditLecture, descDeleteLecture, - descSearchLecture = ""; - JRadioButton rdbtnImageNew; - JRadioButton rdbtnImageEdit; - JRadioButton rdbtnImageSearchDownload; - JRadioButton rdbtnVeranstaltungNew; - JRadioButton rdbtnImageDelete; - JRadioButton rdbtnVeranstaltungEdit; - private final ButtonGroup buttonGroup = new ButtonGroup(); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - MainMenue_GUI dialog = new MainMenue_GUI(); - dialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - }// end main - - /** - * Create the dialog. - */ - public MainMenue_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - 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, 545, 366); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 567, 69); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Hauptmen\u00FC"); - 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("Bitte w\u00E4hlen Sie ihre gew\u00FCnschte Aktion."); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 22); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 104, 567, 502); - contentPanel.setBackground(SystemColor.menu); - - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panelImage = new JPanel(); - panelImage.setBackground(SystemColor.menu); - panelImage.setBorder(new TitledBorder(null, "VL-Image", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelImage.setBounds(10, 146, 270, 170); - contentPanel.add(panelImage); - panelImage.setLayout(null); - - rdbtnImageNew = new JRadioButton("Neu"); - rdbtnImageNew - .setToolTipText("Hier k\u00F6nnen Sie eine standard Laborvorlage downloaden"); - rdbtnImageNew.setBounds(6, 22, 159, 23); - panelImage.add(rdbtnImageNew); - rdbtnImageNew.setSelected(true); - buttonGroup.add(rdbtnImageNew); - rdbtnImageNew.setBackground(SystemColor.menu); - - rdbtnImageEdit = new JRadioButton("Bearbeiten"); - rdbtnImageEdit - .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); - rdbtnImageEdit.setBounds(6, 48, 185, 23); - panelImage.add(rdbtnImageEdit); - buttonGroup.add(rdbtnImageEdit); - rdbtnImageEdit.setHorizontalAlignment(SwingConstants.LEFT); - rdbtnImageEdit.setBackground(SystemColor.menu); - - rdbtnImageDelete = new JRadioButton("L\u00F6schen"); - rdbtnImageDelete.setEnabled(false); - buttonGroup.add(rdbtnImageDelete); - rdbtnImageDelete - .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); - rdbtnImageDelete.setHorizontalAlignment(SwingConstants.LEFT); - rdbtnImageDelete.setBackground(SystemColor.menu); - rdbtnImageDelete.setBounds(6, 74, 185, 23); - panelImage.add(rdbtnImageDelete); - - rdbtnImageSearchDownload = new JRadioButton("Suche und Download"); - rdbtnImageSearchDownload.setEnabled(false); - buttonGroup.add(rdbtnImageSearchDownload); - rdbtnImageSearchDownload - .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); - rdbtnImageSearchDownload.setHorizontalAlignment(SwingConstants.LEFT); - rdbtnImageSearchDownload.setBackground(SystemColor.menu); - rdbtnImageSearchDownload.setBounds(6, 100, 185, 23); - panelImage.add(rdbtnImageSearchDownload); - - JPanel panelDesc = new JPanel(); - panelDesc.setLayout(null); - panelDesc.setBorder(new TitledBorder(UIManager - .getBorder("TitledBorder.border"), "Erklärung", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelDesc.setBackground(SystemColor.menu); - panelDesc.setBounds(290, 146, 270, 170); - contentPanel.add(panelDesc); - - ScrollPane scrollPaneDesc = new ScrollPane(); - scrollPaneDesc.setBounds(10, 15, 250, 145); - final JTextArea txtDesc = new JTextArea(); - txtDesc.setLineWrap(true); - txtDesc.setWrapStyleWord(true); - txtDesc.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtDesc.setBackground(SystemColor.menu); - scrollPaneDesc.add(txtDesc); - // Pro AUswahl - txtDesc.setText("Legen Sie ein neues Image an und laden Sie anschließend die passende .vmdk-Datei hoch. Ein Image (wenn auch von einem anderen Dozenten) ist die Voraussetzung für eine Veranstaltung."); - panelDesc.add(scrollPaneDesc); - - JPanel panelVeranstaltung = new JPanel(); - panelVeranstaltung.setLayout(null); - panelVeranstaltung.setBorder(new TitledBorder(UIManager - .getBorder("TitledBorder.border"), "Veranstaltung (VMChooser)", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelVeranstaltung.setBackground(SystemColor.menu); - panelVeranstaltung.setBounds(10, 327, 270, 170); - contentPanel.add(panelVeranstaltung); - - rdbtnVeranstaltungNew = new JRadioButton("Neu"); - buttonGroup.add(rdbtnVeranstaltungNew); - rdbtnVeranstaltungNew - .setToolTipText("Hier k\u00F6nnen Sie Ihre Labordaten eingeben"); - rdbtnVeranstaltungNew.setBounds(6, 24, 185, 23); - panelVeranstaltung.add(rdbtnVeranstaltungNew); - rdbtnVeranstaltungNew.setBackground(SystemColor.menu); - - rdbtnVeranstaltungEdit = new JRadioButton("Bearbeiten"); - rdbtnVeranstaltungEdit - .setToolTipText("Hier k\u00F6nnen Sie einen Link auf ein bestehendes Labor erzeugen"); - rdbtnVeranstaltungEdit.setBounds(6, 50, 230, 23); - panelVeranstaltung.add(rdbtnVeranstaltungEdit); - buttonGroup.add(rdbtnVeranstaltungEdit); - rdbtnVeranstaltungEdit.setBackground(SystemColor.menu); - - JRadioButton rdbtnVeranstaltungDelete = new JRadioButton("L\u00F6schen"); - rdbtnVeranstaltungDelete.setEnabled(false); - rdbtnVeranstaltungDelete - .setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); - rdbtnVeranstaltungDelete.setBounds(6, 76, 175, 23); - panelVeranstaltung.add(rdbtnVeranstaltungDelete); - buttonGroup.add(rdbtnVeranstaltungDelete); - rdbtnVeranstaltungDelete.setBackground(SystemColor.menu); - - JRadioButton rdbtnVeranstaltungSearch = new JRadioButton("Suche"); - rdbtnVeranstaltungSearch.setEnabled(false); - buttonGroup.add(rdbtnVeranstaltungSearch); - rdbtnVeranstaltungSearch - .setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); - rdbtnVeranstaltungSearch.setBackground(SystemColor.menu); - rdbtnVeranstaltungSearch.setBounds(6, 102, 175, 23); - panelVeranstaltung.add(rdbtnVeranstaltungSearch); - - JLabel lblCrumbStart = new JLabel("Startseite"); - lblCrumbStart.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - Login_GUI lw = new Login_GUI(); - lw.setVisible(true); - MainMenue_GUI.this.setVisible(false); - } - }); - lblCrumbStart.setForeground(Color.BLUE); - lblCrumbStart.setBounds(10, 0, 52, 14); - contentPanel.add(lblCrumbStart); - - JLabel label = new JLabel(">"); - label.setBounds(60, 0, 13, 14); - contentPanel.add(label); - - JLabel lblRechtshinweis = new JLabel("Rechtshinweis"); - lblRechtshinweis.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - BillOfRights_GUI rb = new BillOfRights_GUI(); - rb.setVisible(true); - MainMenue_GUI.this.setVisible(false); - } - }); - lblRechtshinweis.setForeground(Color.BLUE); - lblRechtshinweis.setBounds(72, 0, 68, 14); - contentPanel.add(lblRechtshinweis); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(142, 0, 13, 14); - contentPanel.add(label_1); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setBounds(150, 0, 74, 14); - contentPanel.add(lblNewLabel_1); - - JPanel panelNews = new JPanel(); - panelNews.setLayout(null); - panelNews.setBorder(new TitledBorder(UIManager - .getBorder("TitledBorder.border"), "News", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelNews.setBackground(SystemColor.menu); - panelNews.setBounds(290, 327, 270, 170); - contentPanel.add(panelNews); - - ScrollPane scrollPaneNews = new ScrollPane(); - // scrollPaneDesc.setBounds(10, 15, 250, 145); - scrollPaneNews.setBounds(10, 15, 250, 145); - JTextArea txtNews = new JTextArea(); - txtNews.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtNews.setBackground(SystemColor.menu); - txtNews.setWrapStyleWord(true); - txtNews.setLineWrap(true); - txtNews.setText("Hier werden mal die Neuigkeiten stehen. Diese kommen direkt vom Satelliten, sind als HS-spezifisch :)"); - scrollPaneNews.add(txtNews); - panelNews.add(scrollPaneNews); - - /* - * Funktion Texte für das Klicken der RadioButtons - */ - rdbtnImageNew.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - descNewImage = "Legen Sie ein neues Image an und laden Sie anschließend die passende .vmdk-Datei hoch. Ein Image (wenn auch von einem anderen Dozenten) ist die Voraussetzung für eine Veranstaltung."; - txtDesc.setText(descNewImage); - } - }); - rdbtnImageEdit.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descEditImage = "Bearbeiten Sie die hinterlegten Informationen zu einem Image oder laden Sie eine neue .vmdk-Datei hoch."; - txtDesc.setText(descEditImage); - } - }); - rdbtnImageDelete.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descDeleteImage = "Suchen Sie alte und nicht mehr benötigte Images und löschen Sie diese."; - txtDesc.setText(descDeleteImage); - } - }); - rdbtnImageSearchDownload.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descSearchImage = "Suchen Sie nach bestimmten Images oder verschaffen Sie sich einen Überblick über alle verfügbaren Images. Sie können gewünschte Images umgehend herunterladen."; - txtDesc.setText(descSearchImage); - } - }); - rdbtnVeranstaltungNew.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descNewLecture = "Legen Sie eine neue Veranstaltung an und verknüpfen Sie diese mit einem bereits vorhandenem Image. Ihre neue Veranstaltung kann auch auf dem Image eines anderen Dozenten beruhen."; - txtDesc.setText(descNewLecture); - } - }); - rdbtnVeranstaltungEdit.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descEditLecture = "Bearbeiten Sie die hinterlegten Informationen zu einer Veranstaltung."; - txtDesc.setText(descEditLecture); - } - }); - rdbtnVeranstaltungDelete.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descDeleteLecture = "Suchen und löschen Sie eine Veranstaltung. Das hiermit verbundene Image bleibt erhalten."; - } - }); - rdbtnVeranstaltungSearch.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - descSearchLecture = "Suchen Sie nach bestimmten Veranstaltungen oder verschaffen Sie sich einen Überblick über alle verfügbaren Veranstaltungen. Eventuell gibt es bereits etwas passendes für Ihre Vorlesung."; - txtDesc.setText(descSearchLecture); - } - }); - /* - * Ende der Radiobuttons - */ - - JLabel lblGrafik = new JLabel(""); - // ToolTipp für Grafik - lblGrafik - .setToolTipText("" - + "Ein virtuelles Labor besteht immer aus den beiden Komponenten
" - + "Image und Veranstaltung. Ein Image ist dabei die Grundlage f\u00FCr
" - + "mehrere Veranstaltungen. Somit kann eine neue Veranstaltung
" - + "erstellt werden, ohne ein neues Image hochladen zu m\u00FCssen.


" - + "Image: Das Image enth\u00E4lt die ben\u00F6tigte Software, die im
" - + "virtuellen Labor ben\u00F6tigt wird. Es wird von genau einem Dozenten
" - + "angelegt und besitzt einen allgemeinen Namen, z.B. \"Programmieren\".
" - + "Bei einem Image handelt es sich um eine Datei vom Typ VMDK.


" - + "Veranstaltung: Es k\u00F6nnen nun, basierend auf einem Image,
" - + " beliebig viele Veranstaltungen von unterschiedlichen Dozenten erstellt
" - + "werden. Diese k\u00F6nnten z.B. konkret \"Web-Entwicklung\" oder \"K\u00FCnstliche
" - + "Intelligenz\" lauten und referenzieren dabei auf das allgemeine Image
" - + "\"Programmieren\"."); - lblGrafik.setIcon(new ImageIcon(MainMenue_GUI.class - .getResource("/Image_zu_Veranstaltung_HDD.png"))); - // ToolTipp lange anzeigen - 60sec - ToolTipManager.sharedInstance().setDismissDelay(60000); - ToolTipManager.sharedInstance().registerComponent(lblGrafik); - lblGrafik.setBounds(82, 11, 391, 110); - contentPanel.add(lblGrafik); - - JTextPane txtpnUmDetaillierteInformationen = new JTextPane(); - txtpnUmDetaillierteInformationen - .setText("Um detaillierte Informationen zu erhalten, fahren Sie bitte mit der Maus \u00FCber die Grafik."); - txtpnUmDetaillierteInformationen.setEditable(false); - txtpnUmDetaillierteInformationen.setBackground(SystemColor.menu); - txtpnUmDetaillierteInformationen.setBounds(10, 113, 509, 22); - contentPanel.add(txtpnUmDetaillierteInformationen); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 630, 587, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton continueButton = new JButton("Weiter"); - - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if (rdbtnImageNew.isSelected() == true) { - EingabeImageAllgemein_GUI sr = new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } else if (rdbtnImageEdit.isSelected() == true) { - - SearchEditImage_GUI si = new SearchEditImage_GUI(); - si.setVisible(true); - dispose(); - } else if (rdbtnImageSearchDownload.isSelected() == true) { - SearchMethod_GUI sm = new SearchMethod_GUI(); - sm.setVisible(true); - dispose(); - } else if (rdbtnImageDelete.isSelected() == true) { - DeleteImage_GUI di = new DeleteImage_GUI(); - di.setVisible(true); - dispose(); - } else if (rdbtnVeranstaltungNew.isSelected() == true) { - EingabeVeranstaltungAllgemein_GUI av = new EingabeVeranstaltungAllgemein_GUI(); - av.setVisible(true); - dispose(); - } else if (rdbtnVeranstaltungEdit.isSelected() == true) { - SearchEditLecture_GUI sl = new SearchEditLecture_GUI(); - sl.setVisible(true); - dispose(); - } - } - }); - continueButton.setActionCommand("OK"); - buttonPane.add(continueButton); - getRootPane().setDefaultButton(continueButton); - } - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 617, 587, 2); - getContentPane().add(separator); - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 91, 587, 2); - getContentPane().add(separator); - } - - 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); - - }// end main - -}// end class diff --git a/Dozentenmodul/src/gui/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/SearchEditImage_GUI.java deleted file mode 100644 index dbc2562c..00000000 --- a/Dozentenmodul/src/gui/SearchEditImage_GUI.java +++ /dev/null @@ -1,495 +0,0 @@ -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 SearchEditImage_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - JComboBox comboBox; - JTable tableAllImages; - JTable tablemyImages; - private JTextField textFieldName; - JTabbedPane tabbedPane; - String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort","ID", "Version"}; - ThriftConnection con=new ThriftConnection(); - Client client=con.getThriftConnection(); - final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 ); - final DefaultTableModel modelMyImages = new DefaultTableModel( titles, 0 ); - final TableRowSorter rowSorterAll = new TableRowSorter( modelAll ); - final TableRowSorter rowSorterMyImages = new TableRowSorter( modelMyImages ); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - SearchEditImage_GUI dialog = new SearchEditImage_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public SearchEditImage_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 VL-Image"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 49, 557, 131); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - textFieldName = new JTextField(); - //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)); - rowSorterMyImages.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); - - } - }}); - - - textFieldName.setBounds(270, 30, 250, 20); - panel_1.add(textFieldName); - textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel("Erweiterte Suche"); - 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); - - comboBox = new JComboBox(); - try { - //Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server - List list=client.getAllOS(); - //Leeres Item hinzufügen - comboBox.addItem(""); - for(int i=0;i"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); - contentPanel.add(lblNewLabel_1); - - 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"; - rowSorterMyImages.setRowFilter(RowFilter.regexFilter(username, 4)); - } - else if(tabbedPane.getSelectedIndex()==1){ - - - - } - - } - }); - - tabbedPane.setBounds(10, 197, 557, 300); - contentPanel.add(tabbedPane); - initTableModel(modelMyImages); - - 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(); - initTableModel(modelAll); - - JScrollPane scrollPaneMyImage = new JScrollPane(); - tablemyImages=new JTable(); - tablemyImages.setModel(modelMyImages); - 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(); - tablemyImages.setRowSorter(rowSorterMyImages); - - scrollPaneMyImage.setViewportView(tablemyImages); - tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); - tableAllImages.setRowSorter(rowSorterAll); - - scrollPaneAllImages.setViewportView(tableAllImages); - 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 Images", 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(tablemyImages.getSelectedRow()!=-1) - { - String imageid=modelMyImages.getValueAt(tablemyImages.convertRowIndexToModel(tablemyImages.getSelectedRow()), 7).toString(); - - Image.image.setImageId(imageid); - String imageversion=modelMyImages.getValueAt(tablemyImages.convertRowIndexToModel(tablemyImages.getSelectedRow()), 8).toString(); - - Image.image.setVersion(imageversion); - SearchEditImage_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=modelMyImages.getValueAt(tablemyImages.convertRowIndexToModel(tablemyImages.getSelectedRow()), 7).toString(); - - Image.image.setImageId(imageid); - String imageversion=modelMyImages.getValueAt(tablemyImages.convertRowIndexToModel(tablemyImages.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 images; - try { - //Hole eine Liste der Images - images = client.getImageList(); - - Iterator i=images.iterator(); - - int x=0; - - while(i.hasNext()) - { - //erzeuge Objekte für die Tabelle - Object [] obj={images.get(x).getImageName(),images.get(x).getLicenseRestriction(),images.get(x).getOsName(),images.get(x).getLectureName(),images.get(x).getUserData(),images.get(x).getUpdateTime(),"",images.get(x).id,images.get(x).getVersion()}; - //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; - } - - } - - diff --git a/Dozentenmodul/src/gui/SearchEditLecture_GUI.java b/Dozentenmodul/src/gui/SearchEditLecture_GUI.java deleted file mode 100644 index 9553bc6e..00000000 --- a/Dozentenmodul/src/gui/SearchEditLecture_GUI.java +++ /dev/null @@ -1,448 +0,0 @@ -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.ParseException; -import java.text.SimpleDateFormat; -import java.util.Iterator; -import java.util.List; -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.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.Lecture; -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 rowSorterAll = new TableRowSorter( modelAll ); - final TableRowSorter rowSorterMyLectures = new TableRowSorter( 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("Erweiterte Suche"); - 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 Hauptmenü - 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(); - rowSorterMyLectures.setRowFilter(RowFilter.regexFilter(username, 5)); - } - else if(tabbedPane.getSelectedIndex()==1){ - - - - } - - } - }); - - tabbedPane.setBounds(10, 197, 557, 323); - contentPanel.add(tabbedPane); - System.out.println("haaaaaaaaaaa"); - 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); - { - 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) { - - - //Image.image.setImageId(imageid); - if(tabbedPane.getSelectedIndex()==0){ - - - 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"); - - 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); - } - - 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 lectures; - try { - //Hole eine Liste der Images - lectures = client.getLectureList(); - Iterator i=lectures.iterator(); - - int x=0; - - while(i.hasNext()) - { - //erzeuge Objekte für die Tabelle - 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++; - i.next(); - - } - - return model; - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - return model; - } - - } - - diff --git a/Dozentenmodul/src/gui/SearchImage_GUI.java b/Dozentenmodul/src/gui/SearchImage_GUI.java deleted file mode 100644 index 53257f48..00000000 --- a/Dozentenmodul/src/gui/SearchImage_GUI.java +++ /dev/null @@ -1,459 +0,0 @@ -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.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.ListSelectionModel; -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 org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; - -@SuppressWarnings("serial") -public class SearchImage_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - JComboBox comboBox; - JTable tableAllImages; - JTable tablemyImages; - private JTextField textFieldName; - JTabbedPane tabbedPane; - String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", - "Verantwortlicher", "Letztes Update", "Schlagwort" }; - ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); - final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); - final DefaultTableModel modelMyImages = new DefaultTableModel(titles, 0); - final TableRowSorter rowSorterAll = new TableRowSorter( - modelAll); - final TableRowSorter rowSorterMyImages = new TableRowSorter( - modelMyImages); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - SearchImage_GUI dialog = new SearchImage_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public SearchImage_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - // Beendet die Anwendung nach klick auf X - 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 VL-Image"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie - .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 49, 557, 131); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - textFieldName = new JTextField(); - // 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)); - rowSorterMyImages.setRowFilter(RowFilter.regexFilter( - textFieldName.getText(), 0)); - - } - } - }); - - textFieldName.setBounds(270, 30, 250, 20); - panel_1.add(textFieldName); - textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel( - "Erweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - // Öffnet das Fenster Extended GUI - ExtendedSearch_GUI es = new ExtendedSearch_GUI(); - es.setVisible(true); - } - }); - lblErweiterteSuche.setForeground(Color.BLUE); - - lblErweiterteSuche.setBounds(431, 106, 89, 14); - panel_1.add(lblErweiterteSuche); - - comboBox = new JComboBox(); - try { - // Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server - List list = client.getAllOS(); - // Leeres Item hinzufügen - comboBox.addItem(""); - for (int i = 0; i < list.size(); i++) { - // Hinzufügen der verfügbaren Betriebssysteme - comboBox.addItem(list.get(i)); - } - } catch (TException e2) { - // TODO Auto-generated catch block - e2.printStackTrace(); - } - // Registriert Auswahländerungen der Box - comboBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - // Prüft das die Auswahl nicht leer ist - if (comboBox.getSelectedItem().toString() != "") { - // Filtert nach dem ausgewählten Betriebssystem - rowSorterAll.setRowFilter(RowFilter.regexFilter(comboBox - .getSelectedItem().toString(), 2)); - rowSorterMyImages.setRowFilter(RowFilter.regexFilter( - comboBox.getSelectedItem().toString(), 2)); - } - } - - }); - 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) { - // Öffnet das Hauütmenü - SearchImage_GUI.this.setVisible(false); - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); - contentPanel.add(lblNewLabel_1); - - tabbedPane = new JTabbedPane(JTabbedPane.TOP); - tabbedPane.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - System.out.println(tabbedPane.getSelectedIndex()); - if (tabbedPane.getSelectedIndex() == 0) { - - } else if (tabbedPane.getSelectedIndex() == 1) { - String username = "Spitzer Tobias"; - rowSorterMyImages.setRowFilter(RowFilter.regexFilter( - username, 4)); - // rowSorterMyImages.toggleSortOrder(0); - } - - } - }); - - tabbedPane.setBounds(10, 197, 557, 300); - contentPanel.add(tabbedPane); - - JScrollPane scrollPaneMyImage = new JScrollPane(); - tablemyImages = new JTable(); - tablemyImages.setModel(modelMyImages); - 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(); - initTableModel(modelMyImages); - tablemyImages.setRowSorter(rowSorterMyImages); - - 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(); - initTableModel(modelAll); - tableAllImages.setRowSorter(rowSorterAll); - - 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); - 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 - FTPDownloader_GUI down = new FTPDownloader_GUI(); - down.setVisible(true); - SearchImage_GUI.this.setVisible(false); - } - }); - 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 cancelButton = new JButton("Zur\u00FCck"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - // Öffnet das Hauptmenü - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("OK"); - buttonPane.add(cancelButton); - getRootPane().setDefaultButton(cancelButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - con.closeThriftConnection(); - EditImageAllgemein_GUI ea = new EditImageAllgemein_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - continueButton.setActionCommand("Cancel"); - buttonPane.add(continueButton); - } - } - - 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 images; - try { - // Hole eine Liste der Images - - images = client.getImageList(); - Iterator i = images.iterator(); - - int x = 0; - - while (i.hasNext()) { - // erzeuge Objekte für die Tabelle - Object[] obj = { images.get(x).getImageName(), - images.get(x).getLicenseRestriction(), - images.get(x).getOsName(), - images.get(x).getLectureName(), - images.get(x).getUserData(), - images.get(x).getUpdateTime() }; - // 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; - } - -} diff --git a/Dozentenmodul/src/gui/SearchMethod_GUI.java b/Dozentenmodul/src/gui/SearchMethod_GUI.java deleted file mode 100644 index 24a12959..00000000 --- a/Dozentenmodul/src/gui/SearchMethod_GUI.java +++ /dev/null @@ -1,243 +0,0 @@ -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.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.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -@SuppressWarnings("serial") -public class SearchMethod_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnNachEinemVlimage; - JRadioButton rdbtnNachEinerVeranstaltung; - private final ButtonGroup buttonGroup = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - SearchMethod_GUI dialog = new SearchMethod_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public SearchMethod_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("bwLehrpool Suite *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 603) / 2; - int left=(screenSize.width - 722) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 722); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Wählen Sie bitte die Suchmethode Ihrer Suche", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 36, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - rdbtnNachEinemVlimage = new JRadioButton("Nach einem VL-Image oder Vorlagen suchen"); - buttonGroup.add(rdbtnNachEinemVlimage); - rdbtnNachEinemVlimage.setBounds(6, 38, 545, 23); - panel_1.add(rdbtnNachEinemVlimage); - - JTextArea txtrHierKlickenWenn = new JTextArea(); - txtrHierKlickenWenn.setBackground(SystemColor.menu); - txtrHierKlickenWenn.setLineWrap(true); - txtrHierKlickenWenn.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrHierKlickenWenn.setText("Hier klicken, wenn Sie nach einem konkreten Image suchen, von dem Sie exakte Daten kennen. Hierzu geh\u00F6ren z.B. das Betriebssystem oder die installierte Software.\r\nEs werden zudem alle Vorlagen aufgelistet."); - txtrHierKlickenWenn.setBounds(25, 68, 518, 80); - panel_1.add(txtrHierKlickenWenn); - - JTextArea txtrHierKlickenWenn_1 = new JTextArea(); - txtrHierKlickenWenn_1.setText("Hier klicken, wenn Sie nur wissen f\u00FCr welche Veranstaltung das gesuchte Image verwendet wird. Hierzu geh\u00F6ren z.B. der Name des Dozenten oder der Name der Veranstaltung."); - txtrHierKlickenWenn_1.setLineWrap(true); - txtrHierKlickenWenn_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrHierKlickenWenn_1.setBackground(SystemColor.menu); - txtrHierKlickenWenn_1.setBounds(25, 210, 518, 80); - panel_1.add(txtrHierKlickenWenn_1); - - rdbtnNachEinerVeranstaltung = new JRadioButton("Nach einer Veranstaltung suchen"); - buttonGroup.add(rdbtnNachEinerVeranstaltung); - rdbtnNachEinerVeranstaltung.setBounds(6, 180, 545, 23); - panel_1.add(rdbtnNachEinerVeranstaltung); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - SearchMethod_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Suchmethode"); - lblNewLabel_1.setBounds(146, 11, 82, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if(rdbtnNachEinemVlimage.isSelected()==true) - { - SearchImage_GUI ea=new SearchImage_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/VmWareLink_GUI.java b/Dozentenmodul/src/gui/VmWareLink_GUI.java deleted file mode 100644 index 43df06a6..00000000 --- a/Dozentenmodul/src/gui/VmWareLink_GUI.java +++ /dev/null @@ -1,215 +0,0 @@ -package gui; - -import java.awt.Desktop; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.JCheckBox; -import javax.swing.event.ChangeListener; -import javax.swing.event.ChangeEvent; - -import org.ini4j.InvalidFileFormatException; -import org.ini4j.Wini; - - -@SuppressWarnings("serial") -public class VmWareLink_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JCheckBox chckbxNewCheckBox; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - VmWareLink_GUI dialog = new VmWareLink_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public VmWareLink_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("Dozentenmodul *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.setBounds(0, 0, 577, 80); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Hinweis VMWare Player"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 42); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 104, 567, 502); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JTextPane txtpnUmIhreVmdk = new JTextPane(); - txtpnUmIhreVmdk.setBackground(SystemColor.menu); - txtpnUmIhreVmdk.setEditable(false); - txtpnUmIhreVmdk.setText("F\u00FCr die Arbeit mit der bwLehrpool Suite wird zwingend ein VMWare Player ben\u00F6tigt. Diesen k\u00F6nnen Sie sich unter folgendem Link kostenfrei downloaden."); - txtpnUmIhreVmdk.setBounds(10, 16, 499, 66); - contentPanel.add(txtpnUmIhreVmdk); - - JLabel lblNewLabel_1 = new JLabel("Windows: "); - lblNewLabel_1.addMouseListener(new MouseAdapter() { - @Override - public void mouseReleased(MouseEvent arg0) { - URI url; - try { - url = new URI("https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"); - Desktop.getDesktop().browse(url); - } catch (URISyntaxException | IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - }); - - lblNewLabel_1.setBounds(10, 93, 499, 14); - contentPanel.add(lblNewLabel_1); - - chckbxNewCheckBox = new JCheckBox("Diese Benachrichtigung nicht mehr anzeigen."); - chckbxNewCheckBox.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - if(chckbxNewCheckBox.isSelected()==true) - { - try { - Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - ini.put("main", "vmware",true); - ini.store(); - } catch (InvalidFileFormatException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - } - }); - chckbxNewCheckBox.setBounds(6, 472, 555, 23); - contentPanel.add(chckbxNewCheckBox); - - JLabel lbllinuxvmwarePlayer = new JLabel("Linux: "); - lbllinuxvmwarePlayer.setBounds(10, 178, 499, 14); - contentPanel.add(lbllinuxvmwarePlayer); - - JLabel lblvmwarePlayerDownload = new JLabel("vmWare Player Download"); - lblvmwarePlayerDownload.setBounds(10, 118, 499, 14); - contentPanel.add(lblvmwarePlayerDownload); - - JLabel lblvmwarePlayerDownload_1 = new JLabel("vmWare Player Download"); - lblvmwarePlayerDownload_1.setBounds(10, 203, 499, 14); - contentPanel.add(lblvmwarePlayerDownload_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 630, 587, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - MainMenue_GUI ea=new MainMenue_GUI(); - ea.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 617, 587, 2); - getContentPane().add(separator); - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 91, 587, 2); - getContentPane().add(separator); - } - { - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - { - JMenu mnHilfe = new JMenu("Hilfe"); - menuBar.add(mnHilfe); - { - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnHilfe.add(mntmFaq); - } - { - JMenuItem mntmHilfe = new JMenuItem("Hilfe"); - mnHilfe.add(mntmHilfe); - } - } - } - - - - } -} diff --git a/Dozentenmodul/src/gui/image/DeleteImage_GUI.java b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java new file mode 100644 index 00000000..d19e5c9f --- /dev/null +++ b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java @@ -0,0 +1,442 @@ +package gui.image; + + +import gui.intro.MainMenue_GUI; +import gui.lecture.ExtendedSearchForImages_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.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 org.apache.thrift.TException; + +import server.Server.Client; +import thrift.ThriftConnection; + +@SuppressWarnings("serial") +public class DeleteImage_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JComboBox comboBox; + JTable tableAllImages; + JTable tablemyImages; + private JTextField textFieldName; + JTabbedPane tabbedPane; + String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort"}; + ThriftConnection con=new ThriftConnection(); + Client client=con.getThriftConnection(); + final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 ); + final DefaultTableModel modelMyImages = new DefaultTableModel( titles, 0 ); + final TableRowSorter rowSorterAll = new TableRowSorter( modelAll ); + final TableRowSorter rowSorterMyImages = new TableRowSorter( modelMyImages ); + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + DeleteImage_GUI dialog = new DeleteImage_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public DeleteImage_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + //Beendet die Anwendung nach klick auf X + 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 VL-Image"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 531); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 49, 557, 131); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); + lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); + panel_1.add(lblInternetIstInnerhalb); + + textFieldName = new JTextField(); + //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)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); + + } + }}); + + + textFieldName.setBounds(270, 30, 250, 20); + panel_1.add(textFieldName); + textFieldName.setColumns(10); + + JLabel lblErweiterteSuche = new JLabel("Erweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + //Öffnet das Fenster Extended GUI + ExtendedSearchForImages_GUI es=new ExtendedSearchForImages_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + comboBox = new JComboBox(); + try { + //Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server + List list=client.getAllOS(); + //Leeres Item hinzufügen + comboBox.addItem(""); + for(int i=0;i"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); + lblNewLabel_1.setBounds(146, 11, 85, 14); + contentPanel.add(lblNewLabel_1); + + tabbedPane = new JTabbedPane(JTabbedPane.TOP); + tabbedPane.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent arg0) { + System.out.println(tabbedPane.getSelectedIndex()); + if(tabbedPane.getSelectedIndex()==0){ + + + + } + else if(tabbedPane.getSelectedIndex()==1){ + String username="Spitzer Tobias"; + rowSorterMyImages.setRowFilter(RowFilter.regexFilter(username, 4)); + //rowSorterMyImages.toggleSortOrder(0); + } + + } + }); + + tabbedPane.setBounds(10, 197, 557, 300); + contentPanel.add(tabbedPane); + + JScrollPane scrollPaneMyImage = new JScrollPane(); + tablemyImages=new JTable(); + tablemyImages.setModel(modelMyImages); + 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(); + initTableModel(modelMyImages); + tablemyImages.setRowSorter(rowSorterMyImages); + initTableModel(modelAll); + + 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(); + + 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(); + tableAllImages.setRowSorter(rowSorterAll); + + scrollPaneAllImages.setViewportView(tableAllImages); + tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); + + scrollPaneCoopImages.setViewportView(tableCoopImages); + tabbedPane.addTab("Kooperative Images", 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 btnDelete = new JButton("L\u00F6schen"); + btnDelete.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + //Öffnet den Downloader + FTPDownloader_GUI down=new FTPDownloader_GUI(); + down.setVisible(true); + DeleteImage_GUI.this.setVisible(false); + } + }); + btnDelete.setBounds(449, 508, 118, 23); + contentPanel.add(btnDelete); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton mainButton = new JButton("Hauptmen\u00FC"); + mainButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + EditImageAllgemein_GUI ea=new EditImageAllgemein_GUI(); + ea.setVisible(true); + dispose(); + + } + }); + mainButton.setActionCommand("Cancel"); + buttonPane.add(mainButton); + } + } + + 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 images; + try { + //Hole eine Liste der Images + + images = client.getImageList(); + Iterator i=images.iterator(); + + int x=0; + + while(i.hasNext()) + { + //erzeuge Objekte für die Tabelle + Object [] obj={images.get(x).getImageName(),images.get(x).getLicenseRestriction(),images.get(x).getOsName(),images.get(x).getLectureName(),images.get(x).getUserData(),images.get(x).getUpdateTime()}; + //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; + } + + } + + diff --git a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java new file mode 100644 index 00000000..9d8ffdfe --- /dev/null +++ b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java @@ -0,0 +1,347 @@ +package gui.image; + +import gui.intro.MainMenue_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.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.util.Map; +import javax.swing.JButton; +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.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 javax.swing.border.TitledBorder; +import org.apache.thrift.TException; +import models.Image; +import models.person; +import server.Server.Client; +import thrift.ThriftConnection; + +@SuppressWarnings("serial") +public class EditImageAllgemein_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + private JTextField Vorname; + private JTextField Nachname; + private JTextField Hochschule; + private JTextField EMail; + private JTextField imagename; + ThriftConnection con=new ThriftConnection(); + Client client=con.getThriftConnection(); + private JPanel panel_2; + private JLabel lblNewLabel; + private JTextPane txtpnBitteWhlenSie; + private JPanel buttonPane; + private JButton backButton; + private JButton okButton; + + /** + * Create the dialog. + */ + public EditImageAllgemein_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + //Beendet die Anwendung bei einem Klick auf das X + con.closeThriftConnection(); + System.exit(0); + } + }); + //Verhindert das vergrößern des Fensters + setResizable(false); + + try { + 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 der Bildmitte + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top=(screenSize.height - 722) / 2; + int left=(screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + initData(); + getContentPane().setLayout(null); + { + panel_2 = new JPanel(); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(10, 11, 577, 57); + getContentPane().add(panel_2); + panel_2.setLayout(null); + { + lblNewLabel = new JLabel("Bearbeiten Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel_2.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + 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_2.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 66, 557, 369); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel label = new JLabel("Vorname: *"); + label.setBackground(SystemColor.menu); + label.setBounds(10, 245, 125, 20); + panel_1.add(label); + + Vorname = new JTextField(); + Vorname.setEditable(false); + Vorname.setEnabled(false); + Vorname.setBackground(Color.WHITE); + Vorname.setText(person.verantwortlicher.getVorname()); + Vorname.setColumns(10); + Vorname.setBounds(145, 245, 350, 20); + panel_1.add(Vorname); + + JLabel label_7 = new JLabel("Nachname: *"); + label_7.setBackground(SystemColor.menu); + label_7.setBounds(10, 276, 125, 20); + panel_1.add(label_7); + + Nachname = new JTextField(); + Nachname.setEnabled(false); + Nachname.setEditable(false); + Nachname.setBackground(Color.WHITE); + Nachname.setText(person.verantwortlicher.getName()); + Nachname.setColumns(10); + Nachname.setBounds(145, 276, 350, 20); + panel_1.add(Nachname); + + JLabel label_8 = new JLabel("Hochschule: *"); + label_8.setBackground(SystemColor.menu); + label_8.setBounds(10, 307, 125, 20); + panel_1.add(label_8); + + Hochschule = new JTextField(); + Hochschule.setEnabled(false); + Hochschule.setEditable(false); + Hochschule.setBackground(Color.WHITE); + Hochschule.setText(person.verantwortlicher.getHochschule()); + Hochschule.setColumns(10); + Hochschule.setBounds(145, 307, 350, 20); + panel_1.add(Hochschule); + + JLabel label_9 = new JLabel("E-Mail: *"); + label_9.setBackground(SystemColor.menu); + label_9.setBounds(10, 338, 125, 20); + panel_1.add(label_9); + + EMail = new JTextField(); + EMail.setEnabled(false); + EMail.setEditable(false); + EMail.setBackground(Color.WHITE); + EMail.setText(person.verantwortlicher.getEMail()); + EMail.setColumns(10); + EMail.setBounds(145, 338, 350, 20); + panel_1.add(EMail); + + JLabel lblImagename = new JLabel("Imagename: *"); + lblImagename.setBackground(SystemColor.menu); + lblImagename.setBounds(10, 31, 125, 20); + panel_1.add(lblImagename); + + imagename = new JTextField(); + imagename.setToolTipText("Bitte geben Sie hier den Namen des Image ein, z.B. \"Programmieren\"."); + imagename.setBackground(Color.WHITE); + imagename.setText(Image.image.getImagename()); + imagename.setColumns(10); + imagename.setBounds(145, 31, 350, 20); + panel_1.add(imagename); + + JTextArea txtrGebenSieBitte = new JTextArea(); + txtrGebenSieBitte.setBackground(SystemColor.menu); + txtrGebenSieBitte.setLineWrap(true); + txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); + txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); + txtrGebenSieBitte.setBounds(145, 62, 350, 110); + panel_1.add(txtrGebenSieBitte); + + JPanel panel = new JPanel(); + panel.setBounds(10, 402, 577, 33); + contentPanel.add(panel); + panel.setLayout(null); + panel.setBorder(new EmptyBorder(5, 5, 5, 5)); + panel.setBackground(SystemColor.menu); + + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(10, 442, 136, 14); + contentPanel.add(lblPflichtfelder); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + //Durch den Klick auf Button Hauptmenpü wird dieses Fenster unsichtbar und das Hauptmenü sichtbar + con.closeThriftConnection(); + EditImageAllgemein_GUI.this.setVisible(false); + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Bearbeiten"); + lblNewLabel_1.setBounds(146, 11, 71, 14); + contentPanel.add(lblNewLabel_1); + { + buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + backButton = new JButton("Zur\u00FCck"); + backButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar + //Image.image.setImagename(imagename.getText()); + con.closeThriftConnection(); + MainMenue_GUI sr=new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + } + }); + backButton.setActionCommand("CANCEL"); + buttonPane.add(backButton); + + } + { + okButton = new JButton("Weiter"); + okButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + System.out.println("text length="+imagename.getText().length()); + //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar + + //TODO + //Prüfung ob alle notwendigen Felder ausgefüllt sind --> funktioniert aktuell nicht + //der Button wechselt beim Klick auf die nächste Seite, selbst wenn kein handler implementiert ist... WTF??? + if(imagename.getText().length() <= 0){ + JOptionPane.showMessageDialog(null, + "Bitte geben Sie einen Labornamen ein.", + "Daten nicht vollständig", + JOptionPane.WARNING_MESSAGE); + } else { + Image.image.setNewName(imagename.getText()); + con.closeThriftConnection(); + EditImageTechnisch_GUI ea=new EditImageTechnisch_GUI(); + ea.setVisible(true); + dispose(); + }//end else + } + }); + + okButton.setActionCommand("OK"); + buttonPane.add(okButton); + getRootPane().setDefaultButton(okButton); + } + } + + 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); + //setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{getContentPane(), panel_2, lblNewLabel, txtpnBitteWhlenSie, contentPanel, panel_1, label, Vorname, label_7, Nachname, label_8, Hochschule, label_9, EMail, lblImagename, imagename, txtrGebenSieBitte, panel, lblPflichtfelder, lblHauptmen, label_1, lblVlimage, label_2, lblNewLabel_1, buttonPane, backButton, okButton, separator, separator_1, menuBar, mnNewMenu_1, mntmFaq, mntmOtrs})); + + } + + public void initData(){ + try { + + Map map=client.getImageData(Image.image.getImageId(),Image.image.getVersion()); + if(map.get("internet").equals("0")){ + Image.image.setInternet(false); + } + else + { + Image.image.setInternet(true); + } + if(map.get("license").equals("0")){ + Image.image.setLicensed(false); + } + else{ + Image.image.setLicensed(true); + } + Image.image.setImagename(map.get("name")); + Image.image.setRam(Integer.parseInt(map.get("ram"))); + Image.image.setCpu(Integer.parseInt(map.get("cpu"))); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + +} diff --git a/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java new file mode 100644 index 00000000..c938181e --- /dev/null +++ b/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java @@ -0,0 +1,359 @@ +package gui.image; + + +import gui.intro.MainMenue_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.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.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.JSpinner; +import javax.swing.JTextArea; +import javax.swing.JTextPane; +import javax.swing.SpinnerNumberModel; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; +import models.Image; + +@SuppressWarnings("serial") +public class EditImageTechnisch_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JSpinner spinnerCPU; + JSpinner spinnerRam; + JRadioButton rdbtnlicenseJa; + JRadioButton rdbtnlicenseNein; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + private final ButtonGroup buttonGrouplicense = new ButtonGroup(); + private final ButtonGroup buttonGroupInternet = new ButtonGroup(); + + + /** + * Create the dialog. + */ + public EditImageTechnisch_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + //Beendet die Anwendung bei Klick auf das X + + System.exit(0); + } + + }); + //Verhindert das Vergrößern des Fensters + setResizable(false); + + try { + //setzt das Look & Feel + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + //Setzt den Titel des Fensters + setTitle("bwLehrpool Suite *Prototyp*"); + //Zentriert das Fenster + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top=(screenSize.height - 722) / 2; + int left=(screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + + + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 66, 557, 95); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + rdbtnlicenseJa = new JRadioButton("Ja"); + rdbtnlicenseJa.setSelected(true); + buttonGrouplicense.add(rdbtnlicenseJa); + rdbtnlicenseJa.setBounds(266, 29, 109, 23); + panel_1.add(rdbtnlicenseJa); + + rdbtnlicenseNein = new JRadioButton("Nein"); + buttonGrouplicense.add(rdbtnlicenseNein); + rdbtnlicenseNein.setBounds(377, 29, 109, 23); + panel_1.add(rdbtnlicenseNein); + if(Image.image.isLicensed()==true){ + rdbtnlicenseJa.setSelected(true); + } + else + { + rdbtnlicenseNein.setSelected(true); + } + + + + JLabel lblInternetIstInnerhalb = new JLabel("Internet ist innerhalb des Image gesperrt:"); + lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); + panel_1.add(lblInternetIstInnerhalb); + + rdbtnInternetJa = new JRadioButton("Ja"); + buttonGroupInternet.add(rdbtnInternetJa); + rdbtnInternetJa.setBounds(266, 57, 109, 23); + panel_1.add(rdbtnInternetJa); + + rdbtnInternetNein = new JRadioButton("Nein"); + rdbtnInternetNein.setSelected(true); + buttonGroupInternet.add(rdbtnInternetNein); + rdbtnInternetNein.setBounds(377, 57, 109, 23); + panel_1.add(rdbtnInternetNein); + if(Image.image.isInternet()==true){ + rdbtnInternetJa.setSelected(true); + } + else + { + rdbtnInternetNein.setSelected(true); + } + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + //Macht dieses Fenster unsichtbar und das vorhergehende Fenster sichtbar + EditImageTechnisch_GUI.this.setVisible(false); + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); + + JPanel panel_2 = new JPanel(); + panel_2.setLayout(null); + panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(10, 172, 557, 338); + contentPanel.add(panel_2); + + JTextArea txtrHinweisSolltenSie = new JTextArea(); + txtrHinweisSolltenSie.setBackground(SystemColor.menu); + txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); + txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); + txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); + panel_2.add(txtrHinweisSolltenSie); + + JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); + lblNewLabel_3.setBounds(10, 91, 280, 20); + panel_2.add(lblNewLabel_3); + + JLabel lblMindestens = new JLabel("mindestens"); + lblMindestens.setBounds(315, 91, 60, 20); + panel_2.add(lblMindestens); + + spinnerRam = new JSpinner(); + spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); + spinnerRam.setBounds(385, 88, 29, 20); + spinnerRam.setValue(Image.image.getRam()); + panel_2.add(spinnerRam); + + JLabel lblGbyte = new JLabel("GByte"); + lblGbyte.setBounds(424, 91, 46, 20); + panel_2.add(lblGbyte); + + JTextArea txtrBeispielWindows = new JTextArea(); + txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); + txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtrBeispielWindows.setBackground(SystemColor.menu); + txtrBeispielWindows.setBounds(20, 111, 280, 55); + panel_2.add(txtrBeispielWindows); + + JTextArea txtrBeispielWindows_1 = new JTextArea(); + txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); + txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtrBeispielWindows_1.setBackground(SystemColor.menu); + txtrBeispielWindows_1.setBounds(20, 226, 280, 55); + panel_2.add(txtrBeispielWindows_1); + + JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); + lblWieVieleCpus.setBounds(10, 201, 280, 20); + panel_2.add(lblWieVieleCpus); + + JLabel label_3 = new JLabel("mindestens"); + label_3.setBounds(315, 201, 60, 20); + panel_2.add(label_3); + + spinnerCPU = new JSpinner(); + spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); + spinnerCPU.setBounds(385, 198, 29, 20); + spinnerCPU.setValue(Image.image.getCpu()); + panel_2.add(spinnerCPU); + + JLabel lblKerne = new JLabel("Kerne"); + lblKerne.setBounds(424, 201, 46, 20); + panel_2.add(lblKerne); + { + 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) { + //Setzt die Imagewerte in das Model + Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); + if(rdbtnInternetJa.isSelected()==true) + { + Image.image.setInternet(true); + } + else + { + Image.image.setInternet(false); + } + + if(rdbtnlicenseJa.isSelected()==true) + { + Image.image.setLicensed(true); + } + else + { + Image.image.setLicensed(false); + } + //Öffnet das vorherige Fenster + EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_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) { + Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); + if(rdbtnInternetJa.isSelected()==true) + { + Image.image.setInternet(true); + } + else + { + Image.image.setInternet(false); + } + + if(rdbtnlicenseJa.isSelected()==true) + { + Image.image.setLicensed(true); + } + else + { + Image.image.setLicensed(false); + } + //Öffnet das nächste Fenster + FTPEditUploader_GUI ea=new FTPEditUploader_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_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/image/EingabeImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java new file mode 100644 index 00000000..1cff0677 --- /dev/null +++ b/Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java @@ -0,0 +1,304 @@ +package gui.image; + + +import gui.intro.MainMenue_GUI; + +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Toolkit; +import javax.swing.JFrame; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import java.awt.Color; +import javax.swing.JLabel; +import java.awt.Font; +import javax.swing.JTextPane; +import java.awt.SystemColor; +import javax.swing.JTextField; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JSeparator; +import javax.swing.JMenuBar; +import javax.swing.JMenu; +import javax.swing.JMenuItem; + +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.border.TitledBorder; +import javax.swing.JTextArea; + +import models.Image; +import models.person; + +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +@SuppressWarnings("serial") +public class EingabeImageAllgemein_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + private JTextField Vorname; + private JTextField Nachname; + private JTextField Hochschule; + private JTextField EMail; + private JTextField imagename; + + /** + * Create the dialog. + */ + public EingabeImageAllgemein_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + //Beendet das Fenster auf X + System.exit(0); + } + @Override + public void windowOpened(WindowEvent arg0) { + imagename.requestFocusInWindow(); + } + }); + //Verhindert das Vergrößern des Fensters + setResizable(false); + + try { + //setzt das Look & Feel + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + //Setzt den Titel + setTitle("bwLehrpool Suite *Prototyp*"); + //Zentriert das Fenster + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top=(screenSize.height - 722) / 2; + int left=(screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 66, 557, 369); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel label = new JLabel("Vorname: *"); + label.setBackground(SystemColor.menu); + label.setBounds(10, 245, 125, 20); + panel_1.add(label); + + Vorname = new JTextField(); + Vorname.setEnabled(false); + Vorname.setEditable(false); + Vorname.setBackground(Color.WHITE); + Vorname.setText(person.verantwortlicher.getVorname()); + Vorname.setColumns(10); + Vorname.setBounds(145, 245, 350, 20); + panel_1.add(Vorname); + + JLabel label_7 = new JLabel("Nachname: *"); + label_7.setBackground(SystemColor.menu); + label_7.setBounds(10, 276, 125, 20); + panel_1.add(label_7); + + Nachname = new JTextField(); + Nachname.setEnabled(false); + Nachname.setEditable(false); + Nachname.setBackground(Color.WHITE); + Nachname.setText(person.verantwortlicher.getName()); + Nachname.setColumns(10); + Nachname.setBounds(145, 276, 350, 20); + panel_1.add(Nachname); + + JLabel label_8 = new JLabel("Hochschule: *"); + label_8.setBackground(SystemColor.menu); + label_8.setBounds(10, 307, 125, 20); + panel_1.add(label_8); + + Hochschule = new JTextField(); + Hochschule.setEnabled(false); + Hochschule.setEditable(false); + Hochschule.setBackground(Color.WHITE); + Hochschule.setText(person.verantwortlicher.getHochschule()); + Hochschule.setColumns(10); + Hochschule.setBounds(145, 307, 350, 20); + panel_1.add(Hochschule); + + JLabel label_9 = new JLabel("E-Mail: *"); + label_9.setBackground(SystemColor.menu); + label_9.setBounds(10, 338, 125, 20); + panel_1.add(label_9); + + EMail = new JTextField(); + EMail.setEnabled(false); + EMail.setEditable(false); + EMail.setBackground(Color.WHITE); + EMail.setText(person.verantwortlicher.getEMail()); + EMail.setColumns(10); + EMail.setBounds(145, 338, 350, 20); + panel_1.add(EMail); + + JLabel lblImagename = new JLabel("Imagename: *"); + lblImagename.setBackground(SystemColor.menu); + lblImagename.setBounds(10, 31, 125, 20); + panel_1.add(lblImagename); + + + imagename = new JTextField(); + imagename.setBackground(Color.WHITE); + imagename.setText((String) null); + imagename.setColumns(10); + imagename.setBounds(145, 31, 350, 20); + imagename.setText(Image.image.getImagename()); //null am Anfang, aber speichert die Eingabe, wenn man zurück kommt zur Seite + panel_1.add(imagename); + + JTextArea txtrGebenSieBitte = new JTextArea(); + txtrGebenSieBitte.setEditable(false); + txtrGebenSieBitte.setBackground(SystemColor.menu); + txtrGebenSieBitte.setLineWrap(true); + txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); + txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); + txtrGebenSieBitte.setBounds(145, 62, 350, 110); + panel_1.add(txtrGebenSieBitte); + + JPanel panel = new JPanel(); + panel.setBounds(10, 402, 577, 33); + contentPanel.add(panel); + panel.setLayout(null); + panel.setBorder(new EmptyBorder(5, 5, 5, 5)); + panel.setBackground(SystemColor.menu); + + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(10, 442, 136, 14); + contentPanel.add(lblPflichtfelder); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + //Öffnet das Hauptmenü + EingabeImageAllgemein_GUI.this.setVisible(false); + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton backButton = new JButton("Zur\u00FCck"); + backButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Image.image.setImagename(imagename.getText()); + MainMenue_GUI sr=new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + } + }); + backButton.setActionCommand("Cancel"); + buttonPane.add(backButton); + } + { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + //Prüft die Eingabe + if(imagename.getText().isEmpty()==false && Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) + { + //Schreibt die Daten in das Model + Image.image.setImagename(imagename.getText()); + EingabeImageTechnisch_GUI ea=new EingabeImageTechnisch_GUI(); + ea.setVisible(true); + dispose(); + } + else{ + JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", + "Error", JOptionPane.ERROR_MESSAGE); + } + } + }); + continueButton.setActionCommand("OK"); + buttonPane.add(continueButton); + getRootPane().setDefaultButton(continueButton); + } + } + + 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); + + }//end main +} diff --git a/Dozentenmodul/src/gui/image/EingabeImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/EingabeImageTechnisch_GUI.java new file mode 100644 index 00000000..fd25d2cf --- /dev/null +++ b/Dozentenmodul/src/gui/image/EingabeImageTechnisch_GUI.java @@ -0,0 +1,366 @@ +package gui.image; + + +import gui.intro.MainMenue_GUI; + +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Toolkit; +import javax.swing.JFrame; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import java.awt.Color; +import javax.swing.JLabel; +import java.awt.Font; +import javax.swing.JTextPane; +import java.awt.SystemColor; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JSeparator; +import javax.swing.JMenuBar; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.border.TitledBorder; +import javax.swing.JTextArea; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import javax.swing.JRadioButton; +import javax.swing.ButtonGroup; +import javax.swing.JSpinner; +import javax.swing.SpinnerNumberModel; + +import models.Image; + +@SuppressWarnings("serial") +public class EingabeImageTechnisch_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JSpinner spinnerCPU; + JSpinner spinnerRam; + JRadioButton rdbtnlicenseJa; + JRadioButton rdbtnlicenseNein; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + private final ButtonGroup buttonGrouplicense = new ButtonGroup(); + private final ButtonGroup buttonGroupInternet = new ButtonGroup(); + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + EingabeImageTechnisch_GUI dialog = new EingabeImageTechnisch_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public EingabeImageTechnisch_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("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 66, 557, 124); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + rdbtnlicenseNein = new JRadioButton("Nein"); + buttonGrouplicense.add(rdbtnlicenseNein); + rdbtnlicenseNein.setBounds(377, 29, 46, 23); + panel_1.add(rdbtnlicenseNein); + + rdbtnInternetNein = new JRadioButton("Nein"); + rdbtnInternetNein.setSelected(true); + buttonGroupInternet.add(rdbtnInternetNein); + rdbtnInternetNein.setBounds(377, 57, 46, 23); + panel_1.add(rdbtnInternetNein); + + JLabel lblInternetIstInnerhalb = new JLabel("Internet ist f\u00FCr dieses Image gesperrt:"); + lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); + panel_1.add(lblInternetIstInnerhalb); + + JButton btnInternetSettings = new JButton("Einstellungen..."); + btnInternetSettings.setEnabled(false); + btnInternetSettings.setBounds(439, 57, 108, 23); + panel_1.add(btnInternetSettings); + + rdbtnInternetJa = new JRadioButton("Ja"); + + buttonGroupInternet.add(rdbtnInternetJa); + rdbtnInternetJa.setBounds(266, 57, 41, 23); + panel_1.add(rdbtnInternetJa); + + rdbtnlicenseJa = new JRadioButton("Ja"); + rdbtnlicenseJa.setSelected(true); + buttonGrouplicense.add(rdbtnlicenseJa); + rdbtnlicenseJa.setBounds(266, 29, 41, 23); + panel_1.add(rdbtnlicenseJa); + + JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + JLabel lblLizenzserverEintragen = new JLabel("Lizenzserver eintragen:"); + lblLizenzserverEintragen.setBounds(10, 85, 250, 20); + panel_1.add(lblLizenzserverEintragen); + + JButton btnLicenseServer = new JButton("Server-Adresse..."); + btnLicenseServer.setEnabled(false); + btnLicenseServer.setBounds(266, 84, 157, 23); + panel_1.add(btnLicenseServer); + + JPanel panel_2 = new JPanel(); + panel_2.setLayout(null); + panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(11, 196, 557, 338); + contentPanel.add(panel_2); + + JLabel lblGbyte = new JLabel("GByte"); + lblGbyte.setBounds(424, 91, 46, 20); + panel_2.add(lblGbyte); + + spinnerCPU = new JSpinner(); + spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); + spinnerCPU.setBounds(385, 188, 29, 20); + panel_2.add(spinnerCPU); + + JTextArea txtrBeispielWindows = new JTextArea(); + txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); + txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtrBeispielWindows.setBackground(SystemColor.menu); + txtrBeispielWindows.setBounds(10, 122, 280, 55); + panel_2.add(txtrBeispielWindows); + + + + JLabel lblKerne = new JLabel("Kerne"); + lblKerne.setBounds(424, 191, 46, 20); + panel_2.add(lblKerne); + + JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); + lblWieVieleCpus.setBounds(10, 191, 280, 20); + panel_2.add(lblWieVieleCpus); + + spinnerRam = new JSpinner(); + spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); + spinnerRam.setBounds(385, 88, 29, 20); + panel_2.add(spinnerRam); + + JLabel label_3 = new JLabel("mindestens"); + label_3.setBounds(315, 191, 60, 20); + panel_2.add(label_3); + + JLabel lblMindestens = new JLabel("mindestens"); + lblMindestens.setBounds(315, 91, 60, 20); + panel_2.add(lblMindestens); + + JTextArea txtrBeispielWindows_1 = new JTextArea(); + txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); + txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtrBeispielWindows_1.setBackground(SystemColor.menu); + txtrBeispielWindows_1.setBounds(10, 222, 280, 55); + panel_2.add(txtrBeispielWindows_1); + + JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); + lblNewLabel_3.setBounds(10, 91, 280, 20); + panel_2.add(lblNewLabel_3); + + JTextArea txtrHinweisSolltenSie = new JTextArea(); + txtrHinweisSolltenSie.setBackground(SystemColor.menu); + txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); + txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); + txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); + panel_2.add(txtrHinweisSolltenSie); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + + EingabeImageTechnisch_GUI.this.setVisible(false); + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton cancelButton = new JButton("Zur\u00FCck"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if(rdbtnInternetJa.isSelected()==true) + { + Image.image.setInternet(true); + } + else + { + Image.image.setInternet(false); + } + + if(rdbtnlicenseJa.isSelected()==true) + { + Image.image.setLicensed(true); + } + else + { + Image.image.setLicensed(false); + } + Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); + + EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); + sr.setVisible(true); + dispose(); + } + }); + cancelButton.setActionCommand("OK"); + buttonPane.add(cancelButton); + //getRootPane().setDefaultButton(cancelButton); + } + { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + if(rdbtnInternetJa.isSelected()==true) + { + Image.image.setInternet(true); + } + else + { + Image.image.setInternet(false); + } + + if(rdbtnlicenseJa.isSelected()==true) + { + Image.image.setLicensed(true); + } + else + { + Image.image.setLicensed(false); + } + Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); + FTPUploader_GUI ea=new FTPUploader_GUI(); + ea.setVisible(true); + dispose(); + + } + }); + continueButton.setActionCommand("Cancel"); + buttonPane.add(continueButton); + getRootPane().setDefaultButton(continueButton); + } + } + + 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/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java new file mode 100644 index 00000000..43f43e99 --- /dev/null +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -0,0 +1,370 @@ +package gui.image; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Toolkit; +import java.io.File; + +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.SwingConstants; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; + +import ftp.DownloadTask; + +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.SystemColor; +import java.awt.Font; +import javax.swing.JTextPane; +import javax.swing.JSeparator; + +import models.Image; + +import org.apache.thrift.TException; + +import server.Server.Client; +import server.User; +import thrift.ThriftConnection; + +@SuppressWarnings("serial") +public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener { + + @SuppressWarnings("unused") + private JPanel contentPane; + private final JPanel contentPanel = new JPanel(); + JLabel lblNewLabel; + JLabel downspeed; + User user; + JProgressBar progressBar; + String host = "141.79.128.121"; + int port = 21; + String username = "openslx"; + String password = "openslx-ng"; + String downloadFile = ""; + static String arg = ""; + DownloadTask task; + JLabel bytesreadlbl; + JLabel lblNewLabel_3; + JLabel labelVerbleibend; + long filesize; + double speed; + long bytesread; + JLabel labelZeit; + boolean taskrun = false; + ThriftConnection thrift = new ThriftConnection(); + Client client = thrift.getThriftConnection(); + JButton buttonback = new JButton("Zur\u00FCck"); + + /** + * Launch the application. + */ + /* + * public static void main(String[] args) { EventQueue.invokeLater(new + * Runnable() { public void run() { try { FTPDownloader frame = new + * FTPDownloader(); frame.setVisible(true); } catch (Exception e) { + * e.printStackTrace(); } } }); } + */ + + /** + * Create the frame. + */ + public FTPDownloader_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + if (taskrun == true) { + try { + client.DeleteFtpUser(user.userName); + thrift.closeThriftConnection(); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + dispose(); + } + }); + setResizable(false); + // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + + + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + + setBackground(Color.WHITE); + setTitle("Dozentenmodul *Prototyp*"); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + getContentPane().setLayout(new BorderLayout()); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel, BorderLayout.CENTER); + contentPanel.setLayout(null); + { + JButton btnSpeicherortAuswhlen = new JButton( + "Speicherort ausw\u00E4hlen"); + btnSpeicherortAuswhlen.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + JFileChooser fc = new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + + fc.showOpenDialog(getParent()); + File dir = fc.getSelectedFile(); + lblNewLabel.setText(dir.getAbsolutePath()); + } + }); + + btnSpeicherortAuswhlen.setBounds(57, 124, 141, 23); + btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); + btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); + contentPanel.add(btnSpeicherortAuswhlen); + } + + lblNewLabel = new JLabel("C:\\"); + lblNewLabel.setBounds(208, 124, 238, 23); + contentPanel.add(lblNewLabel); + + JButton btnDownloadStarten = new JButton("Download starten"); + btnDownloadStarten.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + buttonDownloadActionPerformed(arg0); + } + }); + + btnDownloadStarten.setBounds(57, 168, 141, 23); + contentPanel.add(btnDownloadStarten); + + progressBar = new JProgressBar(0, 100); + progressBar.setStringPainted(true); + + progressBar.setBounds(57, 202, 497, 30); + contentPanel.add(progressBar); + + JLabel lblDownloadgeschwindigkeit = new JLabel( + "Downloadgeschwindigkeit:"); + lblDownloadgeschwindigkeit.setBounds(57, 243, 141, 14); + contentPanel.add(lblDownloadgeschwindigkeit); + + downspeed = new JLabel("0"); + downspeed.setBounds(308, 243, 95, 14); + contentPanel.add(downspeed); + + JLabel lblNewLabel_1 = new JLabel("Fertig:"); + lblNewLabel_1.setBounds(57, 293, 46, 14); + contentPanel.add(lblNewLabel_1); + + bytesreadlbl = new JLabel(""); + bytesreadlbl.setBounds(66, 244, 108, 14); + contentPanel.add(bytesreadlbl); + + JLabel lblNewLabel_2 = new JLabel("von:"); + lblNewLabel_2.setBounds(226, 293, 46, 14); + contentPanel.add(lblNewLabel_2); + + lblNewLabel_3 = new JLabel(""); + lblNewLabel_3.setBounds(235, 244, 108, 14); + contentPanel.add(lblNewLabel_3); + + JLabel lblMbVerbleibend = new JLabel("Verbleibend:"); + lblMbVerbleibend.setBounds(57, 318, 71, 14); + contentPanel.add(lblMbVerbleibend); + + labelVerbleibend = new JLabel(""); + labelVerbleibend.setBounds(91, 269, 108, 14); + contentPanel.add(labelVerbleibend); + + JLabel lblGeschtzteVerbleibendeZeit = new JLabel( + "Gesch\u00E4tzte Verbleibende Zeit:"); + lblGeschtzteVerbleibendeZeit.setBounds(57, 268, 150, 14); + contentPanel.add(lblGeschtzteVerbleibendeZeit); + + labelZeit = new JLabel(""); + labelZeit.setBounds(261, 219, 117, 14); + contentPanel.add(labelZeit); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + contentPanel.add(panel); + + JLabel label = new JLabel("Eingabe Ihrer Daten"); + label.setFont(new Font("Tahoma", Font.BOLD, 18)); + label.setBounds(10, 11, 509, 22); + panel.add(label); + + JTextPane textPane = new JTextPane(); + textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + textPane.setEditable(false); + textPane.setBackground(SystemColor.menu); + textPane.setBounds(10, 36, 509, 32); + panel.add(textPane); + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 79, 597, 2); + contentPanel.add(separator); + + JLabel label_1 = new JLabel("Hauptmen\u00FC"); + label_1.setForeground(Color.BLUE); + label_1.setBounds(20, 88, 61, 20); + contentPanel.add(label_1); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(80, 91, 14, 14); + contentPanel.add(label_2); + + JLabel label_3 = new JLabel("VL-Image"); + label_3.setForeground(Color.BLUE); + label_3.setBounds(91, 88, 46, 20); + contentPanel.add(label_3); + + JLabel label_4 = new JLabel(">"); + label_4.setBounds(139, 91, 14, 14); + contentPanel.add(label_4); + + JLabel label_5 = new JLabel("Neu/Bearbeiten"); + label_5.setBounds(149, 91, 108, 14); + contentPanel.add(label_5); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(-10, 648, 597, 2); + contentPanel.add(separator_1); + + JLabel label_6 = new JLabel("1."); + label_6.setBounds(24, 128, 23, 14); + contentPanel.add(label_6); + + JLabel label_7 = new JLabel("2."); + label_7.setBounds(24, 172, 23, 14); + contentPanel.add(label_7); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBackground(UIManager.getColor("Button.background")); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane, BorderLayout.SOUTH); + { + buttonback.setEnabled(false); + buttonback.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + if (taskrun == true) { + task.cancel(true); + try { + client.DeleteFtpUser(user.userName); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + thrift.closeThriftConnection(); + SearchEditImage_GUI se=new SearchEditImage_GUI(); + se.setVisible(true); + dispose(); + } + }); + buttonback.setActionCommand("Cancel"); + buttonPane.add(buttonback); + } + } + setVisible(true); + + } + + private void buttonDownloadActionPerformed(ActionEvent event) { + + progressBar.setValue(0); + + try { + user = client.getFtpUser(); + + downloadFile=client.getPathOfImage(Image.image.getImageId(),Image.image.getVersion()); + + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + task = new DownloadTask(host, port, user.userName, user.password, + downloadFile, lblNewLabel.getText(), this); + task.addPropertyChangeListener(this); + task.execute(); + taskrun = true; + + } + + public void propertyChange(PropertyChangeEvent arg0) { + + int progress = 0; + if ("progress" == arg0.getPropertyName()) { + progress = (Integer) arg0.getNewValue(); + progressBar.setValue(progress); + if (progress == 100) { + buttonback.setEnabled(true); + } + } + + if ("speed" == arg0.getPropertyName()) { + speed = (double) arg0.getNewValue(); + // if(speed<=1){ + + downspeed.setText(String.valueOf(speed).substring(0, + String.valueOf(speed).lastIndexOf(".") + 3) + + " MB/s"); + + // }else + // { + // double MBSpeed=speed/1024; + // downspeed.setText(String.valueOf((MBSpeed)).substring(0, + // String.valueOf(MBSpeed).indexOf("."))); + // } + + } + if ("bytesread" == arg0.getPropertyName()) { + bytesread = (long) arg0.getNewValue(); + bytesreadlbl.setText((bytesread / 1024 / 1024) + " MB"); + labelVerbleibend + .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) + + " MB"); + + labelZeit + .setText(String + .valueOf( + ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) + .substring( + 0, + String.valueOf( + (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + .lastIndexOf(".")) + + " Minuten"); + + } + if ("filesize" == arg0.getPropertyName()) { + filesize = (long) arg0.getNewValue(); + lblNewLabel_3.setText((filesize / 1024 / 1024) + " MB"); + + } + + } +} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java new file mode 100644 index 00000000..c8a23428 --- /dev/null +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -0,0 +1,428 @@ +package gui.image; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.EventQueue; +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.WindowAdapter; +import java.awt.event.WindowEvent; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.File; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.JSeparator; +import javax.swing.JTextPane; +import javax.swing.SwingConstants; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import models.Image; +import models.person; +//import models.person; + +import org.apache.thrift.TException; + +import server.Server.Client; +import thrift.ThriftConnection; +import ftp.UploadTask; +import gui.intro.MainMenue_GUI; + + +@SuppressWarnings("serial") +public class FTPEditUploader_GUI extends JFrame implements PropertyChangeListener { + + @SuppressWarnings("unused") + private JPanel contentPane; + private final JPanel contentPanel = new JPanel(); + JLabel lblNewLabel; + JProgressBar progressBar; + String host="141.79.128.121"; + int port=21; + server.User user; + String filename=""; + File uploadFile; + static String arg=""; + UploadTask task; + JLabel UpSpeed; + JLabel labelfertig; + JLabel labelfilesize; + JLabel labelZeit; + JLabel labelverbleibend; + long filesize; + double speed; + long bytesread; + boolean taskrun=false; + ThriftConnection thrift=new ThriftConnection(); + Client client=thrift.getThriftConnection(); + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + FTPEditUploader_GUI frame = new FTPEditUploader_GUI(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public FTPEditUploader_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + if(taskrun==true) + { + try { + + client.DeleteFtpUser(user.userName); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + } + }); + setResizable(false); + //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + + + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + //filename=name; + setBackground(Color.WHITE); + setTitle("Dozentenmodul *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, 250); + getContentPane().setLayout(new BorderLayout()); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel, BorderLayout.CENTER); + contentPanel.setLayout(null); + { + JButton btnSpeicherortAuswhlen = new JButton("VMDK ausw\u00E4hlen"); + btnSpeicherortAuswhlen.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + JFileChooser fc=new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.FILES_ONLY); + + fc.showOpenDialog(getParent()); + File dir=fc.getSelectedFile(); + uploadFile=dir; + filename=uploadFile.getName(); + lblNewLabel.setText(dir.getAbsolutePath()); + } + }); + + btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23); + btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); + btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); + contentPanel.add(btnSpeicherortAuswhlen); + } + + lblNewLabel = new JLabel(""); + lblNewLabel.setBounds(184, 124, 255, 23); + contentPanel.add(lblNewLabel); + + JButton btnDownloadStarten = new JButton("Upload starten"); + btnDownloadStarten.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + buttonUploadActionPerformed(arg0); + + } + }); + + btnDownloadStarten.setBounds(10, 330, 141, 23); + contentPanel.add(btnDownloadStarten); + + progressBar = new JProgressBar(0,100); + progressBar.setStringPainted(true); + + + progressBar.setBounds(10, 158, 577, 30); + contentPanel.add(progressBar); + + JLabel label = new JLabel("Downloadgeschwindigkeit:"); + label.setBounds(10, 199, 141, 14); + contentPanel.add(label); + + JLabel label_1 = new JLabel("Fertig:"); + label_1.setBounds(10, 249, 46, 14); + contentPanel.add(label_1); + + labelfertig = new JLabel("0"); + labelfertig.setBounds(66, 249, 108, 14); + contentPanel.add(labelfertig); + + UpSpeed = new JLabel("0"); + UpSpeed.setBounds(329, 199, 95, 14); + contentPanel.add(UpSpeed); + + JLabel label_4 = new JLabel("von:"); + label_4.setBounds(184, 249, 46, 14); + contentPanel.add(label_4); + + labelfilesize = new JLabel("0"); + labelfilesize.setBounds(240, 249, 108, 14); + contentPanel.add(labelfilesize); + + JLabel label_6 = new JLabel("Verbleibend:"); + label_6.setBounds(10, 274, 71, 14); + contentPanel.add(label_6); + + JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); + label_7.setBounds(10, 224, 150, 14); + contentPanel.add(label_7); + + labelZeit = new JLabel("0"); + labelZeit.setBounds(329, 224, 117, 14); + contentPanel.add(labelZeit); + + labelverbleibend = new JLabel("0"); + labelverbleibend.setBounds(91, 274, 108, 14); + contentPanel.add(labelverbleibend); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + contentPanel.add(panel); + + JLabel label_2 = new JLabel("Eingabe Ihrer Daten"); + label_2.setFont(new Font("Tahoma", Font.BOLD, 18)); + label_2.setBounds(10, 11, 509, 22); + panel.add(label_2); + + JTextPane textPane = new JTextPane(); + textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + textPane.setEditable(false); + textPane.setBackground(SystemColor.menu); + textPane.setBounds(10, 36, 509, 32); + panel.add(textPane); + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 79, 597, 2); + contentPanel.add(separator); + + JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); + lblNewLabel_1.setForeground(Color.BLUE); + lblNewLabel_1.setBounds(20, 88, 61, 20); + contentPanel.add(lblNewLabel_1); + + JLabel label_3 = new JLabel(">"); + label_3.setBounds(80, 91, 14, 14); + contentPanel.add(label_3); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(91, 88, 46, 20); + contentPanel.add(lblVlimage); + + JLabel label_5 = new JLabel(">"); + label_5.setBounds(139, 91, 14, 14); + contentPanel.add(label_5); + + JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); + lblNeubearbeiten.setBounds(149, 91, 108, 14); + contentPanel.add(lblNeubearbeiten); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(0, 627, 597, 2); + contentPanel.add(separator_1); + + JButton btnCopyFileTo = new JButton("Copy File to Prod"); + btnCopyFileTo.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + client.startFileCopy(user.path+"/"+uploadFile.getName()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + }); + btnCopyFileTo.setBounds(10, 375, 264, 23); + contentPanel.add(btnCopyFileTo); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBackground(UIManager.getColor("Button.background")); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane, BorderLayout.SOUTH); + { + JButton ButtonReady = new JButton("Abschlie\u00DFen"); + ButtonReady.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + updateData(); + dispose(); + MainMenue_GUI m=new MainMenue_GUI(); + m.setVisible(true); + + if(taskrun==true) + { + try { + client.DeleteFtpUser(user.userName); + + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + thrift.closeThriftConnection(); + } + }); + + JButton buttonCancel = new JButton("Schlie\u00DFen"); + buttonCancel.setActionCommand("Cancel"); + buttonPane.add(buttonCancel); + ButtonReady.setActionCommand("Cancel"); + buttonPane.add(ButtonReady); + } + } + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnHillfe = new JMenu("Hillfe"); + menuBar.add(mnHillfe); + setVisible(true); + + } + + private void buttonUploadActionPerformed(ActionEvent event) { + // File (or directory) with old name + // File file = new File(lblNewLabel.getText()); + + // File (or directory) with new name + //System.out.println(file.getAbsolutePath().substring(0,file.getAbsolutePath().lastIndexOf("\\"))+"\\"+vm.vl.getLaborname()+".vmdk"); + //File file2 = new File(file.getAbsoluteFile()+"\\"+vm.vl.getLaborname()+".vmdk"); + + + // Rename file (or directory) + //boolean success = file.renameTo(file2); + //if (!success) { + // File was not successfully renamed + //System.out.println("Not OK"); + //} + //else + //{ + //System.out.println("OK"); + //} + progressBar.setValue(0); + + try { + user=client.getFtpUser(); + System.out.println("name"+user.userName); + System.out.println("path"+user.path); + System.out.println("pass"+user.password); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); + Image.image.setNewName(formatter.format(new Date()) + "_" + + person.verantwortlicher.getHochschule() + "_" + + person.verantwortlicher.getUsername() + "_" + + Image.image.getImagename() + ".vmdk"); + task=new UploadTask(host,port,user.userName,user.password,user.path, uploadFile); + + task.addPropertyChangeListener(this); + task.execute(); + taskrun=true; + + //createXML(); + //TransferToSatellit(); + + + } + + public void propertyChange(PropertyChangeEvent arg0) { + if ("progress" == arg0.getPropertyName()) { + int progress = (Integer) arg0.getNewValue(); + progressBar.setValue(progress); + } + if("speed"==arg0.getPropertyName()){ + speed=(double)arg0.getNewValue(); + //if(speed<=1){ + + UpSpeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s"); + + // }else + //{ + //double MBSpeed=speed/1024; + //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf("."))); + //} + + } + if("bytesread"==arg0.getPropertyName()) + { + bytesread=(long)arg0.getNewValue(); + labelfertig.setText((bytesread/1024/1024)+" MB"); + labelverbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB"); + + + labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten"); + + + } + if("filesize"==arg0.getPropertyName()) + { + filesize=(long)arg0.getNewValue(); + labelfilesize.setText((filesize/1024/1024)+" MB"); + + } + + } + + public boolean updateData(){ + + try { + + + System.out.println("Start Update"); + client.updateImageData(Image.image.getImagename(),Image.image.getNewName(), Image.image.isLicensed(), Image.image.isInternet(), Image.image.getRam(), Image.image.getCpu(),Image.image.getImageId(),Image.image.getVersion()); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return false; + } + return true; + + + } +} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/image/FTPUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPUploader_GUI.java new file mode 100644 index 00000000..250347b0 --- /dev/null +++ b/Dozentenmodul/src/gui/image/FTPUploader_GUI.java @@ -0,0 +1,483 @@ +package gui.image; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.EventQueue; +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.WindowAdapter; +import java.awt.event.WindowEvent; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.File; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.JSeparator; +import javax.swing.JTextPane; +import javax.swing.SwingConstants; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import models.Image; +import models.person; +import org.apache.thrift.TException; +import server.Server.Client; +import thrift.ThriftConnection; +//import util.XMLCreator; +import ftp.UploadTask; +import gui.intro.MainMenue_GUI; + +@SuppressWarnings("serial") +public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { + + @SuppressWarnings("unused") + private JPanel contentPane; + private final JPanel contentPanel = new JPanel(); + JLabel lblNewLabel; + JProgressBar progressBar; + String host = "141.79.128.121"; + int port = 21; + server.User user; + String filename = ""; + File uploadFile; + static String arg = ""; + UploadTask task; + JLabel UpSpeed; + JLabel labelfertig; + JLabel labelfilesize; + JLabel labelZeit; + JLabel labelverbleibend; + long filesize; + double speed; + long bytesread; + boolean taskrun = false; + ThriftConnection thrift = new ThriftConnection(); + Client client = thrift.getThriftConnection(); + JButton finishButton = new JButton("Fertigstellen"); + JButton btnUploadStarten = new JButton("Upload auf Server starten"); + JButton btnZurck = new JButton("Zur\u00FCck"); + int progress = 0; // progress of upload + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + FTPUploader_GUI frame = new FTPUploader_GUI(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public FTPUploader_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + if (taskrun == true) { + try { + + client.DeleteFtpUser(user.userName); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + } + }); + setResizable(false); + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + // filename=name; + setBackground(Color.WHITE); + setTitle("Dozentenmodul *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, 250); + getContentPane().setLayout(new BorderLayout()); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel, BorderLayout.CENTER); + contentPanel.setLayout(null); + { + JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen"); + btnSpeicherortAuswhlen.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + JFileChooser fc = new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.FILES_ONLY); + + fc.showOpenDialog(getParent()); + File file = fc.getSelectedFile(); + // check if a file is selected and exists + if (file != null) { + System.out.println("File to upload exists"); + uploadFile = file; + filename = uploadFile.getName(); + lblNewLabel.setText(file.getAbsolutePath()); + } else { + System.out.println("No file selected"); + lblNewLabel.setText(""); + }// end if + } + }); + + btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); + btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); + contentPanel.add(btnSpeicherortAuswhlen); + } + + lblNewLabel = new JLabel(""); + lblNewLabel.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent arg0) { + if (lblNewLabel.getText().isEmpty()) { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(false); + } else { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(true); + } + } + }); + lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT); + lblNewLabel.setBounds(285, 124, 302, 23); + contentPanel.add(lblNewLabel); + + btnUploadStarten.setEnabled(false); + btnUploadStarten.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + buttonUploadActionPerformed(arg0); + + } + }); + + btnUploadStarten.setBounds(102, 168, 173, 23); + contentPanel.add(btnUploadStarten); + + progressBar = new JProgressBar(0, 100); + progressBar.setStringPainted(true); + + progressBar.setBounds(102, 202, 485, 30); + contentPanel.add(progressBar); + + JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:"); + lblUploadgeschwindigkeit.setBounds(102, 243, 141, 14); + contentPanel.add(lblUploadgeschwindigkeit); + + JLabel label_1 = new JLabel("Fertig:"); + label_1.setBounds(102, 293, 46, 14); + contentPanel.add(label_1); + + labelfertig = new JLabel("0"); + labelfertig.setHorizontalAlignment(SwingConstants.LEFT); + labelfertig.setBounds(183, 293, 108, 14); + contentPanel.add(labelfertig); + + UpSpeed = new JLabel("0"); + UpSpeed.setHorizontalAlignment(SwingConstants.LEFT); + UpSpeed.setBounds(374, 243, 117, 14); + contentPanel.add(UpSpeed); + + JLabel label_4 = new JLabel("von:"); + label_4.setBounds(318, 293, 46, 14); + contentPanel.add(label_4); + + labelfilesize = new JLabel("0"); + labelfilesize.setHorizontalAlignment(SwingConstants.LEFT); + labelfilesize.setBounds(374, 293, 117, 14); + contentPanel.add(labelfilesize); + + JLabel label_6 = new JLabel("Verbleibend:"); + label_6.setBounds(102, 318, 71, 14); + contentPanel.add(label_6); + + JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); + label_7.setBounds(102, 268, 150, 14); + contentPanel.add(label_7); + + labelZeit = new JLabel("0"); + labelZeit.setHorizontalAlignment(SwingConstants.LEFT); + labelZeit.setBounds(374, 268, 117, 14); + contentPanel.add(labelZeit); + + labelverbleibend = new JLabel("0"); + labelverbleibend.setHorizontalAlignment(SwingConstants.LEFT); + labelverbleibend.setBounds(183, 318, 108, 14); + contentPanel.add(labelverbleibend); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + contentPanel.add(panel); + + JLabel lblUploadIhresImage = new JLabel("Upload Ihres Image"); + lblUploadIhresImage.setFont(new Font("Tahoma", Font.BOLD, 18)); + lblUploadIhresImage.setBounds(10, 11, 509, 22); + panel.add(lblUploadIhresImage); + + JTextPane txtpnFhreSieBitte = new JTextPane(); + txtpnFhreSieBitte + .setText("F\u00FChre Sie bitte die folgenden 3 Schritte aus um Ihr Image auf unseren Server zu laden."); + txtpnFhreSieBitte.setEditable(false); + txtpnFhreSieBitte.setBackground(SystemColor.menu); + txtpnFhreSieBitte.setBounds(10, 36, 509, 32); + panel.add(txtpnFhreSieBitte); + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 79, 597, 2); + contentPanel.add(separator); + + JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); + lblNewLabel_1.setForeground(Color.BLUE); + lblNewLabel_1.setBounds(20, 88, 61, 20); + contentPanel.add(lblNewLabel_1); + + JLabel label_3 = new JLabel(">"); + label_3.setBounds(80, 91, 14, 14); + contentPanel.add(label_3); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(91, 88, 46, 20); + contentPanel.add(lblVlimage); + + JLabel label_5 = new JLabel(">"); + label_5.setBounds(139, 91, 14, 14); + contentPanel.add(label_5); + + JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); + lblNeubearbeiten.setBounds(149, 91, 108, 14); + contentPanel.add(lblNeubearbeiten); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(0, 627, 597, 2); + contentPanel.add(separator_1); + + JButton btnCopyFileTo = new JButton("Copy File to Prod"); + btnCopyFileTo.setEnabled(false); + btnCopyFileTo.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + System.out.println("Copying file to " + user.path + "/" + + uploadFile.getName()); + client.startFileCopy(user.path + "/" + uploadFile.getName()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + }); + btnCopyFileTo.setBounds(102, 343, 173, 23); + contentPanel.add(btnCopyFileTo); + + JLabel lblShritt = new JLabel("Schritt 1:"); + lblShritt.setBounds(24, 128, 57, 14); + contentPanel.add(lblShritt); + + JLabel lblSchritt = new JLabel("Schritt 2:"); + lblSchritt.setBounds(24, 172, 57, 14); + contentPanel.add(lblSchritt); + + JLabel lblSchritt_1 = new JLabel("Schritt 3:"); + lblSchritt_1.setBounds(20, 391, 57, 14); + contentPanel.add(lblSchritt_1); + + JLabel lblKlickenSieAuf = new JLabel( + "Klicken Sie auf \"Fertigstellen\"."); + lblKlickenSieAuf.setBounds(98, 391, 241, 14); + contentPanel.add(lblKlickenSieAuf); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBackground(UIManager.getColor("Button.background")); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane, BorderLayout.SOUTH); + { + finishButton.setEnabled(false); + finishButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + writeData(); + dispose(); + MainMenue_GUI m = new MainMenue_GUI(); + m.setVisible(true); + if (taskrun == true) { + try { + client.DeleteFtpUser(user.userName); + thrift.closeThriftConnection(); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + + } + }); + + btnZurck.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dispose(); + EingabeImageTechnisch_GUI m = new EingabeImageTechnisch_GUI(); + m.setVisible(true); + } + }); + btnZurck.setActionCommand("Cancel"); + buttonPane.add(btnZurck); + finishButton.setActionCommand("Cancel"); + buttonPane.add(finishButton); + } + } + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnHillfe = new JMenu("Hillfe"); + menuBar.add(mnHillfe); + setVisible(true); + + } + + private void buttonUploadActionPerformed(ActionEvent event) { + + progressBar.setValue(0); + btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick + // und + + try { + user = client.getFtpUser(); + System.out.println("name" + user.userName); + System.out.println("path" + user.path); + System.out.println("pass" + user.password); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); + + System.out.println(formatter.format(new Date()) + "_" + + person.verantwortlicher.getHochschule() + "_" + + person.verantwortlicher.getUsername() + "_" + + Image.image.getImagename() + ".vmdk"); + Image.image.setNewName(formatter.format(new Date()) + "_" + + person.verantwortlicher.getHochschule() + "_" + + person.verantwortlicher.getUsername() + "_" + + Image.image.getImagename() + ".vmdk"); + task = new UploadTask(host, port, user.userName, user.password, + user.path, uploadFile); + + task.addPropertyChangeListener(this); + task.execute(); + taskrun = true; + + } + + public void propertyChange(PropertyChangeEvent arg0) { + progress = 0; + if ("progress" == arg0.getPropertyName()) { + progress = (Integer) arg0.getNewValue(); + progressBar.setValue(progress); + + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 100) { + finishButton.setEnabled(true); + + } + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + } + + } + + if ("speed" == arg0.getPropertyName()) { + speed = (double) arg0.getNewValue(); + // if(speed<=1){ + + UpSpeed.setText(String.valueOf(speed).substring(0, + String.valueOf(speed).lastIndexOf(".") + 3) + + " MB/s"); + + } + if ("bytesread" == arg0.getPropertyName()) { + bytesread = (long) arg0.getNewValue(); + labelfertig.setText((bytesread / 1024 / 1024) + " MB"); + labelverbleibend + .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) + + " MB"); + + labelZeit + .setText(String + .valueOf( + ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) + .substring( + 0, + String.valueOf( + (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + .lastIndexOf(".")) + + " Minuten"); + + } + if ("filesize" == arg0.getPropertyName()) { + filesize = (long) arg0.getNewValue(); + labelfilesize.setText((filesize / 1024 / 1024) + " MB"); + + } + + } + + public boolean writeData() { + + try { + + client.writeVLdata(Image.image.getImagename(), + person.verantwortlicher.getVorname(), + person.verantwortlicher.getName(), + person.verantwortlicher.getHochschule(), + person.verantwortlicher.getEMail(), + person.verantwortlicher.getTel(), + person.verantwortlicher.getFakultät(), + Image.image.isLicensed(), Image.image.isInternet(), + Image.image.getRam(), Image.image.getCpu(), + "/srv/openslx/nfs/temp/" + Image.image.getNewName()); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return false; + } + return true; + + } +} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java new file mode 100644 index 00000000..b7f661b5 --- /dev/null +++ b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java @@ -0,0 +1,514 @@ +package gui.image; + +import gui.intro.MainMenue_GUI; +import gui.lecture.ExtendedSearchForImages_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 SearchEditImage_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JComboBox comboBox; + JTable tableAllImages; + JTable tablemyImages; + private JTextField textFieldName; + JTabbedPane tabbedPane; + String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", + "Verantwortlicher", "Letztes Update", "Schlagwort", "ID", "Version" }; + ThriftConnection con = new ThriftConnection(); + Client client = con.getThriftConnection(); + final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); + final DefaultTableModel modelMyImages = new DefaultTableModel(titles, 0); + final TableRowSorter rowSorterAll = new TableRowSorter( + modelAll); + final TableRowSorter rowSorterMyImages = new TableRowSorter( + modelMyImages); + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + SearchEditImage_GUI dialog = new SearchEditImage_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public SearchEditImage_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 VL-Image"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie + .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 531); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 49, 557, 131); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); + lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); + panel_1.add(lblInternetIstInnerhalb); + + textFieldName = new JTextField(); + // 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)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + textFieldName.getText(), 0)); + + } + } + }); + + textFieldName.setBounds(270, 30, 250, 20); + panel_1.add(textFieldName); + textFieldName.setColumns(10); + + JLabel lblErweiterteSuche = new JLabel( + "Erweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + // Öffnet das Fenster Extended GUI + con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + comboBox = new JComboBox(); + try { + // Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server + List list = client.getAllOS(); + // Leeres Item hinzufügen + comboBox.addItem(""); + for (int i = 0; i < list.size(); i++) { + // Hinzufügen der verfügbaren Betriebssysteme + comboBox.addItem(list.get(i)); + } + } catch (TException e2) { + // TODO Auto-generated catch block + e2.printStackTrace(); + } + // Registriert Auswahländerungen der Box + comboBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + // Prüft das die Auswahl nicht leer ist + if (comboBox.getSelectedItem().toString() != "") { + // Filtert nach dem ausgewählten Betriebssystem + rowSorterAll.setRowFilter(RowFilter.regexFilter(comboBox + .getSelectedItem().toString(), 2)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + comboBox.getSelectedItem().toString(), 2)); + } + } + + }); + 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) { + // Öffnet das Hauütmenü + con.closeThriftConnection(); + SearchEditImage_GUI.this.setVisible(false); + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); + lblNewLabel_1.setBounds(146, 11, 85, 14); + contentPanel.add(lblNewLabel_1); + + 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"; + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + username, 4)); + } else if (tabbedPane.getSelectedIndex() == 1) { + + } + + } + }); + + tabbedPane.setBounds(10, 197, 557, 300); + contentPanel.add(tabbedPane); + initTableModel(modelMyImages); + + 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(); + initTableModel(modelAll); + + JScrollPane scrollPaneMyImage = new JScrollPane(); + tablemyImages = new JTable(); + tablemyImages.setModel(modelMyImages); + 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(); + tablemyImages.setRowSorter(rowSorterMyImages); + + scrollPaneMyImage.setViewportView(tablemyImages); + tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); + tableAllImages.setRowSorter(rowSorterAll); + + scrollPaneAllImages.setViewportView(tableAllImages); + 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 Images", 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 (tablemyImages.getSelectedRow() != -1) { + String imageid = modelMyImages.getValueAt( + tablemyImages.convertRowIndexToModel(tablemyImages + .getSelectedRow()), 7).toString(); + + Image.image.setImageId(imageid); + String imageversion = modelMyImages.getValueAt( + tablemyImages.convertRowIndexToModel(tablemyImages + .getSelectedRow()), 8).toString(); + + Image.image.setVersion(imageversion); + SearchEditImage_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 = modelMyImages + .getValueAt( + tablemyImages + .convertRowIndexToModel(tablemyImages + .getSelectedRow()), + 7).toString(); + + Image.image.setImageId(imageid); + String imageversion = modelMyImages + .getValueAt( + tablemyImages + .convertRowIndexToModel(tablemyImages + .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 images; + try { + // Hole eine Liste der Images + images = client.getImageList(); + + Iterator i = images.iterator(); + + int x = 0; + + while (i.hasNext()) { + // erzeuge Objekte für die Tabelle + Object[] obj = { images.get(x).getImageName(), + images.get(x).getLicenseRestriction(), + images.get(x).getOsName(), + images.get(x).getLectureName(), + images.get(x).getUserData(), + images.get(x).getUpdateTime(), "", images.get(x).id, + images.get(x).getVersion() }; + // 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; + } + +} diff --git a/Dozentenmodul/src/gui/image/SearchImage_GUI.java b/Dozentenmodul/src/gui/image/SearchImage_GUI.java new file mode 100644 index 00000000..493230d3 --- /dev/null +++ b/Dozentenmodul/src/gui/image/SearchImage_GUI.java @@ -0,0 +1,459 @@ +package gui.image; + +import gui.intro.MainMenue_GUI; +import gui.lecture.ExtendedSearchForImages_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.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 org.apache.thrift.TException; + +import server.Server.Client; +import thrift.ThriftConnection; + +@SuppressWarnings("serial") +public class SearchImage_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JComboBox comboBox; + JTable tableAllImages; + JTable tablemyImages; + private JTextField textFieldName; + JTabbedPane tabbedPane; + String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", + "Verantwortlicher", "Letztes Update", "Schlagwort" }; + ThriftConnection con = new ThriftConnection(); + Client client = con.getThriftConnection(); + final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); + final DefaultTableModel modelMyImages = new DefaultTableModel(titles, 0); + final TableRowSorter rowSorterAll = new TableRowSorter( + modelAll); + final TableRowSorter rowSorterMyImages = new TableRowSorter( + modelMyImages); + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + SearchImage_GUI dialog = new SearchImage_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public SearchImage_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + // Beendet die Anwendung nach klick auf X + 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 VL-Image"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie + .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 531); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 49, 557, 131); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); + lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); + panel_1.add(lblInternetIstInnerhalb); + + textFieldName = new JTextField(); + // 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)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + textFieldName.getText(), 0)); + + } + } + }); + + textFieldName.setBounds(270, 30, 250, 20); + panel_1.add(textFieldName); + textFieldName.setColumns(10); + + JLabel lblErweiterteSuche = new JLabel( + "Erweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + // Öffnet das Fenster Extended GUI + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + comboBox = new JComboBox(); + try { + // Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server + List list = client.getAllOS(); + // Leeres Item hinzufügen + comboBox.addItem(""); + for (int i = 0; i < list.size(); i++) { + // Hinzufügen der verfügbaren Betriebssysteme + comboBox.addItem(list.get(i)); + } + } catch (TException e2) { + // TODO Auto-generated catch block + e2.printStackTrace(); + } + // Registriert Auswahländerungen der Box + comboBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + // Prüft das die Auswahl nicht leer ist + if (comboBox.getSelectedItem().toString() != "") { + // Filtert nach dem ausgewählten Betriebssystem + rowSorterAll.setRowFilter(RowFilter.regexFilter(comboBox + .getSelectedItem().toString(), 2)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + comboBox.getSelectedItem().toString(), 2)); + } + } + + }); + 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) { + // Öffnet das Hauütmenü + SearchImage_GUI.this.setVisible(false); + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); + lblNewLabel_1.setBounds(146, 11, 85, 14); + contentPanel.add(lblNewLabel_1); + + tabbedPane = new JTabbedPane(JTabbedPane.TOP); + tabbedPane.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent arg0) { + System.out.println(tabbedPane.getSelectedIndex()); + if (tabbedPane.getSelectedIndex() == 0) { + + } else if (tabbedPane.getSelectedIndex() == 1) { + String username = "Spitzer Tobias"; + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + username, 4)); + // rowSorterMyImages.toggleSortOrder(0); + } + + } + }); + + tabbedPane.setBounds(10, 197, 557, 300); + contentPanel.add(tabbedPane); + + JScrollPane scrollPaneMyImage = new JScrollPane(); + tablemyImages = new JTable(); + tablemyImages.setModel(modelMyImages); + 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(); + initTableModel(modelMyImages); + tablemyImages.setRowSorter(rowSorterMyImages); + + 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(); + initTableModel(modelAll); + tableAllImages.setRowSorter(rowSorterAll); + + 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); + 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 + FTPDownloader_GUI down = new FTPDownloader_GUI(); + down.setVisible(true); + SearchImage_GUI.this.setVisible(false); + } + }); + 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 cancelButton = new JButton("Zur\u00FCck"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + // Öffnet das Hauptmenü + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + dispose(); + } + }); + cancelButton.setActionCommand("OK"); + buttonPane.add(cancelButton); + getRootPane().setDefaultButton(cancelButton); + } + { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + con.closeThriftConnection(); + EditImageAllgemein_GUI ea = new EditImageAllgemein_GUI(); + ea.setVisible(true); + dispose(); + + } + }); + continueButton.setActionCommand("Cancel"); + buttonPane.add(continueButton); + } + } + + 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 images; + try { + // Hole eine Liste der Images + + images = client.getImageList(); + Iterator i = images.iterator(); + + int x = 0; + + while (i.hasNext()) { + // erzeuge Objekte für die Tabelle + Object[] obj = { images.get(x).getImageName(), + images.get(x).getLicenseRestriction(), + images.get(x).getOsName(), + images.get(x).getLectureName(), + images.get(x).getUserData(), + images.get(x).getUpdateTime() }; + // 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; + } + +} diff --git a/Dozentenmodul/src/gui/intro/BillOfRights_GUI.java b/Dozentenmodul/src/gui/intro/BillOfRights_GUI.java new file mode 100644 index 00000000..e4f37871 --- /dev/null +++ b/Dozentenmodul/src/gui/intro/BillOfRights_GUI.java @@ -0,0 +1,193 @@ +package gui.intro; + + +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.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.File; +import java.io.IOException; + +import javax.swing.JButton; +import javax.swing.JCheckBox; +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.JScrollPane; +import javax.swing.JSeparator; +import javax.swing.JTextArea; +import javax.swing.JTextPane; +import javax.swing.SwingConstants; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import org.ini4j.InvalidFileFormatException; +import org.ini4j.Wini; + + + +@SuppressWarnings("serial") +public class BillOfRights_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JButton fwdButton; + JCheckBox chckbxAkzeptieren; + + /** + * Create the dialog. + */ + public BillOfRights_GUI() { + setResizable(false); + + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + //Beendet das Programm beim Klick auf das X + System.exit(0); + } + }); + try { + //Setzt das Look & Feel auf das 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*"); + + //Zentiert das Fenster in der Bildschirmmitte + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top=(screenSize.height - 722) / 2; + int left=(screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 567, 60); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Hinweis"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Bitte lesen und best\u00E4tigen Sie folgende rechtliche Hinweise"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 22); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 95, 567, 485); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JTextArea txtrLoremIpsumDolor = new JTextArea(); + txtrLoremIpsumDolor.setWrapStyleWord(true); + txtrLoremIpsumDolor.setLineWrap(true); + txtrLoremIpsumDolor.setEditable(false); + JScrollPane scr=new JScrollPane(txtrLoremIpsumDolor); + scr.setBounds(0, 0, 567, 477); + txtrLoremIpsumDolor.setBounds(0, 0, 567, 477); + txtrLoremIpsumDolor.setText("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. \r\n\r\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. \r\n\r\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis. \r\n\r\nAt vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat. \r\n\r\nConsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus. \r\n\r\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. \r\n\r\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. \r\n\r\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo"); + + contentPanel.add(scr); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 630, 587, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + fwdButton = new JButton("Weiter"); + fwdButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); + ini.put("main", "BillOfRights",true); + ini.store(); + } catch (InvalidFileFormatException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + VmWareLink_GUI ac=new VmWareLink_GUI(); + ac.setVisible(true); + dispose(); + } + }); + fwdButton.setEnabled(false); + + buttonPane.add(fwdButton); + } + } + { + JSeparator separator = new JSeparator(); + separator.setBounds(0, 617, 587, 2); + getContentPane().add(separator); + } + { + JSeparator separator = new JSeparator(); + separator.setBounds(0, 82, 587, 2); + getContentPane().add(separator); + } + + chckbxAkzeptieren = new JCheckBox("Ja, ich akzeptiere die Vereinbarung. Benachrichtigung nicht mehr anzeigen."); + chckbxAkzeptieren.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent arg0) { + //Beim Akzeptieren der Bestätigung wird der Weiter-Button verfügbar gemacht + if(chckbxAkzeptieren.isSelected()==true) + { + + fwdButton.setEnabled(true); + + } + else + { + + } + } + }); + chckbxAkzeptieren.setBackground(SystemColor.menu); + chckbxAkzeptieren.setBounds(10, 587, 567, 23); + getContentPane().add(chckbxAkzeptieren); + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnNewMenu_1 = new JMenu("Hilfe"); + mnNewMenu_1.setHorizontalAlignment(SwingConstants.CENTER); + 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/intro/Login_GUI.java b/Dozentenmodul/src/gui/intro/Login_GUI.java new file mode 100644 index 00000000..586b8d13 --- /dev/null +++ b/Dozentenmodul/src/gui/intro/Login_GUI.java @@ -0,0 +1,252 @@ +package gui.intro; + + +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Image; +import java.awt.SystemColor; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.File; +import java.io.IOException; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import models.person; +import org.apache.thrift.TException; +import org.ini4j.Wini; +import thrift.MasterThriftConnection; +import thrift.ImageServer.Client; +import thrift.UserInfo; + +import config.config_file; + +@SuppressWarnings("serial") +public class Login_GUI extends JFrame { + + private JPanel contentPane; + private JTextField username; + private JPasswordField pass; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + // Prüfe und Erzeuge gegebenfalls Config + config_file cf = new config_file(); + boolean conf = cf.createConfig(); + if (conf == true) { + // Aufruf und Anzeige des Login Fensters + Login_GUI frame = new Login_GUI(); + frame.setVisible(true); + } else { + JOptionPane.showMessageDialog(null, + "Fehler beim erzeugen der Konfigurationsfile", + "Message", JOptionPane.ERROR_MESSAGE); + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Login_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + System.exit(0); + } + }); + + // Fenster darf nicht vergrößert werden + setResizable(false); + try { + // Setzt das Look and Feel auf System + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // Titel des Fensters setzen + setTitle("Dozentenmodul *Prototyp*"); + // Aktion die beim Schließen durchgeführt werden soll + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + // Größe des Fensters definieren + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 400) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 400); + // Erzeugen eines Panels + contentPane = new JPanel(); + // Hintergrund Farbe des Panels setzen + contentPane.setBackground(SystemColor.menu); + // Rahmen des Fensters setzen + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + // Layout setzen + contentPane.setLayout(null); + // Label für das Logo erzeugen + JLabel imgLabel = new JLabel(); + // Größe und Position des Logos festelegen + imgLabel.setBounds(150, 11, 350, 142); + // Pfadangabe des Logos + + ImageIcon icon = new ImageIcon(getClass().getResource( + "/Logo_bwLehrpool.png"), "Logo"); + // Skalierung des Logos + Image scaled = icon.getImage().getScaledInstance(270, 64, 0); + imgLabel.setIcon(new ImageIcon(scaled)); + // Hinzufügen des Logos in das Fenster + contentPane.add(imgLabel); + + // Erzeugen und Hinzufügen des Labels + JLabel LabelUser = new JLabel("bwIDM-Benutzername:"); + LabelUser.setBounds(111, 164, 134, 20); + contentPane.add(LabelUser); + + // Erzeugen und Hinzufügen des Textfeldes + username = new JTextField(); + username.setToolTipText("Bitte geben Sie Ihren bwIDM-Benutzernamen ein."); + username.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + performLogin(); + } + }); + username.setBounds(304, 164, 196, 20); + contentPane.add(username); + username.setColumns(10); + + // Erzeugen und Hinzufügen des Labels + JLabel LabelPass = new JLabel("bwIDM-Passwort:"); + LabelPass.setBounds(111, 195, 134, 20); + contentPane.add(LabelPass); + + // Erzeugen, Hinzufügen und definierung der Aktion des Buttons + JButton BtnLogin = new JButton("Login"); + BtnLogin.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + performLogin(); + }// end actionPerformed + }); + + BtnLogin.setBounds(304, 244, 196, 23); + contentPane.add(BtnLogin); + + // Erzeugen und Hinzufügen des Passwortfeldes + pass = new JPasswordField(); + pass.setToolTipText("Bitte geben Sie Ihr bwIDM-Passwort ein."); + pass.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + performLogin(); + } + }); + pass.setBounds(304, 195, 196, 20); + contentPane.add(pass); + }// end LoginGUI() + + //Versuche den Benutzer einzuloggen + public void performLogin() { + // Aufruf der Ldap Klasse, welche die Ldap überprüfung vornimmt + // Ldap check=new Ldap(); + boolean login = true; + // boolean login=check.LdapAuth(username.getText(), new + // String(pass.getPassword())); + MasterThriftConnection thrift = new MasterThriftConnection(); + Client client = thrift.getMasterThriftConnection(); + String token = null; + final thrift.SessionData result; + try { + String passText = new String(pass.getPassword()); + System.out.println(username.getText() + " " + passText); + result = client.authenticate(username.getText(), passText); + + } catch (thrift.AuthenticationException e) { + System.out.println("Authentifizierung fehlgeschlagen: " + e.message); + JOptionPane.showMessageDialog(null, + "Benutzeranmeldung fehlgeschlagen: Bitte Benutzername und Passwort überprüfen.", + "Anmeldung fehlgeschlagen", + JOptionPane.ERROR_MESSAGE); + + return; + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return; + } + System.out + .println("Konnte mich beim MasterServer authentifizieren. Meine Session-ID ist " + + result.sessionId + + ", mein Token für den Satelliten " + + result.authToken); + token = result.authToken; + if (login == true) { + + try { + Wini ini = new Wini(new File("C:\\Users\\" + + System.getProperty("user.name") + + "\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); + // Prüfe ob Bills Of Rights schon akzeptiert wurden, wenn nicht + // zeige diese an + if (ini.get("main", "BillOfRights", boolean.class) == false) { + // Erstellen einer Instanz der Aktionsauswahl + BillOfRights_GUI re = new BillOfRights_GUI(); + re.setVisible(true); + // Schließen des Fensters nach erfolgreichen Login + setVisible(false); + } else { + // Prüfe ob die Links zu vmware angezeigt werden sollen + if (ini.get("main", "vmware", boolean.class) == false) { + VmWareLink_GUI vm = new VmWareLink_GUI(); + vm.setVisible(true); + setVisible(false); + } else { + UserInfo user = client.getUserFromToken(token); + + String hochschule = user.eMail.substring(user.eMail + .indexOf("@") + 1, user.eMail.indexOf(".", + user.eMail.indexOf("@"))); + // System.out.println("hochschule="+hochschule); + + person.verantwortlicher.setUsername(username.getText()); + person.verantwortlicher.setName(user.lastName); + person.verantwortlicher.setVorname(user.firstName); + person.verantwortlicher.setEMail(user.eMail); + person.verantwortlicher.setHochschule(hochschule); + // Öffne das Hauprmenü + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + setVisible(false); + } + } + } catch (IOException | TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } else { + JOptionPane.showMessageDialog(null, "Login denied!", "Message", + JOptionPane.INFORMATION_MESSAGE); + } + }// end performLogin + +}// end class diff --git a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java new file mode 100644 index 00000000..5f9c2ad5 --- /dev/null +++ b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java @@ -0,0 +1,450 @@ +package gui.intro; + +import gui.image.DeleteImage_GUI; +import gui.image.EingabeImageAllgemein_GUI; +import gui.image.SearchEditImage_GUI; +import gui.lecture.EingabeLectureAllgemein_GUI; +import gui.lecture.SearchEditLecture_GUI; +import gui.lecture.SearchMethodLecture_GUI; + +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Toolkit; +import javax.swing.JFrame; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import java.awt.Color; +import javax.swing.JLabel; +import java.awt.Font; +import javax.swing.JTextPane; +import java.awt.SystemColor; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JSeparator; +import javax.swing.JRadioButton; +import javax.swing.SwingConstants; +import javax.swing.ButtonGroup; +import javax.swing.JMenuBar; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import javax.swing.ToolTipManager; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.border.TitledBorder; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.ScrollPane; +import javax.swing.JTextArea; +import javax.swing.ImageIcon; + +@SuppressWarnings("serial") +public class MainMenue_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + String descNewImage, descEditImage, descDeleteImage, descSearchImage, + descNewLecture, descEditLecture, descDeleteLecture, + descSearchLecture = ""; + JRadioButton rdbtnImageNew; + JRadioButton rdbtnImageEdit; + JRadioButton rdbtnImageSearchDownload; + JRadioButton rdbtnVeranstaltungNew; + JRadioButton rdbtnImageDelete; + JRadioButton rdbtnVeranstaltungEdit; + private final ButtonGroup buttonGroup = new ButtonGroup(); + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + MainMenue_GUI dialog = new MainMenue_GUI(); + dialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + }// end main + + /** + * Create the dialog. + */ + public MainMenue_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + System.exit(0); + } + }); + 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, 545, 366); + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 567, 69); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Hauptmen\u00FC"); + 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("Bitte w\u00E4hlen Sie ihre gew\u00FCnschte Aktion."); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 22); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 104, 567, 502); + contentPanel.setBackground(SystemColor.menu); + + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panelImage = new JPanel(); + panelImage.setBackground(SystemColor.menu); + panelImage.setBorder(new TitledBorder(null, "VL-Image", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panelImage.setBounds(10, 146, 270, 170); + contentPanel.add(panelImage); + panelImage.setLayout(null); + + rdbtnImageNew = new JRadioButton("Neu"); + rdbtnImageNew + .setToolTipText("Hier k\u00F6nnen Sie eine standard Laborvorlage downloaden"); + rdbtnImageNew.setBounds(6, 22, 159, 23); + panelImage.add(rdbtnImageNew); + rdbtnImageNew.setSelected(true); + buttonGroup.add(rdbtnImageNew); + rdbtnImageNew.setBackground(SystemColor.menu); + + rdbtnImageEdit = new JRadioButton("Bearbeiten"); + rdbtnImageEdit + .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); + rdbtnImageEdit.setBounds(6, 48, 185, 23); + panelImage.add(rdbtnImageEdit); + buttonGroup.add(rdbtnImageEdit); + rdbtnImageEdit.setHorizontalAlignment(SwingConstants.LEFT); + rdbtnImageEdit.setBackground(SystemColor.menu); + + rdbtnImageDelete = new JRadioButton("L\u00F6schen"); + rdbtnImageDelete.setEnabled(false); + buttonGroup.add(rdbtnImageDelete); + rdbtnImageDelete + .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); + rdbtnImageDelete.setHorizontalAlignment(SwingConstants.LEFT); + rdbtnImageDelete.setBackground(SystemColor.menu); + rdbtnImageDelete.setBounds(6, 74, 185, 23); + panelImage.add(rdbtnImageDelete); + + rdbtnImageSearchDownload = new JRadioButton("Suche und Download"); + rdbtnImageSearchDownload.setEnabled(false); + buttonGroup.add(rdbtnImageSearchDownload); + rdbtnImageSearchDownload + .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); + rdbtnImageSearchDownload.setHorizontalAlignment(SwingConstants.LEFT); + rdbtnImageSearchDownload.setBackground(SystemColor.menu); + rdbtnImageSearchDownload.setBounds(6, 100, 185, 23); + panelImage.add(rdbtnImageSearchDownload); + + JPanel panelDesc = new JPanel(); + panelDesc.setLayout(null); + panelDesc.setBorder(new TitledBorder(UIManager + .getBorder("TitledBorder.border"), "Erklärung", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panelDesc.setBackground(SystemColor.menu); + panelDesc.setBounds(290, 146, 270, 170); + contentPanel.add(panelDesc); + + ScrollPane scrollPaneDesc = new ScrollPane(); + scrollPaneDesc.setBounds(10, 15, 250, 145); + final JTextArea txtDesc = new JTextArea(); + txtDesc.setLineWrap(true); + txtDesc.setWrapStyleWord(true); + txtDesc.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtDesc.setBackground(SystemColor.menu); + scrollPaneDesc.add(txtDesc); + // Pro AUswahl + txtDesc.setText("Legen Sie ein neues Image an und laden Sie anschließend die passende .vmdk-Datei hoch. Ein Image (wenn auch von einem anderen Dozenten) ist die Voraussetzung für eine Veranstaltung."); + panelDesc.add(scrollPaneDesc); + + JPanel panelVeranstaltung = new JPanel(); + panelVeranstaltung.setLayout(null); + panelVeranstaltung.setBorder(new TitledBorder(UIManager + .getBorder("TitledBorder.border"), "Veranstaltung (VMChooser)", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panelVeranstaltung.setBackground(SystemColor.menu); + panelVeranstaltung.setBounds(10, 327, 270, 170); + contentPanel.add(panelVeranstaltung); + + rdbtnVeranstaltungNew = new JRadioButton("Neu"); + buttonGroup.add(rdbtnVeranstaltungNew); + rdbtnVeranstaltungNew + .setToolTipText("Hier k\u00F6nnen Sie Ihre Labordaten eingeben"); + rdbtnVeranstaltungNew.setBounds(6, 24, 185, 23); + panelVeranstaltung.add(rdbtnVeranstaltungNew); + rdbtnVeranstaltungNew.setBackground(SystemColor.menu); + + rdbtnVeranstaltungEdit = new JRadioButton("Bearbeiten"); + rdbtnVeranstaltungEdit + .setToolTipText("Hier k\u00F6nnen Sie einen Link auf ein bestehendes Labor erzeugen"); + rdbtnVeranstaltungEdit.setBounds(6, 50, 230, 23); + panelVeranstaltung.add(rdbtnVeranstaltungEdit); + buttonGroup.add(rdbtnVeranstaltungEdit); + rdbtnVeranstaltungEdit.setBackground(SystemColor.menu); + + JRadioButton rdbtnVeranstaltungDelete = new JRadioButton("L\u00F6schen"); + rdbtnVeranstaltungDelete.setEnabled(false); + rdbtnVeranstaltungDelete + .setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); + rdbtnVeranstaltungDelete.setBounds(6, 76, 175, 23); + panelVeranstaltung.add(rdbtnVeranstaltungDelete); + buttonGroup.add(rdbtnVeranstaltungDelete); + rdbtnVeranstaltungDelete.setBackground(SystemColor.menu); + + JRadioButton rdbtnVeranstaltungSearch = new JRadioButton("Suche"); + rdbtnVeranstaltungSearch.setEnabled(false); + buttonGroup.add(rdbtnVeranstaltungSearch); + rdbtnVeranstaltungSearch + .setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); + rdbtnVeranstaltungSearch.setBackground(SystemColor.menu); + rdbtnVeranstaltungSearch.setBounds(6, 102, 175, 23); + panelVeranstaltung.add(rdbtnVeranstaltungSearch); + + JLabel lblCrumbStart = new JLabel("Startseite"); + lblCrumbStart.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + Login_GUI lw = new Login_GUI(); + lw.setVisible(true); + MainMenue_GUI.this.setVisible(false); + } + }); + lblCrumbStart.setForeground(Color.BLUE); + lblCrumbStart.setBounds(10, 0, 52, 14); + contentPanel.add(lblCrumbStart); + + JLabel label = new JLabel(">"); + label.setBounds(60, 0, 13, 14); + contentPanel.add(label); + + JLabel lblRechtshinweis = new JLabel("Rechtshinweis"); + lblRechtshinweis.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + BillOfRights_GUI rb = new BillOfRights_GUI(); + rb.setVisible(true); + MainMenue_GUI.this.setVisible(false); + } + }); + lblRechtshinweis.setForeground(Color.BLUE); + lblRechtshinweis.setBounds(72, 0, 68, 14); + contentPanel.add(lblRechtshinweis); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(142, 0, 13, 14); + contentPanel.add(label_1); + + JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); + lblNewLabel_1.setBounds(150, 0, 74, 14); + contentPanel.add(lblNewLabel_1); + + JPanel panelNews = new JPanel(); + panelNews.setLayout(null); + panelNews.setBorder(new TitledBorder(UIManager + .getBorder("TitledBorder.border"), "News", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panelNews.setBackground(SystemColor.menu); + panelNews.setBounds(290, 327, 270, 170); + contentPanel.add(panelNews); + + ScrollPane scrollPaneNews = new ScrollPane(); + // scrollPaneDesc.setBounds(10, 15, 250, 145); + scrollPaneNews.setBounds(10, 15, 250, 145); + JTextArea txtNews = new JTextArea(); + txtNews.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtNews.setBackground(SystemColor.menu); + txtNews.setWrapStyleWord(true); + txtNews.setLineWrap(true); + txtNews.setText("Hier werden mal die Neuigkeiten stehen. Diese kommen direkt vom Satelliten, sind als HS-spezifisch :)"); + scrollPaneNews.add(txtNews); + panelNews.add(scrollPaneNews); + + /* + * Funktion Texte für das Klicken der RadioButtons + */ + rdbtnImageNew.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + descNewImage = "Legen Sie ein neues Image an und laden Sie anschließend die passende .vmdk-Datei hoch. Ein Image (wenn auch von einem anderen Dozenten) ist die Voraussetzung für eine Veranstaltung."; + txtDesc.setText(descNewImage); + } + }); + rdbtnImageEdit.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descEditImage = "Bearbeiten Sie die hinterlegten Informationen zu einem Image oder laden Sie eine neue .vmdk-Datei hoch."; + txtDesc.setText(descEditImage); + } + }); + rdbtnImageDelete.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descDeleteImage = "Suchen Sie alte und nicht mehr benötigte Images und löschen Sie diese."; + txtDesc.setText(descDeleteImage); + } + }); + rdbtnImageSearchDownload.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descSearchImage = "Suchen Sie nach bestimmten Images oder verschaffen Sie sich einen Überblick über alle verfügbaren Images. Sie können gewünschte Images umgehend herunterladen."; + txtDesc.setText(descSearchImage); + } + }); + rdbtnVeranstaltungNew.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descNewLecture = "Legen Sie eine neue Veranstaltung an und verknüpfen Sie diese mit einem bereits vorhandenem Image. Ihre neue Veranstaltung kann auch auf dem Image eines anderen Dozenten beruhen."; + txtDesc.setText(descNewLecture); + } + }); + rdbtnVeranstaltungEdit.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descEditLecture = "Bearbeiten Sie die hinterlegten Informationen zu einer Veranstaltung."; + txtDesc.setText(descEditLecture); + } + }); + rdbtnVeranstaltungDelete.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descDeleteLecture = "Suchen und löschen Sie eine Veranstaltung. Das hiermit verbundene Image bleibt erhalten."; + } + }); + rdbtnVeranstaltungSearch.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descSearchLecture = "Suchen Sie nach bestimmten Veranstaltungen oder verschaffen Sie sich einen Überblick über alle verfügbaren Veranstaltungen. Eventuell gibt es bereits etwas passendes für Ihre Vorlesung."; + txtDesc.setText(descSearchLecture); + } + }); + /* + * Ende der Radiobuttons + */ + + JLabel lblGrafik = new JLabel(""); + // ToolTipp für Grafik + lblGrafik + .setToolTipText("" + + "Ein virtuelles Labor besteht immer aus den beiden Komponenten
" + + "Image und Veranstaltung. Ein Image ist dabei die Grundlage f\u00FCr
" + + "mehrere Veranstaltungen. Somit kann eine neue Veranstaltung
" + + "erstellt werden, ohne ein neues Image hochladen zu m\u00FCssen.


" + + "Image: Das Image enth\u00E4lt die ben\u00F6tigte Software, die im
" + + "virtuellen Labor ben\u00F6tigt wird. Es wird von genau einem Dozenten
" + + "angelegt und besitzt einen allgemeinen Namen, z.B. \"Programmieren\".
" + + "Bei einem Image handelt es sich um eine Datei vom Typ VMDK.


" + + "Veranstaltung: Es k\u00F6nnen nun, basierend auf einem Image,
" + + " beliebig viele Veranstaltungen von unterschiedlichen Dozenten erstellt
" + + "werden. Diese k\u00F6nnten z.B. konkret \"Web-Entwicklung\" oder \"K\u00FCnstliche
" + + "Intelligenz\" lauten und referenzieren dabei auf das allgemeine Image
" + + "\"Programmieren\"."); + lblGrafik.setIcon(new ImageIcon(MainMenue_GUI.class + .getResource("/Image_zu_Veranstaltung_HDD.png"))); + // ToolTipp lange anzeigen - 60sec + ToolTipManager.sharedInstance().setDismissDelay(60000); + ToolTipManager.sharedInstance().registerComponent(lblGrafik); + lblGrafik.setBounds(82, 11, 391, 110); + contentPanel.add(lblGrafik); + + JTextPane txtpnUmDetaillierteInformationen = new JTextPane(); + txtpnUmDetaillierteInformationen + .setText("Um detaillierte Informationen zu erhalten, fahren Sie bitte mit der Maus \u00FCber die Grafik."); + txtpnUmDetaillierteInformationen.setEditable(false); + txtpnUmDetaillierteInformationen.setBackground(SystemColor.menu); + txtpnUmDetaillierteInformationen.setBounds(10, 113, 509, 22); + contentPanel.add(txtpnUmDetaillierteInformationen); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 630, 587, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton continueButton = new JButton("Weiter"); + + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if (rdbtnImageNew.isSelected() == true) { + EingabeImageAllgemein_GUI sr = new EingabeImageAllgemein_GUI(); + sr.setVisible(true); + dispose(); + } else if (rdbtnImageEdit.isSelected() == true) { + + SearchEditImage_GUI si = new SearchEditImage_GUI(); + si.setVisible(true); + dispose(); + } else if (rdbtnImageSearchDownload.isSelected() == true) { + SearchMethodLecture_GUI sm = new SearchMethodLecture_GUI(); + sm.setVisible(true); + dispose(); + } else if (rdbtnImageDelete.isSelected() == true) { + DeleteImage_GUI di = new DeleteImage_GUI(); + di.setVisible(true); + dispose(); + } else if (rdbtnVeranstaltungNew.isSelected() == true) { + EingabeLectureAllgemein_GUI av = new EingabeLectureAllgemein_GUI(); + av.setVisible(true); + dispose(); + } else if (rdbtnVeranstaltungEdit.isSelected() == true) { + SearchEditLecture_GUI sl = new SearchEditLecture_GUI(); + sl.setVisible(true); + dispose(); + } + } + }); + continueButton.setActionCommand("OK"); + buttonPane.add(continueButton); + getRootPane().setDefaultButton(continueButton); + } + } + { + JSeparator separator = new JSeparator(); + separator.setBounds(0, 617, 587, 2); + getContentPane().add(separator); + } + { + JSeparator separator = new JSeparator(); + separator.setBounds(0, 91, 587, 2); + getContentPane().add(separator); + } + + 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); + + }// end main + +}// end class diff --git a/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java new file mode 100644 index 00000000..2f578e8b --- /dev/null +++ b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java @@ -0,0 +1,216 @@ +package gui.intro; + + +import java.awt.Desktop; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Toolkit; +import javax.swing.JFrame; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import javax.swing.JLabel; +import java.awt.Font; +import javax.swing.JTextPane; +import java.awt.SystemColor; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JSeparator; +import javax.swing.JMenuBar; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.JCheckBox; +import javax.swing.event.ChangeListener; +import javax.swing.event.ChangeEvent; + +import org.ini4j.InvalidFileFormatException; +import org.ini4j.Wini; + + +@SuppressWarnings("serial") +public class VmWareLink_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JCheckBox chckbxNewCheckBox; + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + VmWareLink_GUI dialog = new VmWareLink_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public VmWareLink_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + System.exit(0); + } + }); + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + setTitle("Dozentenmodul *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.setBounds(0, 0, 577, 80); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Hinweis VMWare Player"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 42); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 104, 567, 502); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JTextPane txtpnUmIhreVmdk = new JTextPane(); + txtpnUmIhreVmdk.setBackground(SystemColor.menu); + txtpnUmIhreVmdk.setEditable(false); + txtpnUmIhreVmdk.setText("F\u00FCr die Arbeit mit der bwLehrpool Suite wird zwingend ein VMWare Player ben\u00F6tigt. Diesen k\u00F6nnen Sie sich unter folgendem Link kostenfrei downloaden."); + txtpnUmIhreVmdk.setBounds(10, 16, 499, 66); + contentPanel.add(txtpnUmIhreVmdk); + + JLabel lblNewLabel_1 = new JLabel("Windows: "); + lblNewLabel_1.addMouseListener(new MouseAdapter() { + @Override + public void mouseReleased(MouseEvent arg0) { + URI url; + try { + url = new URI("https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"); + Desktop.getDesktop().browse(url); + } catch (URISyntaxException | IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + }); + + lblNewLabel_1.setBounds(10, 93, 499, 14); + contentPanel.add(lblNewLabel_1); + + chckbxNewCheckBox = new JCheckBox("Diese Benachrichtigung nicht mehr anzeigen."); + chckbxNewCheckBox.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent arg0) { + if(chckbxNewCheckBox.isSelected()==true) + { + try { + Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); + ini.put("main", "vmware",true); + ini.store(); + } catch (InvalidFileFormatException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + } + }); + chckbxNewCheckBox.setBounds(6, 472, 555, 23); + contentPanel.add(chckbxNewCheckBox); + + JLabel lbllinuxvmwarePlayer = new JLabel("Linux: "); + lbllinuxvmwarePlayer.setBounds(10, 178, 499, 14); + contentPanel.add(lbllinuxvmwarePlayer); + + JLabel lblvmwarePlayerDownload = new JLabel("vmWare Player Download"); + lblvmwarePlayerDownload.setBounds(10, 118, 499, 14); + contentPanel.add(lblvmwarePlayerDownload); + + JLabel lblvmwarePlayerDownload_1 = new JLabel("vmWare Player Download"); + lblvmwarePlayerDownload_1.setBounds(10, 203, 499, 14); + contentPanel.add(lblvmwarePlayerDownload_1); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 630, 587, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton cancelButton = new JButton("Weiter"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + MainMenue_GUI ea=new MainMenue_GUI(); + ea.setVisible(true); + dispose(); + } + }); + cancelButton.setActionCommand("Cancel"); + buttonPane.add(cancelButton); + } + } + { + JSeparator separator = new JSeparator(); + separator.setBounds(0, 617, 587, 2); + getContentPane().add(separator); + } + { + JSeparator separator = new JSeparator(); + separator.setBounds(0, 91, 587, 2); + getContentPane().add(separator); + } + { + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + { + JMenu mnHilfe = new JMenu("Hilfe"); + menuBar.add(mnHilfe); + { + JMenuItem mntmFaq = new JMenuItem("FAQ"); + mnHilfe.add(mntmFaq); + } + { + JMenuItem mntmHilfe = new JMenuItem("Hilfe"); + mnHilfe.add(mntmHilfe); + } + } + } + + + + } +} diff --git a/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java new file mode 100644 index 00000000..5c84610c --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java @@ -0,0 +1,413 @@ +package gui.lecture; + + +import gui.intro.MainMenue_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.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +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.JSeparator; +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 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; +import javax.swing.ButtonGroup; + + +@SuppressWarnings("serial") +public class EditLectureAllgemein_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + private JTextField Vorname; + private JTextField Nachname; + private JTextField Hochschule; + private JTextField EMail; + private JTextField textFieldLaborname; + JTextArea description; + JRadioButton radioButtonyes; + JDateChooser dateChooserend; + JDateChooser dateChooserstart; + JRadioButton radioButtonno; + private final ButtonGroup buttonGroup = new ButtonGroup(); + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + EditLectureAllgemein_GUI dialog = new EditLectureAllgemein_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public EditLectureAllgemein_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("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 331, 557, 162); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel label = new JLabel("Vorname: *"); + label.setBackground(SystemColor.menu); + label.setBounds(10, 33, 125, 20); + panel_1.add(label); + + Vorname = new JTextField(); + Vorname.setEditable(false); + Vorname.setEnabled(false); + Vorname.setText(person.verantwortlicher.getVorname()); + Vorname.setBackground(Color.WHITE); + Vorname.setColumns(10); + Vorname.setBounds(145, 33, 350, 20); + panel_1.add(Vorname); + + JLabel label_7 = new JLabel("Nachname: *"); + label_7.setBackground(SystemColor.menu); + label_7.setBounds(10, 64, 125, 20); + panel_1.add(label_7); + + Nachname = new JTextField(); + Nachname.setEnabled(false); + Nachname.setEditable(false); + Nachname.setText(person.verantwortlicher.getName()); + Nachname.setBackground(Color.WHITE); + Nachname.setColumns(10); + Nachname.setBounds(145, 64, 350, 20); + panel_1.add(Nachname); + + JLabel label_8 = new JLabel("Hochschule: *"); + label_8.setBackground(SystemColor.menu); + label_8.setBounds(10, 95, 125, 20); + panel_1.add(label_8); + + Hochschule = new JTextField(); + Hochschule.setEnabled(false); + Hochschule.setEditable(false); + Hochschule.setText(person.verantwortlicher.getHochschule()); + Hochschule.setBackground(Color.WHITE); + Hochschule.setColumns(10); + Hochschule.setBounds(145, 95, 350, 20); + panel_1.add(Hochschule); + + JLabel label_9 = new JLabel("E-Mail: *"); + label_9.setBackground(SystemColor.menu); + label_9.setBounds(10, 126, 125, 20); + panel_1.add(label_9); + + EMail = new JTextField(); + EMail.setEnabled(false); + EMail.setEditable(false); + EMail.setText(person.verantwortlicher.getEMail()); + EMail.setBackground(Color.WHITE); + EMail.setColumns(10); + EMail.setBounds(145, 126, 350, 20); + panel_1.add(EMail); + + JPanel panel = new JPanel(); + panel.setBounds(10, 402, 577, 33); + contentPanel.add(panel); + panel.setLayout(null); + panel.setBorder(new EmptyBorder(5, 5, 5, 5)); + panel.setBackground(SystemColor.menu); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + + EditLectureAllgemein_GUI.this.setVisible(false); + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); + + JPanel 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.setText(Lecture.lecture.getName()); + 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("Beschreibung: *"); + 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.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.setDate(Lecture.lecture.getEnddate()); + 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.setDate(Lecture.lecture.getStartdate()); + 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"); + 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); + + radioButtonno = new JRadioButton("Nein"); + buttonGroup.add(radioButtonno); + 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); + 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(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); + 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(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()); + + + LinkLecture_GUI ev=new LinkLecture_GUI(); + ev.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); + + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(32, 602, 136, 14); + getContentPane().add(lblPflichtfelder); + + 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); + + } + + +} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/lecture/EditLinkLecture_GUI.java b/Dozentenmodul/src/gui/lecture/EditLinkLecture_GUI.java new file mode 100644 index 00000000..2288f5b0 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/EditLinkLecture_GUI.java @@ -0,0 +1,438 @@ +package gui.lecture; + + +import gui.intro.MainMenue_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 EditLinkLecture_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JComboBox 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 { + EditLinkLecture_GUI dialog = new EditLinkLecture_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public EditLinkLecture_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;iErweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + ExtendedSearchForImages_GUI es=new ExtendedSearchForImages_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + comboBox = new JComboBox(); + try { + List list=client.getAllOS(); + comboBox.addItem(""); + for(int i=0;i"); + 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 images; + try { + images = client.getImageList(); + Iterator i=images.iterator(); + List ListObj = new ArrayList(); + 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/lecture/EingabeLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/EingabeLectureAllgemein_GUI.java new file mode 100644 index 00000000..ed915892 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/EingabeLectureAllgemein_GUI.java @@ -0,0 +1,506 @@ +package gui.lecture; + +import gui.intro.MainMenue_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.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +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.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JSeparator; +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 models.Image; +import models.Lecture; +import models.person; +import javax.swing.JTextArea; +import java.awt.ScrollPane; +import java.util.Calendar; +import java.util.Date; + +import com.toedter.calendar.JDateChooser; +import javax.swing.JRadioButton; + +@SuppressWarnings("serial") +public class EingabeLectureAllgemein_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + private JTextField Vorname; + private JTextField Nachname; + private JTextField Hochschule; + private JTextField EMail; + private JTextField txtFldVeranstaltungsname; + JTextArea description; + JRadioButton radioButtonyes; + JRadioButton radioButtonno; + JDateChooser dateChooserend; + JDateChooser dateChooserstart; + Date startDate = new Date(); + Date endDate; + int maxLifeTime = 180; // Anzahl Tage, die eine Veranstaltung in der Zukunft + // aktiv sein darf + boolean isDateOrderCorrect, isDateMaxLifeTimeCorrect, + isAllInformationReady = false; + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + EingabeLectureAllgemein_GUI dialog = new EingabeLectureAllgemein_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public EingabeLectureAllgemein_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + System.exit(0); + } + + @Override + public void windowOpened(WindowEvent arg0) { + txtFldVeranstaltungsname.requestFocusInWindow(); + } + }); + 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("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie + .setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 331, 557, 162); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel label = new JLabel("Vorname: *"); + label.setBackground(SystemColor.menu); + label.setBounds(10, 33, 125, 20); + panel_1.add(label); + + Vorname = new JTextField(); + Vorname.setEditable(false); + Vorname.setEnabled(false); + Vorname.setText(person.verantwortlicher.getVorname()); + Vorname.setBackground(Color.WHITE); + Vorname.setColumns(10); + Vorname.setBounds(145, 33, 350, 20); + panel_1.add(Vorname); + + JLabel label_7 = new JLabel("Nachname: *"); + label_7.setBackground(SystemColor.menu); + label_7.setBounds(10, 64, 125, 20); + panel_1.add(label_7); + + Nachname = new JTextField(); + Nachname.setEnabled(false); + Nachname.setEditable(false); + Nachname.setText(person.verantwortlicher.getName()); + Nachname.setBackground(Color.WHITE); + Nachname.setColumns(10); + Nachname.setBounds(145, 64, 350, 20); + panel_1.add(Nachname); + + JLabel label_8 = new JLabel("Hochschule: *"); + label_8.setBackground(SystemColor.menu); + label_8.setBounds(10, 95, 125, 20); + panel_1.add(label_8); + + Hochschule = new JTextField(); + Hochschule.setEnabled(false); + Hochschule.setEditable(false); + Hochschule.setText(person.verantwortlicher.getHochschule()); + Hochschule.setBackground(Color.WHITE); + Hochschule.setColumns(10); + Hochschule.setBounds(145, 95, 350, 20); + panel_1.add(Hochschule); + + JLabel label_9 = new JLabel("E-Mail: *"); + label_9.setBackground(SystemColor.menu); + label_9.setBounds(10, 126, 125, 20); + panel_1.add(label_9); + + EMail = new JTextField(); + EMail.setEnabled(false); + EMail.setEditable(false); + EMail.setText(person.verantwortlicher.getEMail()); + EMail.setBackground(Color.WHITE); + EMail.setColumns(10); + EMail.setBounds(145, 126, 350, 20); + panel_1.add(EMail); + + JPanel panel = new JPanel(); + panel.setBounds(10, 402, 577, 33); + contentPanel.add(panel); + panel.setLayout(null); + panel.setBorder(new EmptyBorder(5, 5, 5, 5)); + panel.setBackground(SystemColor.menu); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + + EingabeLectureAllgemein_GUI.this.setVisible(false); + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); + + JPanel 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); + + txtFldVeranstaltungsname = new JTextField(); + txtFldVeranstaltungsname.setColumns(10); + txtFldVeranstaltungsname.setBounds(200, 22, 347, 20); + txtFldVeranstaltungsname.setText(Lecture.lecture.getName()); + panel_2.add(txtFldVeranstaltungsname); + + JTextArea textArea = new JTextArea(); + textArea.setEditable(false); + 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 lblDesc = new JLabel("Beschreibung: *"); + lblDesc.setBounds(10, 111, 180, 14); + panel_2.add(lblDesc); + + ScrollPane scrollPane = new ScrollPane(); + scrollPane.setBounds(200, 104, 347, 78); + panel_2.add(scrollPane); + description = new JTextArea(); + description.setFont(new Font("Tahoma", Font.PLAIN, 11)); + description.setLineWrap(true); + description.setText(Lecture.lecture.getDesc()); + scrollPane.add(description); + description.setBounds(0, 0, 4, 22); + scrollPane.add(description); + + dateChooserend = new JDateChooser(); + endDate = addDays(new Date(), maxLifeTime); // Datum darf weiter als 6 + // Monate in der Zukunft + // liegen + dateChooserend.setDate(endDate); + if (Lecture.lecture.getEnddate() == null) { + // is not defined yet + dateChooserend.setDate(endDate); + } else { + // already defined from last visit on this page + dateChooserend.setDate(Lecture.lecture.getEnddate()); + } + dateChooserend.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserend.setBounds(404, 188, 143, 20); + panel_2.add(dateChooserend); + + JLabel lblBis = new JLabel("bis:"); + lblBis.setBounds(378, 188, 21, 20); + panel_2.add(lblBis); + + dateChooserstart = new JDateChooser(); + if (Lecture.lecture.getStartdate() == null) { + // is not defined yet + dateChooserstart.setDate(startDate); + } else { + // already defined from last visit on this page + dateChooserstart.setDate(Lecture.lecture.getStartdate()); + } + dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserstart.setBounds(226, 188, 143, 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, 194, 127, 14); + panel_2.add(label_10); + + JLabel label_11 = new JLabel("Aktiv:"); + label_11.setBounds(10, 229, 127, 14); + panel_2.add(label_11); + + radioButtonyes = new JRadioButton("Ja"); + radioButtonyes.setSelected(true); + radioButtonyes.setBounds(200, 225, 73, 23); + panel_2.add(radioButtonyes); + + radioButtonno = new JRadioButton("Nein"); + radioButtonyes.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + radioButtonyes.setSelected(true); + radioButtonno.setSelected(false); + } + }); + radioButtonno.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + radioButtonno.setSelected(true); + radioButtonyes.setSelected(false); + } + }); + radioButtonno.setBounds(296, 225, 73, 23); + panel_2.add(radioButtonno); + + JLabel lblimVmchooserSichtbar = new JLabel("(im VMChooser sichtbar)"); + lblimVmchooserSichtbar.setBounds(10, 245, 127, 14); + panel_2.add(lblimVmchooserSichtbar); + + JLabel lblmaxMonate = new JLabel("(max. 6 Monate)"); + lblmaxMonate.setBounds(10, 208, 127, 14); + panel_2.add(lblmaxMonate); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton backButton = new JButton("Zur\u00FCck"); + backButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + if (radioButtonyes.isSelected() == true) { + Lecture.lecture.setActive(true); + } else { + Lecture.lecture.setActive(false); + } + + Lecture.lecture.setName(txtFldVeranstaltungsname + .getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(txtFldVeranstaltungsname + .getText()); + + MainMenue_GUI sr = new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + } + }); + backButton.setActionCommand("Cancel"); + buttonPane.add(backButton); + getRootPane().setDefaultButton(backButton); + } + { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + // liegt das End-Datum vor dem Start-Datum? + if (dateChooserend.getDate().before( + dateChooserstart.getDate())) { + // datum ist falsch rum + isDateOrderCorrect = false; + JOptionPane + .showMessageDialog( + null, + "Das End-Datum liegt vor dem Start-Datum. Bitte ändern.", + "Datum fehlerhaft", + JOptionPane.ERROR_MESSAGE); + } else { + // bereit + isDateOrderCorrect = true; + } + // liegt das eingegebene Datum nach dem erlaubten + // End-Datum? + if (dateChooserend.getDate().after(endDate)) { + // Datum zu weit weg + isDateMaxLifeTimeCorrect = false; + JOptionPane.showMessageDialog(null, + "Das End-Datum liegt zu weit in der Zukunft. Erlaubt ist maximal:\n" + + endDate, "Datum fehlerhaft", + JOptionPane.ERROR_MESSAGE); + } else { + // bereit + isDateMaxLifeTimeCorrect = true; + } + // Prüfen ob alles eingegeben wurde + if (txtFldVeranstaltungsname.getText().isEmpty() == true + || description.getText().isEmpty() == true) { + // mind 1 Textfeld ist leer + isAllInformationReady = false; + JOptionPane + .showMessageDialog( + null, + "Bitte geben Sie einen Veranstaltungsnamen und eine Beschreibung ein.", + "Datum fehlerhaft", + JOptionPane.ERROR_MESSAGE); + } else { + // Textfelder bereit + isAllInformationReady = true; + } + + // welcher Radiobutton ist geklickt? + if (radioButtonyes.isSelected() == true) { + Lecture.lecture.setActive(true); + } else { + Lecture.lecture.setActive(false); + } + // Prüfe ob alle Eingaben korrekt sind, dann mache + // weiter + if (isAllInformationReady == true + && isDateMaxLifeTimeCorrect == true + && isDateOrderCorrect == true) { + // everything is ok, proceed + Lecture.lecture.setName(txtFldVeranstaltungsname + .getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart + .getDate()); + Image.image.setImagename(txtFldVeranstaltungsname + .getText()); + + LinkLecture_GUI ev = new LinkLecture_GUI(); + ev.setVisible(true); + dispose(); + } + + } + }); + continueButton.setActionCommand("OK"); + buttonPane.add(continueButton); + } + } + + 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); + + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(32, 602, 136, 14); + getContentPane().add(lblPflichtfelder); + + 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 Date addDays(Date date, int days) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + cal.add(Calendar.DATE, days); // minus number would decrement the days + return cal.getTime(); + } +} diff --git a/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java new file mode 100644 index 00000000..5f6336c8 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java @@ -0,0 +1,237 @@ +package gui.lecture; + + +import gui.image.EingabeImageAllgemein_GUI; +import gui.image.FTPUploader_GUI; + +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.WindowAdapter; +import java.awt.event.WindowEvent; + +import javax.swing.JButton; +import javax.swing.JCheckBox; +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.JSeparator; +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; + +@SuppressWarnings("serial") +public class ExtendedSearchForImages_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + private JTextField textField; + private JTextField textField_1; + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + ExtendedSearchForImages_GUI dialog = new ExtendedSearchForImages_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public ExtendedSearchForImages_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); + + 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("Weitere Suchoptionen"); + 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("beschreibung"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Image-Typ", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 11, 557, 95); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel lblNewLabel_2 = new JLabel("Image-Typ"); + lblNewLabel_2.setBounds(10, 39, 176, 20); + panel_1.add(lblNewLabel_2); + + JCheckBox chckbxBestehendesImage = new JCheckBox("Bestehendes Image"); + chckbxBestehendesImage.setSelected(true); + chckbxBestehendesImage.setBounds(192, 38, 138, 23); + panel_1.add(chckbxBestehendesImage); + + JCheckBox chckbxRohling = new JCheckBox("Rohling"); + chckbxRohling.setSelected(true); + chckbxRohling.setBounds(332, 38, 97, 23); + panel_1.add(chckbxRohling); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setBorder(new TitledBorder(null, "Image-Inhalt", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 117, 557, 95); + contentPanel.add(panel); + + JLabel lblEnthalteneSoftware = new JLabel("Enthaltene Software"); + lblEnthalteneSoftware.setBounds(10, 39, 176, 20); + panel.add(lblEnthalteneSoftware); + + textField = new JTextField(); + textField.setBounds(196, 39, 351, 20); + panel.add(textField); + textField.setColumns(10); + + JLabel lblNewLabel_1 = new JLabel("Bitte mit ; getrennt angeben"); + lblNewLabel_1.setBounds(196, 70, 351, 14); + panel.add(lblNewLabel_1); + + JPanel panel_2 = new JPanel(); + panel_2.setLayout(null); + panel_2.setBorder(new TitledBorder(null, "Informationen zum Ersteller", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(10, 223, 557, 123); + contentPanel.add(panel_2); + + JLabel lblNachnameDesErstellers = new JLabel("Nachname des Erstellers"); + lblNachnameDesErstellers.setBounds(10, 39, 176, 20); + panel_2.add(lblNachnameDesErstellers); + + textField_1 = new JTextField(); + textField_1.setColumns(10); + textField_1.setBounds(196, 39, 351, 20); + panel_2.add(textField_1); + + JLabel lblHochschuleuniversitt = new JLabel("Hochschule/Universit\u00E4t"); + lblHochschuleuniversitt.setBounds(10, 70, 176, 20); + panel_2.add(lblHochschuleuniversitt); + + JComboBox comboBox = new JComboBox(); + comboBox.setBounds(196, 70, 351, 20); + panel_2.add(comboBox); + { + 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) { + + + EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); + sr.setVisible(true); + dispose(); + } + }); + okButton.setActionCommand("OK"); + buttonPane.add(okButton); + getRootPane().setDefaultButton(okButton); + } + { + JButton cancelButton = new JButton("\u00DCbernehmen"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + + FTPUploader_GUI ea=new FTPUploader_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/lecture/LinkLecture_GUI.java b/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java new file mode 100644 index 00000000..815f6799 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java @@ -0,0 +1,473 @@ +package gui.lecture; + +import gui.intro.MainMenue_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.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.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 LinkLecture_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JComboBox comboBox; + JTable tableAllImages; + private JTextField textFieldName; + String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", + "Verantwortlicher", "Letztes Update", "Schlagwort" }; + ThriftConnection con = new ThriftConnection(); + Client client = con.getThriftConnection(); + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + LinkLecture_GUI dialog = new LinkLecture_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public LinkLecture_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + System.exit(0); + } + + @Override + public void windowOpened(WindowEvent arg0) { + textFieldName.requestFocusInWindow(); + } + }); + 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("Suche nach VL-Image"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie + .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 531); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 49, 557, 131); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); + lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); + panel_1.add(lblInternetIstInnerhalb); + + textFieldName = new JTextField(); + textFieldName.addKeyListener(new KeyAdapter() { + @Override + public void keyReleased(KeyEvent e) { + String stext = textFieldName.getText(); + modelAll.setRowCount(0); + initTableModel(modelAll); + + if (stext != "") + for (int i = 0; i < modelAll.getRowCount(); i++) { + + if (modelAll.getValueAt(i, 0).toString() + .startsWith(stext)) { + + } else { + modelAll.removeRow(i); + } + } + + } + + }); + + textFieldName.setBounds(270, 30, 250, 20); + panel_1.add(textFieldName); + textFieldName.setColumns(10); + + JLabel lblErweiterteSuche = new JLabel( + "Erweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + comboBox = new JComboBox(); + try { + List 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) { + + LinkLecture_GUI.this.setVisible(false); + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); + lblNewLabel_1.setBounds(146, 11, 85, 14); + contentPanel.add(lblNewLabel_1); + + JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); + + tabbedPane.setBounds(10, 197, 557, 300); + contentPanel.add(tabbedPane); + + JScrollPane scrollPaneMyImage = new JScrollPane(); + JTable tablemyImages = new JTable(); + tablemyImages.setModel(model); + tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); + + JScrollPane scrollPaneAllImages = new JScrollPane(); + tableAllImages = new JTable(); + tableAllImages.setModel(modelAll); + tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPaneAllImages.setViewportView(tableAllImages); + tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); + + scrollPaneMyImage.setViewportView(tablemyImages); + tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); + + JScrollPane scrollPaneCoopImages = new JScrollPane(); + JTable tableCoopImages = new JTable(); + tableCoopImages.setModel(model); + tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPaneCoopImages.setViewportView(tableCoopImages); + tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, + null); + 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); + + 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 cancelButton = new JButton("Zur\u00FCck"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + con.closeThriftConnection(); + EingabeLectureAllgemein_GUI eVAG = new EingabeLectureAllgemein_GUI(); + eVAG.setVisible(true); + dispose(); + } + }); + cancelButton.setActionCommand("CANCEL"); + buttonPane.add(cancelButton); + getRootPane().setDefaultButton(cancelButton); + } + { + JButton doLinkButton = new JButton( + "Veranstaltung erzeugen und abschlie\u00DFen"); + doLinkButton.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("Veranstaltung anlegen um: " + + 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()); + JOptionPane + .showMessageDialog( + null, + "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmenü zurück.", + "Veranstaltung angelegt", + JOptionPane.PLAIN_MESSAGE); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + JOptionPane + .showMessageDialog( + null, + "Beim Anlegen Ihrer Veranstaltung ist ein Fehler aufgetreten.", + "Error", JOptionPane.ERROR_MESSAGE); + } + con.closeThriftConnection(); + dispose(); + + } + }); + doLinkButton.setActionCommand("OK"); + buttonPane.add(doLinkButton); + } + } + + 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 images; + try { + images = client.getImageList(); + Iterator i = images.iterator(); + List ListObj = new ArrayList(); + 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/lecture/SearchEditLecture_GUI.java b/Dozentenmodul/src/gui/lecture/SearchEditLecture_GUI.java new file mode 100644 index 00000000..93fb899e --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/SearchEditLecture_GUI.java @@ -0,0 +1,451 @@ +package gui.lecture; + + +import gui.image.EditImageAllgemein_GUI; +import gui.intro.MainMenue_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.ParseException; +import java.text.SimpleDateFormat; +import java.util.Iterator; +import java.util.List; +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.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.Lecture; +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 rowSorterAll = new TableRowSorter( modelAll ); + final TableRowSorter rowSorterMyLectures = new TableRowSorter( 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("Erweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + //Öffnet das Fenster Extended GUI + con.closeThriftConnection(); + ExtendedSearchForImages_GUI es=new ExtendedSearchForImages_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 Hauptmenü + 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(); + rowSorterMyLectures.setRowFilter(RowFilter.regexFilter(username, 5)); + } + else if(tabbedPane.getSelectedIndex()==1){ + + + + } + + } + }); + + tabbedPane.setBounds(10, 197, 557, 323); + contentPanel.add(tabbedPane); + System.out.println("haaaaaaaaaaa"); + 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); + { + 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) { + + + //Image.image.setImageId(imageid); + if(tabbedPane.getSelectedIndex()==0){ + + + 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"); + + 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); + } + + 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 lectures; + try { + //Hole eine Liste der Images + lectures = client.getLectureList(); + Iterator i=lectures.iterator(); + + int x=0; + + while(i.hasNext()) + { + //erzeuge Objekte für die Tabelle + 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++; + i.next(); + + } + + return model; + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + return model; + } + + } + + diff --git a/Dozentenmodul/src/gui/lecture/SearchMethodLecture_GUI.java b/Dozentenmodul/src/gui/lecture/SearchMethodLecture_GUI.java new file mode 100644 index 00000000..ae31236a --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/SearchMethodLecture_GUI.java @@ -0,0 +1,246 @@ +package gui.lecture; + + +import gui.image.SearchImage_GUI; +import gui.intro.MainMenue_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.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.JTextPane; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; + +@SuppressWarnings("serial") +public class SearchMethodLecture_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnNachEinemVlimage; + JRadioButton rdbtnNachEinerVeranstaltung; + private final ButtonGroup buttonGroup = new ButtonGroup(); + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + SearchMethodLecture_GUI dialog = new SearchMethodLecture_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public SearchMethodLecture_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + System.exit(0); + } + }); + setResizable(false); + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + setTitle("bwLehrpool Suite *Prototyp*"); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top=(screenSize.height - 603) / 2; + int left=(screenSize.width - 722) / 2; + setBounds(left, top, 603, 722); + //setBounds(100, 100, 603, 722); + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Wählen Sie bitte die Suchmethode Ihrer Suche", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 36, 557, 369); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + rdbtnNachEinemVlimage = new JRadioButton("Nach einem VL-Image oder Vorlagen suchen"); + buttonGroup.add(rdbtnNachEinemVlimage); + rdbtnNachEinemVlimage.setBounds(6, 38, 545, 23); + panel_1.add(rdbtnNachEinemVlimage); + + JTextArea txtrHierKlickenWenn = new JTextArea(); + txtrHierKlickenWenn.setBackground(SystemColor.menu); + txtrHierKlickenWenn.setLineWrap(true); + txtrHierKlickenWenn.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtrHierKlickenWenn.setText("Hier klicken, wenn Sie nach einem konkreten Image suchen, von dem Sie exakte Daten kennen. Hierzu geh\u00F6ren z.B. das Betriebssystem oder die installierte Software.\r\nEs werden zudem alle Vorlagen aufgelistet."); + txtrHierKlickenWenn.setBounds(25, 68, 518, 80); + panel_1.add(txtrHierKlickenWenn); + + JTextArea txtrHierKlickenWenn_1 = new JTextArea(); + txtrHierKlickenWenn_1.setText("Hier klicken, wenn Sie nur wissen f\u00FCr welche Veranstaltung das gesuchte Image verwendet wird. Hierzu geh\u00F6ren z.B. der Name des Dozenten oder der Name der Veranstaltung."); + txtrHierKlickenWenn_1.setLineWrap(true); + txtrHierKlickenWenn_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtrHierKlickenWenn_1.setBackground(SystemColor.menu); + txtrHierKlickenWenn_1.setBounds(25, 210, 518, 80); + panel_1.add(txtrHierKlickenWenn_1); + + rdbtnNachEinerVeranstaltung = new JRadioButton("Nach einer Veranstaltung suchen"); + buttonGroup.add(rdbtnNachEinerVeranstaltung); + rdbtnNachEinerVeranstaltung.setBounds(6, 180, 545, 23); + panel_1.add(rdbtnNachEinerVeranstaltung); + + JPanel panel = new JPanel(); + panel.setBounds(10, 402, 577, 33); + contentPanel.add(panel); + panel.setLayout(null); + panel.setBorder(new EmptyBorder(5, 5, 5, 5)); + panel.setBackground(SystemColor.menu); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + + SearchMethodLecture_GUI.this.setVisible(false); + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Suchmethode"); + lblNewLabel_1.setBounds(146, 11, 82, 14); + contentPanel.add(lblNewLabel_1); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton okButton = new JButton("Zur\u00FCck"); + okButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + MainMenue_GUI sr=new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + } + }); + okButton.setActionCommand("OK"); + buttonPane.add(okButton); + getRootPane().setDefaultButton(okButton); + } + { + JButton cancelButton = new JButton("Weiter"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if(rdbtnNachEinemVlimage.isSelected()==true) + { + SearchImage_GUI ea=new SearchImage_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); + + } +} -- cgit v1.2.3-55-g7522 From b1b6a7f7b64b4fa1039abec3eaca752c8f64e965 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Apr 2014 11:03:30 +0200 Subject: BugFix: Kehrte zum Schluss nicht ins Menü zurück --- .../bin/gui/lecture/LinkLecture_GUI$7.class | Bin 3224 -> 3353 bytes Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class | Bin 11468 -> 11468 bytes Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java | 3 +++ 3 files changed, 3 insertions(+) diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class index 659fea33..c65dc3ac 100644 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class index d5aedb77..8edecdf7 100644 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class differ diff --git a/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java b/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java index 815f6799..b45897e6 100644 --- a/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java +++ b/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java @@ -392,6 +392,9 @@ public class LinkLecture_GUI extends JFrame { "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmenü zurück.", "Veranstaltung angelegt", JOptionPane.PLAIN_MESSAGE); + // zurück zum Menü + MainMenue_GUI m = new MainMenue_GUI(); + m.setVisible(true); } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); -- cgit v1.2.3-55-g7522 From a0ee1ad7af0b5d3ce6277fcff94f6c962ab3d328 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Apr 2014 11:31:29 +0200 Subject: Code formatiert --- Dozentenmodulserver/bin/server/User.class | Bin 11240 -> 11400 bytes Dozentenmodulserver/src/server/User.java | 1154 +++++++++++++++-------------- 2 files changed, 602 insertions(+), 552 deletions(-) diff --git a/Dozentenmodulserver/bin/server/User.class b/Dozentenmodulserver/bin/server/User.class index e76e61f2..41f557cf 100644 Binary files a/Dozentenmodulserver/bin/server/User.class and b/Dozentenmodulserver/bin/server/User.class differ diff --git a/Dozentenmodulserver/src/server/User.java b/Dozentenmodulserver/src/server/User.java index 7bf98cc4..5861a6e0 100644 --- a/Dozentenmodulserver/src/server/User.java +++ b/Dozentenmodulserver/src/server/User.java @@ -32,557 +32,607 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class User implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User"); - - private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)-1); - private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)-2); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)-3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new UserStandardSchemeFactory()); - schemes.put(TupleScheme.class, new UserTupleSchemeFactory()); - } - - public String userName; // required - public String password; // required - public String path; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - USER_NAME((short)-1, "userName"), - PASSWORD((short)-2, "password"), - PATH((short)-3, "path"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case -1: // USER_NAME - return USER_NAME; - case -2: // PASSWORD - return PASSWORD; - case -3: // PATH - return PATH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap); - } - - public User() { - } - - public User( - String userName, - String password, - String path) - { - this(); - this.userName = userName; - this.password = password; - this.path = path; - } - - /** - * Performs a deep copy on other. - */ - public User(User other) { - if (other.isSetUserName()) { - this.userName = other.userName; - } - if (other.isSetPassword()) { - this.password = other.password; - } - if (other.isSetPath()) { - this.path = other.path; - } - } - - public User deepCopy() { - return new User(this); - } - - @Override - public void clear() { - this.userName = null; - this.password = null; - this.path = null; - } - - public String getUserName() { - return this.userName; - } - - public User setUserName(String userName) { - this.userName = userName; - return this; - } - - public void unsetUserName() { - this.userName = null; - } - - /** Returns true if field userName is set (has been assigned a value) and false otherwise */ - public boolean isSetUserName() { - return this.userName != null; - } - - public void setUserNameIsSet(boolean value) { - if (!value) { - this.userName = null; - } - } - - public String getPassword() { - return this.password; - } - - public User setPassword(String password) { - this.password = password; - return this; - } - - public void unsetPassword() { - this.password = null; - } - - /** Returns true if field password is set (has been assigned a value) and false otherwise */ - public boolean isSetPassword() { - return this.password != null; - } - - public void setPasswordIsSet(boolean value) { - if (!value) { - this.password = null; - } - } - - public String getPath() { - return this.path; - } - - public User setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case USER_NAME: - if (value == null) { - unsetUserName(); - } else { - setUserName((String)value); - } - break; - - case PASSWORD: - if (value == null) { - unsetPassword(); - } else { - setPassword((String)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case USER_NAME: - return getUserName(); - - case PASSWORD: - return getPassword(); - - case PATH: - return getPath(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case USER_NAME: - return isSetUserName(); - case PASSWORD: - return isSetPassword(); - case PATH: - return isSetPath(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof User) - return this.equals((User)that); - return false; - } - - public boolean equals(User that) { - if (that == null) - return false; - - boolean this_present_userName = true && this.isSetUserName(); - boolean that_present_userName = true && that.isSetUserName(); - if (this_present_userName || that_present_userName) { - if (!(this_present_userName && that_present_userName)) - return false; - if (!this.userName.equals(that.userName)) - return false; - } - - boolean this_present_password = true && this.isSetPassword(); - boolean that_present_password = true && that.isSetPassword(); - if (this_present_password || that_present_password) { - if (!(this_present_password && that_present_password)) - return false; - if (!this.password.equals(that.password)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(User other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUserName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPassword()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("User("); - boolean first = true; - - sb.append("userName:"); - if (this.userName == null) { - sb.append("null"); - } else { - sb.append(this.userName); - } - first = false; - if (!first) sb.append(", "); - sb.append("password:"); - if (this.password == null) { - sb.append("null"); - } else { - sb.append(this.password); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class UserStandardSchemeFactory implements SchemeFactory { - public UserStandardScheme getScheme() { - return new UserStandardScheme(); - } - } - - private static class UserStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, User struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case -1: // USER_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.userName = iprot.readString(); - struct.setUserNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -2: // PASSWORD - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.password = iprot.readString(); - struct.setPasswordIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -3: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, User struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - if (struct.password != null) { - oprot.writeFieldBegin(PASSWORD_FIELD_DESC); - oprot.writeString(struct.password); - oprot.writeFieldEnd(); - } - if (struct.userName != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(struct.userName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class UserTupleSchemeFactory implements SchemeFactory { - public UserTupleScheme getScheme() { - return new UserTupleScheme(); - } - } - - private static class UserTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetUserName()) { - optionals.set(0); - } - if (struct.isSetPassword()) { - optionals.set(1); - } - if (struct.isSetPath()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetUserName()) { - oprot.writeString(struct.userName); - } - if (struct.isSetPassword()) { - oprot.writeString(struct.password); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.userName = iprot.readString(); - struct.setUserNameIsSet(true); - } - if (incoming.get(1)) { - struct.password = iprot.readString(); - struct.setPasswordIsSet(true); - } - if (incoming.get(2)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - } - } +public class User implements org.apache.thrift.TBase, + java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct( + "User"); + + private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField( + "userName", org.apache.thrift.protocol.TType.STRING, (short) -1); + private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField( + "password", org.apache.thrift.protocol.TType.STRING, (short) -2); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField( + "path", org.apache.thrift.protocol.TType.STRING, (short) -3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UserStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UserTupleSchemeFactory()); + } + + public String userName; // required + public String password; // required + public String path; // required + + /** + * The set of fields this struct contains, along with convenience methods + * for finding and manipulating them. + */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_NAME((short) -1, "userName"), PASSWORD((short) -2, "password"), PATH( + (short) -3, "path"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not + * found. + */ + public static _Fields findByThriftId(int fieldId) { + switch (fieldId) { + case -1: // USER_NAME + return USER_NAME; + case -2: // PASSWORD + return PASSWORD; + case -3: // PATH + return PATH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) + throw new IllegalArgumentException("Field " + fieldId + + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not + * found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>( + _Fields.class); + tmpMap.put(_Fields.USER_NAME, + new org.apache.thrift.meta_data.FieldMetaData("userName", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PASSWORD, + new org.apache.thrift.meta_data.FieldMetaData("password", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData( + "path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap( + User.class, metaDataMap); + } + + public User() { + } + + public User(String userName, String password, String path) { + this(); + this.userName = userName; + this.password = password; + this.path = path; + } + + /** + * Performs a deep copy on other. + */ + public User(User other) { + if (other.isSetUserName()) { + this.userName = other.userName; + } + if (other.isSetPassword()) { + this.password = other.password; + } + if (other.isSetPath()) { + this.path = other.path; + } + } + + public User deepCopy() { + return new User(this); + } + + @Override + public void clear() { + this.userName = null; + this.password = null; + this.path = null; + } + + public String getUserName() { + return this.userName; + } + + public User setUserName(String userName) { + this.userName = userName; + return this; + } + + public void unsetUserName() { + this.userName = null; + } + + /** + * Returns true if field userName is set (has been assigned a value) and + * false otherwise + */ + public boolean isSetUserName() { + return this.userName != null; + } + + public void setUserNameIsSet(boolean value) { + if (!value) { + this.userName = null; + } + } + + public String getPassword() { + return this.password; + } + + public User setPassword(String password) { + this.password = password; + return this; + } + + public void unsetPassword() { + this.password = null; + } + + /** + * Returns true if field password is set (has been assigned a value) and + * false otherwise + */ + public boolean isSetPassword() { + return this.password != null; + } + + public void setPasswordIsSet(boolean value) { + if (!value) { + this.password = null; + } + } + + public String getPath() { + return this.path; + } + + public User setPath(String path) { + this.path = path; + return this; + } + + public void unsetPath() { + this.path = null; + } + + /** + * Returns true if field path is set (has been assigned a value) and false + * otherwise + */ + public boolean isSetPath() { + return this.path != null; + } + + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_NAME: + if (value == null) { + unsetUserName(); + } else { + setUserName((String) value); + } + break; + + case PASSWORD: + if (value == null) { + unsetPassword(); + } else { + setPassword((String) value); + } + break; + + case PATH: + if (value == null) { + unsetPath(); + } else { + setPath((String) value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_NAME: + return getUserName(); + + case PASSWORD: + return getPassword(); + + case PATH: + return getPath(); + + } + throw new IllegalStateException(); + } + + /** + * Returns true if field corresponding to fieldID is set (has been assigned + * a value) and false otherwise + */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_NAME: + return isSetUserName(); + case PASSWORD: + return isSetPassword(); + case PATH: + return isSetPath(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof User) + return this.equals((User) that); + return false; + } + + public boolean equals(User that) { + if (that == null) + return false; + + boolean this_present_userName = true && this.isSetUserName(); + boolean that_present_userName = true && that.isSetUserName(); + if (this_present_userName || that_present_userName) { + if (!(this_present_userName && that_present_userName)) + return false; + if (!this.userName.equals(that.userName)) + return false; + } + + boolean this_present_password = true && this.isSetPassword(); + boolean that_present_password = true && that.isSetPassword(); + if (this_present_password || that_present_password) { + if (!(this_present_password && that_present_password)) + return false; + if (!this.password.equals(that.password)) + return false; + } + + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) + return false; + if (!this.path.equals(that.path)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(User other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserName()).compareTo( + other.isSetUserName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo( + this.userName, other.userName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPassword()).compareTo( + other.isSetPassword()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPassword()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo( + this.password, other.password); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPath()).compareTo( + other.isSetPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, + other.path); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) + throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) + throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("User("); + boolean first = true; + + sb.append("userName:"); + if (this.userName == null) { + sb.append("null"); + } else { + sb.append(this.userName); + } + first = false; + if (!first) + sb.append(", "); + sb.append("password:"); + if (this.password == null) { + sb.append("null"); + } else { + sb.append(this.password); + } + first = false; + if (!first) + sb.append(", "); + sb.append("path:"); + if (this.path == null) { + sb.append("null"); + } else { + sb.append(this.path); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) + throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol( + new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) + throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol( + new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class UserStandardSchemeFactory implements SchemeFactory { + public UserStandardScheme getScheme() { + return new UserStandardScheme(); + } + } + + private static class UserStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, User struct) + throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case -1: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userName = iprot.readString(); + struct.setUserNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, + schemeField.type); + } + break; + case -2: // PASSWORD + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, + schemeField.type); + } + break; + case -3: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, + schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, + schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be + // checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, + User struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); + oprot.writeFieldEnd(); + } + if (struct.password != null) { + oprot.writeFieldBegin(PASSWORD_FIELD_DESC); + oprot.writeString(struct.password); + oprot.writeFieldEnd(); + } + if (struct.userName != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.userName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UserTupleSchemeFactory implements SchemeFactory { + public UserTupleScheme getScheme() { + return new UserTupleScheme(); + } + } + + private static class UserTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, User struct) + throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserName()) { + optionals.set(0); + } + if (struct.isSetPassword()) { + optionals.set(1); + } + if (struct.isSetPath()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUserName()) { + oprot.writeString(struct.userName); + } + if (struct.isSetPassword()) { + oprot.writeString(struct.password); + } + if (struct.isSetPath()) { + oprot.writeString(struct.path); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, User struct) + throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.userName = iprot.readString(); + struct.setUserNameIsSet(true); + } + if (incoming.get(1)) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } + if (incoming.get(2)) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } + } + } } - -- cgit v1.2.3-55-g7522 From 31a2f63068f7aef263d562df41d6b2da46d687a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Apr 2014 11:32:32 +0200 Subject: Bugs behoben: -short_description hat nun korrekte Quelle -Filename nun ohne führendes "/" --- Dozentenmodulserver/bin/util/XMLCreator.class | Bin 6292 -> 6327 bytes Dozentenmodulserver/src/util/XMLCreator.java | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dozentenmodulserver/bin/util/XMLCreator.class b/Dozentenmodulserver/bin/util/XMLCreator.class index 025904a6..9700459e 100644 Binary files a/Dozentenmodulserver/bin/util/XMLCreator.class and b/Dozentenmodulserver/bin/util/XMLCreator.class differ diff --git a/Dozentenmodulserver/src/util/XMLCreator.java b/Dozentenmodulserver/src/util/XMLCreator.java index 8a8bd701..3f5866e6 100644 --- a/Dozentenmodulserver/src/util/XMLCreator.java +++ b/Dozentenmodulserver/src/util/XMLCreator.java @@ -33,7 +33,7 @@ public class XMLCreator { private String filePath = "/srv/openslx/nfs/temp/"; // phone param not existing - private String query = "SELECT m_VLData_imageInfo.image_path ,vorname, nachname, mail, shortdescription, description, m_operatingSystem.name as os, m_VLData_lecture.admin_changeTime as time " + private String query = "SELECT m_VLData_imageInfo.image_path ,vorname, nachname, mail, shortdescription, description, m_operatingSystem.name as os, m_VLData_lecture.admin_changeTime as time, m_VLData_lecture.name as lectureName " + "FROM bwLehrpool.m_VLData_lecture, bwLehrpool.m_VLData_imageInfo, bwLehrpool.m_user, bwLehrpool.m_operatingSystem " + "WHERE m_user.userID = m_VLData_lecture.admin_owner " + "AND m_VLData_imageInfo.GUID_imageID = m_VLData_lecture.imageID " @@ -118,7 +118,7 @@ public class XMLCreator { Element imgName = doc.createElement("image_name"); entry.appendChild(imgName); String imagePath = rs.getString("image_path").substring( - rs.getString("image_path").lastIndexOf("/")); + rs.getString("image_path").lastIndexOf("/")+1); //+1 um das "/" los zu werden imgName.setAttribute("param", imagePath); @@ -138,7 +138,7 @@ public class XMLCreator { Element shortDesc = doc.createElement("short_description"); entry.appendChild(shortDesc); - shortDesc.setAttribute("param", rs.getString("shortdescription")); + shortDesc.setAttribute("param", rs.getString("lectureName")); // TODO append latest change date and time Element longDesc = doc.createElement("long_description"); -- cgit v1.2.3-55-g7522 From 60d32ae1cbc729c664888b1a255845a10fed34b1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Apr 2014 15:59:46 +0200 Subject: Logging weiter ausgebaut, XML werden nun mit einem eigenen Namen erzeugt und gespeichert --- Dozentenmodulserver/src/server/BinaryListener.java | 8 +- Dozentenmodulserver/src/server/ServerHandler.java | 2 +- Dozentenmodulserver/src/server/startServer.java | 4 +- Dozentenmodulserver/src/sql/SQL.java | 440 +++++++++++++-------- Dozentenmodulserver/src/util/XMLCreator.java | 40 +- 5 files changed, 316 insertions(+), 178 deletions(-) diff --git a/Dozentenmodulserver/src/server/BinaryListener.java b/Dozentenmodulserver/src/server/BinaryListener.java index 7d8b94b5..8d592992 100644 --- a/Dozentenmodulserver/src/server/BinaryListener.java +++ b/Dozentenmodulserver/src/server/BinaryListener.java @@ -1,5 +1,7 @@ package server; +import java.util.Date; + import org.apache.log4j.Logger; import org.apache.thrift.server.TServer; import org.apache.thrift.server.TServer.Args; @@ -20,13 +22,13 @@ public class BinaryListener implements Runnable final TServerTransport transport; try { transport = new TServerSocket( 9090 ); - log.info("Connected to Port 9090"); + log.info(new Date()+" - Connected to Port 9090"); } catch ( TTransportException e ) { - log.fatal( "Could not listen on port 9090" ); + log.fatal( new Date() +" - Could not listen on port 9090" ); return; } TServer server = new TSimpleServer( new Args( transport ).processor( processor ) ); - log.info("Starting Running Server"); + log.info(new Date() +" - Started Running Server"); server.serve(); } diff --git a/Dozentenmodulserver/src/server/ServerHandler.java b/Dozentenmodulserver/src/server/ServerHandler.java index d50c65a9..681a9a7c 100644 --- a/Dozentenmodulserver/src/server/ServerHandler.java +++ b/Dozentenmodulserver/src/server/ServerHandler.java @@ -201,7 +201,7 @@ public class ServerHandler implements Server.Iface { XMLCreator xml=new XMLCreator(con, name); try { xml.create(name); - System.out.println("creator durch"); + System.out.println(new Date() + " - Creator beendet"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); diff --git a/Dozentenmodulserver/src/server/startServer.java b/Dozentenmodulserver/src/server/startServer.java index 7a93183d..e1ab22c0 100644 --- a/Dozentenmodulserver/src/server/startServer.java +++ b/Dozentenmodulserver/src/server/startServer.java @@ -23,7 +23,7 @@ public class startServer { public static void main(String[] args) { BasicConfigurator.configure(); - log.info( new Date() + ", starting Application\n" ); + log.info( new Date() + " - starting Application\n" ); Thread t; t = new Thread(new BinaryListener()); servers.add(t); @@ -42,7 +42,7 @@ public class startServer { } } } - log.info( new Date()+", all Servers shut down, exiting...\n" ); + log.info( new Date()+" - all Servers shut down, exiting...\n" ); } diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java index f28fdd67..0a2f5ab2 100644 --- a/Dozentenmodulserver/src/sql/SQL.java +++ b/Dozentenmodulserver/src/sql/SQL.java @@ -10,314 +10,434 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.Random; +import org.apache.log4j.Logger; + +import server.BinaryListener; public class SQL { + + private static Logger log = Logger.getLogger( BinaryListener.class ); - public Connection getConnection() - { + public Connection getConnection() { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); - } + } try { - Connection con=DriverManager.getConnection("jdbc:mysql://127.0.0.1/bwLehrpool?user=root&password=slx-ng-open"); + Connection con = DriverManager + .getConnection("jdbc:mysql://127.0.0.1/bwLehrpool?user=root&password=slx-ng-open"); con.setAutoCommit(false); + log.info(new Date() + " - Connection returned to Client."); return con; } catch (SQLException e) { // TODO Auto-generated catch block + log.info(new Date() + " - Could not return connection to Client."); e.printStackTrace(); } return null; } - - public int writeFTPUser(Connection con,String user, String pass) - { + + public int writeFTPUser(Connection con, String user, String pass) { Statement stm; try { - stm=con.createStatement(); - - int ret=stm.executeUpdate("INSERT INTO `bwLehrpool`.`FtpUsers`(`User`,`Password`,`Uid`,`Gid`,`Dir`)VALUES('"+user+"',SHA1('"+pass+"'),'10001','12345','/srv/openslx/nfs/temp');"); + stm = con.createStatement(); + + int ret = stm + .executeUpdate("INSERT INTO `bwLehrpool`.`FtpUsers`(`User`,`Password`,`Uid`,`Gid`,`Dir`)VALUES('" + + user + + "',SHA1('" + + pass + + "'),'10001','12345','/srv/openslx/nfs/temp');"); con.commit(); + log.info(new Date() + " - created FTPUser "+user+" : "+pass+"."); return ret; } catch (SQLException e) { // TODO Auto-generated catch block + log.info(new Date() + " - FTPUser not created."); e.printStackTrace(); } return -1; } - - public int DeleteUser(Connection con, String user) - { + + public int DeleteUser(Connection con, String user) { Statement stm; try { - stm=con.createStatement(); - - int ret=stm.executeUpdate("DELETE FROM `bwLehrpool`.`FtpUsers` where User like '"+user+"';"); + stm = con.createStatement(); + + int ret = stm + .executeUpdate("DELETE FROM `bwLehrpool`.`FtpUsers` where User like '" + + user + "';"); con.commit(); + log.info(new Date() + " - FTPUser "+user+" deleted."); return ret; } catch (SQLException e) { // TODO Auto-generated catch block + log.info(new Date() + " - Could not delete FTPUser "+user+"."); e.printStackTrace(); } return -1; } - - public ResultSet getImage(Connection con) - { + + public ResultSet getImage(Connection con) { try { - Statement stm=con.createStatement(); - - return stm.executeQuery("SELECT image_name FROM bwLehrpool.m_VLData_imageInfo;"); - - + Statement stm = con.createStatement(); + + return stm + .executeQuery("SELECT image_name FROM bwLehrpool.m_VLData_imageInfo;"); + } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } - - + return null; } - public ResultSet getPathOfImage(Connection con, String image_id, String version) - { + public ResultSet getPathOfImage(Connection con, String image_id, + String version) { try { - Statement stm=con.createStatement(); - - return stm.executeQuery("SELECT image_path FROM bwLehrpool.m_VLData_imageInfo where GUID_imageID='"+image_id+"' and imageVersion='"+version+"';"); - - + Statement stm = con.createStatement(); + + return stm + .executeQuery("SELECT image_path FROM bwLehrpool.m_VLData_imageInfo where GUID_imageID='" + + image_id + + "' and imageVersion='" + + version + + "';"); + } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } - - + return null; } - - public int setInstitution(Connection con,String university) - { + + public int setInstitution(Connection con, String university) { try { - Statement stm=con.createStatement(); - - - - ResultSet ret=stm.executeQuery("SELECT * FROM bwLehrpool.m_institution where name like'"+university+"';"); - if(ret.next()==false) - { - Random rand=new Random(); - int id=rand.nextInt(); - stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_institution`(`institutionID`,`name`)VALUES('"+id+"','"+university+"');"); + Statement stm = con.createStatement(); + + ResultSet ret = stm + .executeQuery("SELECT * FROM bwLehrpool.m_institution where name like'" + + university + "';"); + if (ret.next() == false) { + Random rand = new Random(); + int id = rand.nextInt(); + stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_institution`(`institutionID`,`name`)VALUES('" + + id + "','" + university + "');"); con.commit(); - ResultSet rs=stm.executeQuery("SELECT institutionID FROM bwLehrpool.m_institution WHERE name like '"+university+"';"); + ResultSet rs = stm + .executeQuery("SELECT institutionID FROM bwLehrpool.m_institution WHERE name like '" + + university + "';"); rs.next(); return rs.getInt("institutionID"); - } - else - { + } else { return ret.getInt("institutionID"); } - + } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return -1; } - - - - public int setPerson(Connection con,String login, String lastname, String firstname, String mail, Date lastlogin,int Institution) - { + + public int setPerson(Connection con, String login, String lastname, + String firstname, String mail, Date lastlogin, int Institution) { DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); try { - Statement stm=con.createStatement(); - - ResultSet ret=stm.executeQuery("SELECT userID FROM bwLehrpool.m_user where Nachname like '"+lastname+"' and Vorname like '"+firstname+"';"); - if(ret.next()==false) - { - Random rand=new Random(); - int id=rand.nextInt(); - stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_user`(`userID`,`loginName`,`nachname`,`vorname`,`mail`,`lastLogin`,`institution`)VALUES('"+id+"','Platzhalter','"+lastname+"','"+firstname+"','"+mail+"','"+formatter.format(new Date())+"','"+Institution+"');"); - con.commit(); - ResultSet rs=stm.executeQuery("SELECT userID FROM bwLehrpool.m_user where Nachname like '"+lastname+"' and Vorname like '"+firstname+"';"); - rs.next(); - return rs.getInt("userID"); - } - else - { + Statement stm = con.createStatement(); + + ResultSet ret = stm + .executeQuery("SELECT userID FROM bwLehrpool.m_user where Nachname like '" + + lastname + + "' and Vorname like '" + + firstname + + "';"); + if (ret.next() == false) { + Random rand = new Random(); + int id = rand.nextInt(); + stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_user`(`userID`,`loginName`,`nachname`,`vorname`,`mail`,`lastLogin`,`institution`)VALUES('" + + id + + "','Platzhalter','" + + lastname + + "','" + + firstname + + "','" + + mail + + "','" + + formatter.format(new Date()) + + "','" + + Institution + + "');"); + con.commit(); + ResultSet rs = stm + .executeQuery("SELECT userID FROM bwLehrpool.m_user where Nachname like '" + + lastname + + "' and Vorname like '" + + firstname + + "';"); + rs.next(); + return rs.getInt("userID"); + } else { return ret.getInt("userID"); } - + } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return -1; } - - public boolean setImageData(Connection con, int pk_person, boolean license, boolean internet, long cpu, long ram, String imagename, String imagePath) - { - + + public boolean setImageData(Connection con, int pk_person, boolean license, + boolean internet, long cpu, long ram, String imagename, + String imagePath) { + DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); - - int internet_bol=0; - int license_bol=0; - if(internet==true) - { - internet_bol=1; + + int internet_bol = 0; + int license_bol = 0; + if (internet == true) { + internet_bol = 1; } - if(license==true) - { - license_bol=1; + if (license == true) { + license_bol = 1; } try { - Statement stm=con.createStatement(); - Random random=new Random(); - int uid=random.nextInt(); - stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_imageInfo`(`GUID_imageID`,`imageVersion`,`image_name`,`image_path`,`image_lastCall`,`image_create_time`,`image_update_time`,`image_owner`,`image_change_by`,`rec_create_time`,`rec_change_time`,`rec_owner`,`rec_change_by`,`content_operatingSystem`,`status_isCompressed`,`status_isSecure`,`status_isOptimzed`,`status_isValid`,`status_isReady`,`status_isDeleted`,`status_isLastOfficialVersion`,`cond_hasLicenseRestriction`,`cond_hasInternetRestriction`,`cond_minRAM`,`cond_minCPUs`)VALUES('"+uid+"',1,'"+imagename+"','"+imagePath+"','"+formatter.format(new Date())+"','"+formatter.format(new Date())+"','"+formatter.format(new Date())+"','"+pk_person+"','"+pk_person+"','"+formatter.format(new Date())+"','"+formatter.format(new Date())+"','"+pk_person+"','"+pk_person+"',1,1,1,1,1,1,0,0,'"+license_bol+"','"+internet_bol+"','"+ram+"','"+cpu+"');"); + Statement stm = con.createStatement(); + Random random = new Random(); + int uid = random.nextInt(); + stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_imageInfo`(`GUID_imageID`,`imageVersion`,`image_name`,`image_path`,`image_lastCall`,`image_create_time`,`image_update_time`,`image_owner`,`image_change_by`,`rec_create_time`,`rec_change_time`,`rec_owner`,`rec_change_by`,`content_operatingSystem`,`status_isCompressed`,`status_isSecure`,`status_isOptimzed`,`status_isValid`,`status_isReady`,`status_isDeleted`,`status_isLastOfficialVersion`,`cond_hasLicenseRestriction`,`cond_hasInternetRestriction`,`cond_minRAM`,`cond_minCPUs`)VALUES('" + + uid //GUID_imageID + + "',1,'" //imageVersion + + imagename //image_name + + "','" + + imagePath //image_path + + "','" + + formatter.format(new Date()) //image_lastCall + + "','" + + formatter.format(new Date()) //image_create_time + + "','" + + formatter.format(new Date()) //image_update_time + + "','" + + pk_person //image_owner + + "','" + + pk_person //image_change_by + + "','" + + formatter.format(new Date()) //rec_create_time + + "','" + + formatter.format(new Date()) //rec_change_time + + "','" + + pk_person //rec_owner + + "','" + + pk_person //rec_change_by + + "',0" //content_operatingSystem + + ",1" //status_isCompressed + + ",1" //status_isSecure + + ",1" //status_isOptimzed + + ",1" //status_isValid + + ",1" //status_isReady + + ",0" //status_isDeleted + + ",0,'" //status_isLastOfficialVersion + + license_bol //cond_hasLicenseRestriction + + "','" + + internet_bol //cond_hasInternetRestriction + + "','" + + ram //cond_minRAM + + "','" + + cpu //cond_minCPUs + + "');"); con.commit(); - + } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return true; - + } - - public ResultSet getImageList(Connection con){ + + public ResultSet getImageList(Connection con) { try { - Statement stm=con.createStatement(); - - return stm.executeQuery("SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name, '' as lecture,vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and vl.image_owner=u.userID and vl.image_name not in (SELECT vl.image_name FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID) union SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name, lect.name as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID;"); - - + Statement stm = con.createStatement(); + + return stm + .executeQuery("SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name, '' as lecture,vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and vl.image_owner=u.userID and vl.image_name not in (SELECT vl.image_name FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID) union SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name, lect.name as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID;"); + } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } - - public ResultSet getLectureList(Connection con){ + + public ResultSet getLectureList(Connection con) { try { - Statement stm=con.createStatement(); - - return stm.executeQuery("SELECT l.lectureID, l.name, l.isActive,l.startTime,l.endTime,l.lastUsed,l.description, i.image_name, concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_lecture l, bwLehrpool.m_VLData_imageInfo i, bwLehrpool.m_user u where i.GUID_imageID=l.imageID and l.admin_owner=u.userID;"); - - + Statement stm = con.createStatement(); + + return stm + .executeQuery("SELECT l.lectureID, l.name, l.isActive,l.startTime,l.endTime,l.lastUsed,l.description, i.image_name, concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_lecture l, bwLehrpool.m_VLData_imageInfo i, bwLehrpool.m_user u where i.GUID_imageID=l.imageID and l.admin_owner=u.userID;"); + } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } - - - public ResultSet getAllOS(Connection con) - { - - + + public ResultSet getAllOS(Connection con) { + try { - Statement stm=con.createStatement(); - return stm.executeQuery("SELECT name FROM bwLehrpool.m_operatingSystem;"); + Statement stm = con.createStatement(); + return stm + .executeQuery("SELECT name FROM bwLehrpool.m_operatingSystem;"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } - - return null; - + } - - public ResultSet getPersonData(Connection con,String Vorname, String Nachname) - { + + public ResultSet getPersonData(Connection con, String Vorname, + String Nachname) { try { - Statement stm=con.createStatement(); - return stm.executeQuery("SELECT u.Nachname, u.Vorname, u.mail, i.name FROM bwLehrpool.m_user u, bwLehrpool.m_institution i where u.Nachname like '"+Nachname+"' and u.Vorname like '"+Vorname+"' and u.institution=i.institutionID;"); + Statement stm = con.createStatement(); + return stm + .executeQuery("SELECT u.Nachname, u.Vorname, u.mail, i.name FROM bwLehrpool.m_user u, bwLehrpool.m_institution i where u.Nachname like '" + + Nachname + + "' and u.Vorname like '" + + Vorname + + "' and u.institution=i.institutionID;"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } - - public int setLectureData(Connection con, int pk_person, int pk_image,int imageversion, String name, String desc, String shortdesc,String start, String end, boolean isactive) - { - + + public int setLectureData(Connection con, int pk_person, int pk_image, + int imageversion, String name, String desc, String shortdesc, + String start, String end, boolean isactive) { + DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); - int active_bol=0; + int active_bol = 0; - if(isactive==true) - { - active_bol=1; + if (isactive == true) { + active_bol = 1; } try { - Statement stm=con.createStatement(); - Random random=new Random(); - int uid=random.nextInt(); - stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_lecture`(`lectureID`,`name`,`isActive`,`startTime`,`endTime`,`lastUsed`,`shortDescription`,`description`,`imageID`,`imageVersion`,`admin_createTime`,`admin_changeTime`,`admin_owner`,`admin_change_by`)VALUES('"+uid+"','"+name+"','"+active_bol+"','"+start+"','"+end+"','"+formatter.format(new Date())+"','"+shortdesc+"','"+desc+"','"+pk_image+"','"+imageversion+"','"+formatter.format(new Date())+"','"+formatter.format(new Date())+"','"+pk_person+"','"+pk_person+"');"); + Statement stm = con.createStatement(); + Random random = new Random(); + int uid = random.nextInt(); + stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_lecture`(`lectureID`,`name`,`isActive`,`startTime`,`endTime`,`lastUsed`,`shortDescription`,`description`,`imageID`,`imageVersion`,`admin_createTime`,`admin_changeTime`,`admin_owner`,`admin_change_by`)VALUES('" + + uid + + "','" + + name + + "','" + + active_bol + + "','" + + start + + "','" + + end + + "','" + + formatter.format(new Date()) + + "','" + + shortdesc + + "','" + + desc + + "','" + + pk_image + + "','" + + imageversion + + "','" + + formatter.format(new Date()) + + "','" + + formatter.format(new Date()) + + "','" + + pk_person + + "','" + + pk_person + "');"); con.commit(); - + } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return 0; - + } - - public ResultSet getImageIDandVersion(Connection con,String name) - { + + public ResultSet getImageIDandVersion(Connection con, String name) { try { - Statement stm=con.createStatement(); - return stm.executeQuery("SELECT GUID_imageID, imageVersion FROM bwLehrpool.m_VLData_imageInfo where image_name like '"+name+"';"); + Statement stm = con.createStatement(); + return stm + .executeQuery("SELECT GUID_imageID, imageVersion FROM bwLehrpool.m_VLData_imageInfo where image_name like '" + + name + "';"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } - - public ResultSet getImageData(Connection con,String id, String version){ + + public ResultSet getImageData(Connection con, String id, String version) { try { - Statement stm=con.createStatement(); + Statement stm = con.createStatement(); System.out.println("Test"); - return stm.executeQuery("SELECT image_name,cond_hasInternetRestriction,cond_hasLicenseRestriction, cond_minCPUs, cond_minRAM FROM bwLehrpool.m_VLData_imageInfo where GUID_imageID = '"+id+"' and imageVersion = '"+version+"' ;"); + return stm + .executeQuery("SELECT image_name,cond_hasInternetRestriction,cond_hasLicenseRestriction, cond_minCPUs, cond_minRAM FROM bwLehrpool.m_VLData_imageInfo where GUID_imageID = '" + + id + "' and imageVersion = '" + version + "' ;"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } - - public int UpdateImageData(Connection con,String name,String newName,boolean license, boolean internet, long cpu, long ram,String id, String version){ + + public int UpdateImageData(Connection con, String name, String newName, + boolean license, boolean internet, long cpu, long ram, String id, + String version) { try { DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); - Statement stm=con.createStatement(); - int newVersion=Integer.parseInt(version)+1; - - int internet_bol=0; - int license_bol=0; - if(internet==true) - { - internet_bol=1; + Statement stm = con.createStatement(); + int newVersion = Integer.parseInt(version) + 1; + + int internet_bol = 0; + int license_bol = 0; + if (internet == true) { + internet_bol = 1; } - if(license==true) - { - license_bol=1; + if (license == true) { + license_bol = 1; } System.out.println(internet_bol); System.out.println(license_bol); - stm.executeUpdate("UPDATE `bwLehrpool`.`m_VLData_imageInfo` SET `imageVersion` = '"+newVersion+"',`image_name` = '"+newName+"',`image_update_time` = '"+formatter.format(new Date())+"',`rec_change_time` = '"+formatter.format(new Date())+"',`cond_hasLicenseRestriction` = '"+license_bol+"',`cond_hasInternetRestriction` = '"+internet_bol+"',`cond_minRAM` = '"+ram+"',`cond_minCPUs` = '"+cpu+"' WHERE `GUID_imageID` = '"+id+"' AND `imageVersion` = '"+version+"';"); + stm.executeUpdate("UPDATE `bwLehrpool`.`m_VLData_imageInfo` SET `imageVersion` = '" + + newVersion + + "',`image_name` = '" + + newName + + "',`image_update_time` = '" + + formatter.format(new Date()) + + "',`rec_change_time` = '" + + formatter.format(new Date()) + + "',`cond_hasLicenseRestriction` = '" + + license_bol + + "',`cond_hasInternetRestriction` = '" + + internet_bol + + "',`cond_minRAM` = '" + + ram + + "',`cond_minCPUs` = '" + + cpu + + "' WHERE `GUID_imageID` = '" + + id + + "' AND `imageVersion` = '" + version + "';"); con.commit(); return 0; } catch (SQLException e) { diff --git a/Dozentenmodulserver/src/util/XMLCreator.java b/Dozentenmodulserver/src/util/XMLCreator.java index 3f5866e6..111a6337 100644 --- a/Dozentenmodulserver/src/util/XMLCreator.java +++ b/Dozentenmodulserver/src/util/XMLCreator.java @@ -5,6 +5,9 @@ import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -15,10 +18,13 @@ import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; +import org.apache.log4j.Logger; import org.w3c.dom.Comment; import org.w3c.dom.Document; import org.w3c.dom.Element; +import server.BinaryListener; + public class XMLCreator { /* @@ -31,13 +37,17 @@ public class XMLCreator { private ResultSet rs = null; private String vmName; private String filePath = "/srv/openslx/nfs/temp/"; + private String imageName; + private String xmlName; + private static Logger log = Logger.getLogger( BinaryListener.class ); // phone param not existing - private String query = "SELECT m_VLData_imageInfo.image_path ,vorname, nachname, mail, shortdescription, description, m_operatingSystem.name as os, m_VLData_lecture.admin_changeTime as time, m_VLData_lecture.name as lectureName " - + "FROM bwLehrpool.m_VLData_lecture, bwLehrpool.m_VLData_imageInfo, bwLehrpool.m_user, bwLehrpool.m_operatingSystem " + private String query = "SELECT m_VLData_imageInfo.image_path ,vorname, nachname, mail, shortdescription, description, m_operatingSystem.name as os, m_VLData_lecture.admin_changeTime as time, m_VLData_lecture.name as lectureName, m_user.institution as userInstitution, m_user.loginName as loginName, m_institution.name as institutionName " + + "FROM bwLehrpool.m_VLData_lecture, bwLehrpool.m_VLData_imageInfo, bwLehrpool.m_user, bwLehrpool.m_operatingSystem, bwLehrpool.m_institution " + "WHERE m_user.userID = m_VLData_lecture.admin_owner " + "AND m_VLData_imageInfo.GUID_imageID = m_VLData_lecture.imageID " + "AND m_VLData_imageInfo.content_operatingSystem = m_operatingSystem.operatingSystemID " + + "AND m_user.institution = m_institution.institutionID " + "AND m_VLData_lecture.name = "; public XMLCreator(Connection con) { @@ -61,10 +71,10 @@ public class XMLCreator { boolean success = startCreation(); - if (success) { + if (success) { return true; } - + log.info(new Date() + " - Could not create XML-File '"+vmName+"'. Error in create(String vmName)."); return false; } @@ -85,6 +95,7 @@ public class XMLCreator { if (success) { return true; } + log.info(new Date() + " - Could not create XML-File '"+vmName+"'. Error in create(String vmName)."); return false; } @@ -117,10 +128,10 @@ public class XMLCreator { Element imgName = doc.createElement("image_name"); entry.appendChild(imgName); - String imagePath = rs.getString("image_path").substring( - rs.getString("image_path").lastIndexOf("/")+1); //+1 um das "/" los zu werden + imageName = rs.getString("image_path").substring( + rs.getString("image_path").lastIndexOf("/")+1); //+1 um das führende "/" los zu werden - imgName.setAttribute("param", imagePath); + imgName.setAttribute("param", imageName); Element creator = doc.createElement("creator"); entry.appendChild(creator); @@ -144,7 +155,7 @@ public class XMLCreator { Element longDesc = doc.createElement("long_description"); entry.appendChild(longDesc); longDesc.setAttribute("param", rs.getString("description") - + " last update: " + rs.getString("time")); + + "; last update: " + rs.getString("time")); Element os = doc.createElement("os"); entry.appendChild(os); @@ -189,10 +200,14 @@ public class XMLCreator { .newInstance(); Transformer transformer = transformerFactory.newTransformer(); DOMSource source = new DOMSource(doc); - - StreamResult result = new StreamResult(new File(filePath - + imagePath.replace("vmdk", "xml"))); // see filepath at top of - // class + + //Set XML-filename + DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); + xmlName=formatter.format(new Date()) + "_" + rs.getString("institutionName") + "_" + rs.getString("loginName") + "_" + rs.getString("lectureName") + ".xml"; + + //Write file + StreamResult result = new StreamResult(new File(filePath+ xmlName)); // see filepath at top of class + transformer.transform(source, result); // cleanup @@ -200,6 +215,7 @@ public class XMLCreator { st.close(); // return + log.info(new Date() + " - XML-File '"+xmlName+"' successfully created."); return true; } } -- cgit v1.2.3-55-g7522 From 88bc9ab6b8efda26c7da12bc9d9a7fae26b15efd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Apr 2014 16:00:37 +0200 Subject: Button Text angepasst --- Dozentenmodul/src/gui/image/FTPUploader_GUI.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dozentenmodul/src/gui/image/FTPUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPUploader_GUI.java index 250347b0..bb686382 100644 --- a/Dozentenmodul/src/gui/image/FTPUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPUploader_GUI.java @@ -163,9 +163,11 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { if (lblNewLabel.getText().isEmpty()) { // wenn leer, dann upload button nicht freigeben btnUploadStarten.setEnabled(false); + btnUploadStarten.setText("Bitte warten"); } else { // wenn leer, dann upload button nicht freigeben btnUploadStarten.setEnabled(true); + btnUploadStarten.setText("Upload auf Server starten"); } } }); @@ -370,8 +372,8 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { private void buttonUploadActionPerformed(ActionEvent event) { progressBar.setValue(0); - btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick - // und + btnUploadStarten.setEnabled(false); //verhindert einen weiteren klick + btnUploadStarten.setText("Bitte warten"); try { user = client.getFtpUser(); -- cgit v1.2.3-55-g7522 From 7c5a8b62d2bdc4c43352c249d14f7316d7e7d6a5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 12:15:48 +0200 Subject: Bugfixes -fehler abgefangen, wenn kein Zielordner ausgewählt ist -Buttons deaktiviert, solange der download nicht feritg ist -erscheinung angepasst -Button zum Hauptmenü eingefügt --- .../bin/gui/image/FTPUploader_GUI$3.class | Bin 1594 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$4.class | Bin 1041 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$5.class | Bin 771 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$6.class | Bin 1671 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$7.class | Bin 1616 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$8.class | Bin 856 -> 0 bytes Dozentenmodul/src/gui/image/FTPDownloader_GUI.java | 188 ++++++++++++--------- 7 files changed, 110 insertions(+), 78 deletions(-) delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class deleted file mode 100644 index 924e0a89..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class deleted file mode 100644 index 2be81e8d..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class deleted file mode 100644 index c09c2054..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class deleted file mode 100644 index 6a509054..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class deleted file mode 100644 index d7cb923d..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class deleted file mode 100644 index f6faec31..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class and /dev/null differ diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java index 43f43e99..f6175934 100644 --- a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -6,7 +6,6 @@ import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Toolkit; import java.io.File; - import javax.swing.JButton; import javax.swing.JFileChooser; import javax.swing.JFrame; @@ -17,8 +16,8 @@ import javax.swing.SwingConstants; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; - import ftp.DownloadTask; +import gui.intro.MainMenue_GUI; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; @@ -30,11 +29,8 @@ import java.awt.SystemColor; import java.awt.Font; import javax.swing.JTextPane; import javax.swing.JSeparator; - import models.Image; - import org.apache.thrift.TException; - import server.Server.Client; import server.User; import thrift.ThriftConnection; @@ -45,7 +41,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener @SuppressWarnings("unused") private JPanel contentPane; private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; + JLabel lblPath; JLabel downspeed; User user; JProgressBar progressBar; @@ -56,27 +52,21 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener String downloadFile = ""; static String arg = ""; DownloadTask task; - JLabel bytesreadlbl; + JLabel lblBytesread; JLabel lblNewLabel_3; JLabel labelVerbleibend; long filesize; double speed; + int progress = 0; // progress of download long bytesread; JLabel labelZeit; boolean taskrun = false; ThriftConnection thrift = new ThriftConnection(); Client client = thrift.getThriftConnection(); - JButton buttonback = new JButton("Zur\u00FCck"); + JButton btnZurck = new JButton("Zur\u00FCck"); + JButton btnDownloadStarten = new JButton("Download starten"); + JButton btnMainMenu = new JButton("Hauptmen\u00FC"); - /** - * Launch the application. - */ - /* - * public static void main(String[] args) { EventQueue.invokeLater(new - * Runnable() { public void run() { try { FTPDownloader frame = new - * FTPDownloader(); frame.setVisible(true); } catch (Exception e) { - * e.printStackTrace(); } } }); } - */ /** * Create the frame. @@ -95,14 +85,13 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener } task.cancel(true); } - dispose(); - } + //dispose(); + System.exit(0); + }//end window closing }); setResizable(false); // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException @@ -111,7 +100,6 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener e.printStackTrace(); } - setBackground(Color.WHITE); setTitle("Dozentenmodul *Prototyp*"); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); @@ -133,76 +121,96 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener fc.showOpenDialog(getParent()); File dir = fc.getSelectedFile(); - lblNewLabel.setText(dir.getAbsolutePath()); + // check if directory is selected + if (dir != null) { + // is selected + System.out.println("Target directory exists."); + lblPath.setText(dir.getAbsolutePath()); + } else { + // no directory selected + lblPath.setText(""); + }// end if } }); - btnSpeicherortAuswhlen.setBounds(57, 124, 141, 23); + btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); contentPanel.add(btnSpeicherortAuswhlen); } - lblNewLabel = new JLabel("C:\\"); - lblNewLabel.setBounds(208, 124, 238, 23); - contentPanel.add(lblNewLabel); + lblPath = new JLabel(""); + lblPath.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent arg0) { + if (lblPath.getText().isEmpty()) { + // wenn leer, dann upload button nicht freigeben + btnDownloadStarten.setEnabled(false); + btnDownloadStarten.setText("Bitte warten"); + } else { + // wenn leer, dann upload button nicht freigeben + btnDownloadStarten.setEnabled(true); + btnDownloadStarten.setText("Download starten"); + } + } + }); + lblPath.setBounds(102, 158, 485, 23); + contentPanel.add(lblPath); - JButton btnDownloadStarten = new JButton("Download starten"); + btnDownloadStarten.setEnabled(false); btnDownloadStarten.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { buttonDownloadActionPerformed(arg0); } }); - btnDownloadStarten.setBounds(57, 168, 141, 23); + btnDownloadStarten.setBounds(102, 200, 173, 23); contentPanel.add(btnDownloadStarten); progressBar = new JProgressBar(0, 100); progressBar.setStringPainted(true); - progressBar.setBounds(57, 202, 497, 30); + progressBar.setBounds(102, 234, 485, 30); contentPanel.add(progressBar); JLabel lblDownloadgeschwindigkeit = new JLabel( "Downloadgeschwindigkeit:"); - lblDownloadgeschwindigkeit.setBounds(57, 243, 141, 14); + lblDownloadgeschwindigkeit.setBounds(102, 275, 141, 14); contentPanel.add(lblDownloadgeschwindigkeit); downspeed = new JLabel("0"); - downspeed.setBounds(308, 243, 95, 14); + downspeed.setBounds(374, 275, 117, 14); contentPanel.add(downspeed); - JLabel lblNewLabel_1 = new JLabel("Fertig:"); - lblNewLabel_1.setBounds(57, 293, 46, 14); - contentPanel.add(lblNewLabel_1); + JLabel lblFertig = new JLabel("Fertig:"); + lblFertig.setBounds(102, 325, 46, 14); + contentPanel.add(lblFertig); - bytesreadlbl = new JLabel(""); - bytesreadlbl.setBounds(66, 244, 108, 14); - contentPanel.add(bytesreadlbl); + lblBytesread = new JLabel("0"); + lblBytesread.setBounds(183, 325, 108, 14); + contentPanel.add(lblBytesread); - JLabel lblNewLabel_2 = new JLabel("von:"); - lblNewLabel_2.setBounds(226, 293, 46, 14); - contentPanel.add(lblNewLabel_2); + JLabel lblVon = new JLabel("von:"); + lblVon.setBounds(318, 325, 46, 14); + contentPanel.add(lblVon); - lblNewLabel_3 = new JLabel(""); - lblNewLabel_3.setBounds(235, 244, 108, 14); + lblNewLabel_3 = new JLabel("0"); + lblNewLabel_3.setBounds(374, 325, 117, 14); contentPanel.add(lblNewLabel_3); JLabel lblMbVerbleibend = new JLabel("Verbleibend:"); - lblMbVerbleibend.setBounds(57, 318, 71, 14); + lblMbVerbleibend.setBounds(102, 350, 71, 14); contentPanel.add(lblMbVerbleibend); - labelVerbleibend = new JLabel(""); - labelVerbleibend.setBounds(91, 269, 108, 14); + labelVerbleibend = new JLabel("0"); + labelVerbleibend.setBounds(183, 350, 108, 14); contentPanel.add(labelVerbleibend); JLabel lblGeschtzteVerbleibendeZeit = new JLabel( "Gesch\u00E4tzte Verbleibende Zeit:"); - lblGeschtzteVerbleibendeZeit.setBounds(57, 268, 150, 14); + lblGeschtzteVerbleibendeZeit.setBounds(102, 300, 150, 14); contentPanel.add(lblGeschtzteVerbleibendeZeit); - labelZeit = new JLabel(""); - labelZeit.setBounds(261, 219, 117, 14); + labelZeit = new JLabel("0"); + labelZeit.setBounds(374, 300, 117, 14); contentPanel.add(labelZeit); JPanel panel = new JPanel(); @@ -253,21 +261,29 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener separator_1.setBounds(-10, 648, 597, 2); contentPanel.add(separator_1); - JLabel label_6 = new JLabel("1."); - label_6.setBounds(24, 128, 23, 14); - contentPanel.add(label_6); + JLabel lblSchritt = new JLabel("Schritt 1:"); + lblSchritt.setBounds(24, 128, 57, 14); + contentPanel.add(lblSchritt); + + JLabel lblSchritt_1 = new JLabel("Schritt 2:"); + lblSchritt_1.setBounds(24, 204, 57, 14); + contentPanel.add(lblSchritt_1); - JLabel label_7 = new JLabel("2."); - label_7.setBounds(24, 172, 23, 14); - contentPanel.add(label_7); + JLabel lblSchritt_3 = new JLabel("Schritt 3:"); + lblSchritt_3.setBounds(20, 423, 57, 14); + contentPanel.add(lblSchritt_3); + + JLabel lblKlickenSieAuf = new JLabel( + "Klicken Sie auf \"Fertigstellen\"."); + lblKlickenSieAuf.setBounds(98, 423, 241, 14); + contentPanel.add(lblKlickenSieAuf); { JPanel buttonPane = new JPanel(); buttonPane.setBackground(UIManager.getColor("Button.background")); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane, BorderLayout.SOUTH); { - buttonback.setEnabled(false); - buttonback.addActionListener(new ActionListener() { + btnZurck.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (taskrun == true) { task.cancel(true); @@ -279,14 +295,26 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener } } thrift.closeThriftConnection(); - SearchEditImage_GUI se=new SearchEditImage_GUI(); + SearchEditImage_GUI se = new SearchEditImage_GUI(); se.setVisible(true); dispose(); } }); - buttonback.setActionCommand("Cancel"); - buttonPane.add(buttonback); + btnZurck.setActionCommand("Cancel"); + buttonPane.add(btnZurck); } + + + btnMainMenu.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + thrift.closeThriftConnection(); + MainMenue_GUI mm = new MainMenue_GUI(); + mm.setVisible(true); + dispose(); + } + }); + btnMainMenu.setActionCommand("Cancel"); + buttonPane.add(btnMainMenu); } setVisible(true); @@ -295,19 +323,22 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener private void buttonDownloadActionPerformed(ActionEvent event) { progressBar.setValue(0); - + btnDownloadStarten.setEnabled(false); // verhindert schnellen zweiten + // Klick + btnDownloadStarten.setText("Bitte warten"); try { user = client.getFtpUser(); - - downloadFile=client.getPathOfImage(Image.image.getImageId(),Image.image.getVersion()); - + + downloadFile = client.getPathOfImage(Image.image.getImageId(), + Image.image.getVersion()); + } catch (TException e) { // TODO Auto-generated catch block e.printStackTrace(); } - + task = new DownloadTask(host, port, user.userName, user.password, - downloadFile, lblNewLabel.getText(), this); + downloadFile, lblPath.getText(), this); task.addPropertyChangeListener(this); task.execute(); taskrun = true; @@ -316,12 +347,20 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener public void propertyChange(PropertyChangeEvent arg0) { - int progress = 0; + progress = 0; if ("progress" == arg0.getPropertyName()) { progress = (Integer) arg0.getNewValue(); progressBar.setValue(progress); - if (progress == 100) { - buttonback.setEnabled(true); + + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + btnMainMenu.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + btnMainMenu.setEnabled(false); } } @@ -333,17 +372,10 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener String.valueOf(speed).lastIndexOf(".") + 3) + " MB/s"); - // }else - // { - // double MBSpeed=speed/1024; - // downspeed.setText(String.valueOf((MBSpeed)).substring(0, - // String.valueOf(MBSpeed).indexOf("."))); - // } - } if ("bytesread" == arg0.getPropertyName()) { bytesread = (long) arg0.getNewValue(); - bytesreadlbl.setText((bytesread / 1024 / 1024) + " MB"); + lblBytesread.setText((bytesread / 1024 / 1024) + " MB"); labelVerbleibend .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) + " MB"); -- cgit v1.2.3-55-g7522 From af89b47506f2253d4ee933111202b77387aac6f1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 12:16:31 +0200 Subject: Anwenudng schließt jetzt beim schließen des fensters --- Dozentenmodul/src/gui/image/FTPUploader_GUI.java | 76 ++++++++++++------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/Dozentenmodul/src/gui/image/FTPUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPUploader_GUI.java index bb686382..2af54b17 100644 --- a/Dozentenmodul/src/gui/image/FTPUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPUploader_GUI.java @@ -47,7 +47,7 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { @SuppressWarnings("unused") private JPanel contentPane; private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; + JLabel lblPath; JProgressBar progressBar; String host = "141.79.128.121"; int port = 21; @@ -97,7 +97,6 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { public void windowClosing(WindowEvent arg0) { if (taskrun == true) { try { - client.DeleteFtpUser(user.userName); } catch (TException e1) { // TODO Auto-generated catch block @@ -105,7 +104,8 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } task.cancel(true); } - } + System.exit(0); + }//end window closing }); setResizable(false); @@ -144,10 +144,10 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { System.out.println("File to upload exists"); uploadFile = file; filename = uploadFile.getName(); - lblNewLabel.setText(file.getAbsolutePath()); + lblPath.setText(file.getAbsolutePath()); } else { System.out.println("No file selected"); - lblNewLabel.setText(""); + lblPath.setText(""); }// end if } }); @@ -157,10 +157,10 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { contentPanel.add(btnSpeicherortAuswhlen); } - lblNewLabel = new JLabel(""); - lblNewLabel.addPropertyChangeListener(new PropertyChangeListener() { + lblPath = new JLabel(""); + lblPath.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent arg0) { - if (lblNewLabel.getText().isEmpty()) { + if (lblPath.getText().isEmpty()) { // wenn leer, dann upload button nicht freigeben btnUploadStarten.setEnabled(false); btnUploadStarten.setText("Bitte warten"); @@ -171,9 +171,9 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } } }); - lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT); - lblNewLabel.setBounds(285, 124, 302, 23); - contentPanel.add(lblNewLabel); + lblPath.setHorizontalAlignment(SwingConstants.LEFT); + lblPath.setBounds(102, 158, 485, 23); + contentPanel.add(lblPath); btnUploadStarten.setEnabled(false); btnUploadStarten.addActionListener(new ActionListener() { @@ -183,58 +183,58 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } }); - btnUploadStarten.setBounds(102, 168, 173, 23); + btnUploadStarten.setBounds(102, 200, 173, 23); contentPanel.add(btnUploadStarten); progressBar = new JProgressBar(0, 100); progressBar.setStringPainted(true); - progressBar.setBounds(102, 202, 485, 30); + progressBar.setBounds(102, 234, 485, 30); contentPanel.add(progressBar); JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:"); - lblUploadgeschwindigkeit.setBounds(102, 243, 141, 14); + lblUploadgeschwindigkeit.setBounds(102, 275, 141, 14); contentPanel.add(lblUploadgeschwindigkeit); JLabel label_1 = new JLabel("Fertig:"); - label_1.setBounds(102, 293, 46, 14); + label_1.setBounds(102, 325, 46, 14); contentPanel.add(label_1); labelfertig = new JLabel("0"); labelfertig.setHorizontalAlignment(SwingConstants.LEFT); - labelfertig.setBounds(183, 293, 108, 14); + labelfertig.setBounds(183, 325, 108, 14); contentPanel.add(labelfertig); UpSpeed = new JLabel("0"); UpSpeed.setHorizontalAlignment(SwingConstants.LEFT); - UpSpeed.setBounds(374, 243, 117, 14); + UpSpeed.setBounds(374, 275, 117, 14); contentPanel.add(UpSpeed); JLabel label_4 = new JLabel("von:"); - label_4.setBounds(318, 293, 46, 14); + label_4.setBounds(318, 325, 46, 14); contentPanel.add(label_4); labelfilesize = new JLabel("0"); labelfilesize.setHorizontalAlignment(SwingConstants.LEFT); - labelfilesize.setBounds(374, 293, 117, 14); + labelfilesize.setBounds(374, 325, 117, 14); contentPanel.add(labelfilesize); JLabel label_6 = new JLabel("Verbleibend:"); - label_6.setBounds(102, 318, 71, 14); + label_6.setBounds(102, 350, 71, 14); contentPanel.add(label_6); JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - label_7.setBounds(102, 268, 150, 14); + label_7.setBounds(102, 300, 150, 14); contentPanel.add(label_7); labelZeit = new JLabel("0"); labelZeit.setHorizontalAlignment(SwingConstants.LEFT); - labelZeit.setBounds(374, 268, 117, 14); + labelZeit.setBounds(374, 300, 117, 14); contentPanel.add(labelZeit); labelverbleibend = new JLabel("0"); labelverbleibend.setHorizontalAlignment(SwingConstants.LEFT); - labelverbleibend.setBounds(183, 318, 108, 14); + labelverbleibend.setBounds(183, 350, 108, 14); contentPanel.add(labelverbleibend); JPanel panel = new JPanel(); @@ -300,24 +300,24 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { } } }); - btnCopyFileTo.setBounds(102, 343, 173, 23); + btnCopyFileTo.setBounds(102, 375, 173, 23); contentPanel.add(btnCopyFileTo); - JLabel lblShritt = new JLabel("Schritt 1:"); - lblShritt.setBounds(24, 128, 57, 14); - contentPanel.add(lblShritt); + JLabel lblSchritt_1 = new JLabel("Schritt 1:"); + lblSchritt_1.setBounds(24, 128, 57, 14); + contentPanel.add(lblSchritt_1); - JLabel lblSchritt = new JLabel("Schritt 2:"); - lblSchritt.setBounds(24, 172, 57, 14); - contentPanel.add(lblSchritt); + JLabel lblSchritt_2 = new JLabel("Schritt 2:"); + lblSchritt_2.setBounds(24, 204, 57, 14); + contentPanel.add(lblSchritt_2); - JLabel lblSchritt_1 = new JLabel("Schritt 3:"); - lblSchritt_1.setBounds(20, 391, 57, 14); - contentPanel.add(lblSchritt_1); + JLabel lblSchritt_3 = new JLabel("Schritt 3:"); + lblSchritt_3.setBounds(20, 423, 57, 14); + contentPanel.add(lblSchritt_3); JLabel lblKlickenSieAuf = new JLabel( "Klicken Sie auf \"Fertigstellen\"."); - lblKlickenSieAuf.setBounds(98, 391, 241, 14); + lblKlickenSieAuf.setBounds(98, 423, 241, 14); contentPanel.add(lblKlickenSieAuf); { JPanel buttonPane = new JPanel(); @@ -409,11 +409,11 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { progress = (Integer) arg0.getNewValue(); progressBar.setValue(progress); + + //if (progress == 100) { + // finishButton.setEnabled(true); + //} // Button zum Fertigstellen freischalten, wenn 100% erreicht sind - if (progress == 100) { - finishButton.setEnabled(true); - - } if (progress == 0 || progress == 100) { // not uploading currently btnZurck.setEnabled(true); -- cgit v1.2.3-55-g7522 From 38284aaf433cd7b4c14542e01ac6f93a0758a2ae Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 12:22:00 +0200 Subject: Message Boxen angespasst --- Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java | 2 +- Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java index 9d8ffdfe..6b813e48 100644 --- a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java @@ -277,7 +277,7 @@ public class EditImageAllgemein_GUI extends JFrame { JOptionPane.showMessageDialog(null, "Bitte geben Sie einen Labornamen ein.", "Daten nicht vollständig", - JOptionPane.WARNING_MESSAGE); + JOptionPane.INFORMATION_MESSAGE); } else { Image.image.setNewName(imagename.getText()); con.closeThriftConnection(); diff --git a/Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java index 1cff0677..3e45ffc5 100644 --- a/Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java @@ -270,7 +270,7 @@ public class EingabeImageAllgemein_GUI extends JFrame { } else{ JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); + "Daten unvollständig", JOptionPane.INFORMATION_MESSAGE); } } }); -- cgit v1.2.3-55-g7522 From 3d383650f498dcac93362330a85a80e3f83d1520 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 14:13:06 +0200 Subject: Bugfixes und Plausibilitätscheck eingefügt --- .../src/gui/image/SearchEditImage_GUI.java | 74 ++++++++++++---------- 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java index b7f661b5..75318185 100644 --- a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java @@ -80,16 +80,12 @@ public class SearchEditImage_GUI extends JFrame { /** * Launch the application. + * + * public static void main(String[] args) { try { SearchEditImage_GUI dialog + * = new SearchEditImage_GUI(); + * dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + * dialog.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } */ - public static void main(String[] args) { - try { - SearchEditImage_GUI dialog = new SearchEditImage_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } /** * Create the dialog. @@ -102,6 +98,11 @@ public class SearchEditImage_GUI extends JFrame { con.closeThriftConnection(); System.exit(0); } + + @Override + public void windowOpened(WindowEvent arg0) { + textFieldName.requestFocusInWindow(); + } }); // Verhindert das Vergrößern Des Fensters setResizable(false); @@ -419,33 +420,40 @@ public class SearchEditImage_GUI extends JFrame { public void actionPerformed(ActionEvent e) { con.closeThriftConnection(); - // Image.image.setImageId(imageid); + // check if user is in correct tab if (tabbedPane.getSelectedIndex() == 0) { - String imageid = modelMyImages - .getValueAt( - tablemyImages - .convertRowIndexToModel(tablemyImages - .getSelectedRow()), - 7).toString(); - - Image.image.setImageId(imageid); - String imageversion = modelMyImages - .getValueAt( - tablemyImages - .convertRowIndexToModel(tablemyImages - .getSelectedRow()), - 8).toString(); - - Image.image.setVersion(imageversion); - con.closeThriftConnection(); - EditImageAllgemein_GUI ea = new EditImageAllgemein_GUI(); - ea.setVisible(true); - dispose(); + //check if a row is selected + if (tablemyImages.getSelectedRow() != -1) { + String imageid = modelMyImages + .getValueAt( + tablemyImages + .convertRowIndexToModel(tablemyImages + .getSelectedRow()), + 7).toString(); + + Image.image.setImageId(imageid); + String imageversion = modelMyImages + .getValueAt( + tablemyImages + .convertRowIndexToModel(tablemyImages + .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 Image aus.", + "Image Auswahl", JOptionPane.INFORMATION_MESSAGE); + }// end check if row is selected } else { JOptionPane.showMessageDialog(null, - "Bitte wählen Sie ein eigenes Image aus", - "Message", JOptionPane.INFORMATION_MESSAGE); - } + "Bitte wählen Sie ein eigenes Image aus.", + "Image Auswahl", JOptionPane.INFORMATION_MESSAGE); + }//end check if correct tab is selected } }); cancelButton.setActionCommand("Cancel"); -- cgit v1.2.3-55-g7522 From 9f793f5073c59890bb9617f224c53c07bc9e6196 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 14:16:53 +0200 Subject: test --- .../bin/gui/image/EditImageAllgemein_GUI$3.class | Bin 996 -> 1008 bytes .../bin/gui/image/EditImageAllgemein_GUI$4.class | Bin 1889 -> 1889 bytes .../bin/gui/image/EingabeImageAllgemein_GUI$4.class | Bin 1650 -> 1665 bytes .../bin/gui/image/FTPDownloader_GUI$1.class | Bin 1391 -> 1414 bytes .../bin/gui/image/FTPDownloader_GUI$2.class | Bin 1236 -> 1452 bytes .../bin/gui/image/FTPDownloader_GUI$3.class | Bin 785 -> 1167 bytes .../bin/gui/image/FTPDownloader_GUI$4.class | Bin 1557 -> 785 bytes .../bin/gui/image/FTPDownloader_GUI$5.class | Bin 0 -> 1557 bytes .../bin/gui/image/FTPDownloader_GUI$6.class | Bin 0 -> 972 bytes Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class | Bin 9530 -> 10072 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class | Bin 1223 -> 1277 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class | Bin 0 -> 1590 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class | Bin 0 -> 1162 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class | Bin 0 -> 771 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class | Bin 0 -> 1671 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class | Bin 0 -> 1616 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class | Bin 0 -> 856 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI.class | Bin 12168 -> 12180 bytes .../bin/gui/image/SearchEditImage_GUI$1.class | Bin 849 -> 1094 bytes .../bin/gui/image/SearchEditImage_GUI$2.class | Bin 1301 -> 1301 bytes .../bin/gui/image/SearchEditImage_GUI$3.class | Bin 951 -> 951 bytes .../bin/gui/image/SearchEditImage_GUI$4.class | Bin 1298 -> 1298 bytes .../bin/gui/image/SearchEditImage_GUI$5.class | Bin 938 -> 938 bytes .../bin/gui/image/SearchEditImage_GUI$6.class | Bin 1771 -> 1771 bytes .../bin/gui/image/SearchEditImage_GUI$7.class | Bin 1941 -> 1941 bytes .../bin/gui/image/SearchEditImage_GUI$8.class | Bin 980 -> 980 bytes .../bin/gui/image/SearchEditImage_GUI$9.class | Bin 2080 -> 2177 bytes .../bin/gui/image/SearchEditImage_GUI.class | Bin 12001 -> 11743 bytes .../src/gui/image/EditImageAllgemein_GUI.java | 4 ++-- Dozentenmodulserver/bin/server/BinaryListener.class | Bin 2151 -> 2456 bytes Dozentenmodulserver/bin/server/ServerHandler.class | Bin 10497 -> 10530 bytes .../bin/server/User$UserStandardScheme.class | Bin 2737 -> 2769 bytes .../bin/server/User$UserStandardSchemeFactory.class | Bin 853 -> 853 bytes .../bin/server/User$UserTupleScheme.class | Bin 2173 -> 2173 bytes .../bin/server/User$UserTupleSchemeFactory.class | Bin 829 -> 829 bytes Dozentenmodulserver/bin/server/User$_Fields.class | Bin 2938 -> 2946 bytes Dozentenmodulserver/bin/server/startServer.class | Bin 1889 -> 1891 bytes Dozentenmodulserver/bin/sql/SQL.class | Bin 12095 -> 13630 bytes Dozentenmodulserver/bin/util/XMLCreator.class | Bin 6327 -> 7428 bytes 39 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class index 8468f633..e28ed09a 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class and b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class index d87f50a2..fd8e0655 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class and b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class index 0ccaaa47..02bb9564 100644 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class and b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class index 90a9b390..40fe319c 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class index ae1b44e0..0c902bbd 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class index 3b6b83fb..f2ab99cc 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class index 8401b2ec..70a5c30b 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class new file mode 100644 index 00000000..34e4f69a Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class new file mode 100644 index 00000000..52cf6065 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class index 60383d7e..2961f5f1 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class index b2455840..cc009734 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class new file mode 100644 index 00000000..836abc27 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class new file mode 100644 index 00000000..a06a172b Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class new file mode 100644 index 00000000..a3f4459b Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class new file mode 100644 index 00000000..b4a9fbbf Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class new file mode 100644 index 00000000..ea3b93d2 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class new file mode 100644 index 00000000..ed60d191 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class index 06003d58..49b56187 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class index ed060fc5..80795cad 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class index ff02ba32..bbfae636 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class index 5b3e93a0..146b3f50 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class index e0ebd234..41b0f8a0 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class index f0cfc5da..cf73744d 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class index b6600cc8..ddc1f540 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class index 772ed400..ee72ad78 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class index ffde361f..37a9ab4b 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class index 345a0f36..b0ed7cbd 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class index b804db88..533b5b24 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class differ diff --git a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java index 6b813e48..cdcf9f6d 100644 --- a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java @@ -254,8 +254,8 @@ public class EditImageAllgemein_GUI extends JFrame { //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar //Image.image.setImagename(imagename.getText()); con.closeThriftConnection(); - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); + SearchEditImage_GUI se=new SearchEditImage_GUI(); + se.setVisible(true); dispose(); } }); diff --git a/Dozentenmodulserver/bin/server/BinaryListener.class b/Dozentenmodulserver/bin/server/BinaryListener.class index 8635e9d8..d53cdc9d 100644 Binary files a/Dozentenmodulserver/bin/server/BinaryListener.class and b/Dozentenmodulserver/bin/server/BinaryListener.class differ diff --git a/Dozentenmodulserver/bin/server/ServerHandler.class b/Dozentenmodulserver/bin/server/ServerHandler.class index 6af1fa09..20c993d6 100644 Binary files a/Dozentenmodulserver/bin/server/ServerHandler.class and b/Dozentenmodulserver/bin/server/ServerHandler.class differ diff --git a/Dozentenmodulserver/bin/server/User$UserStandardScheme.class b/Dozentenmodulserver/bin/server/User$UserStandardScheme.class index cf96c062..e7db11e2 100644 Binary files a/Dozentenmodulserver/bin/server/User$UserStandardScheme.class and b/Dozentenmodulserver/bin/server/User$UserStandardScheme.class differ diff --git a/Dozentenmodulserver/bin/server/User$UserStandardSchemeFactory.class b/Dozentenmodulserver/bin/server/User$UserStandardSchemeFactory.class index a409161e..ba7dd5e3 100644 Binary files a/Dozentenmodulserver/bin/server/User$UserStandardSchemeFactory.class and b/Dozentenmodulserver/bin/server/User$UserStandardSchemeFactory.class differ diff --git a/Dozentenmodulserver/bin/server/User$UserTupleScheme.class b/Dozentenmodulserver/bin/server/User$UserTupleScheme.class index 1eea1bb0..5ed83c90 100644 Binary files a/Dozentenmodulserver/bin/server/User$UserTupleScheme.class and b/Dozentenmodulserver/bin/server/User$UserTupleScheme.class differ diff --git a/Dozentenmodulserver/bin/server/User$UserTupleSchemeFactory.class b/Dozentenmodulserver/bin/server/User$UserTupleSchemeFactory.class index c76c48fe..f47e6ad9 100644 Binary files a/Dozentenmodulserver/bin/server/User$UserTupleSchemeFactory.class and b/Dozentenmodulserver/bin/server/User$UserTupleSchemeFactory.class differ diff --git a/Dozentenmodulserver/bin/server/User$_Fields.class b/Dozentenmodulserver/bin/server/User$_Fields.class index 191396fc..98d36091 100644 Binary files a/Dozentenmodulserver/bin/server/User$_Fields.class and b/Dozentenmodulserver/bin/server/User$_Fields.class differ diff --git a/Dozentenmodulserver/bin/server/startServer.class b/Dozentenmodulserver/bin/server/startServer.class index 9788373f..030b565e 100644 Binary files a/Dozentenmodulserver/bin/server/startServer.class and b/Dozentenmodulserver/bin/server/startServer.class differ diff --git a/Dozentenmodulserver/bin/sql/SQL.class b/Dozentenmodulserver/bin/sql/SQL.class index 03c89341..336f2aa4 100644 Binary files a/Dozentenmodulserver/bin/sql/SQL.class and b/Dozentenmodulserver/bin/sql/SQL.class differ diff --git a/Dozentenmodulserver/bin/util/XMLCreator.class b/Dozentenmodulserver/bin/util/XMLCreator.class index 9700459e..59247610 100644 Binary files a/Dozentenmodulserver/bin/util/XMLCreator.class and b/Dozentenmodulserver/bin/util/XMLCreator.class differ -- cgit v1.2.3-55-g7522 From c1bd01cc1041ab262d02fe1a893398b953deb561 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 14:19:08 +0200 Subject: Frühere Klassennamen "Eingabe.." nun durchgängig in "Create.." bennant --- .../bin/gui/image/CreateImageAllgemein_GUI$1.class | Bin 0 -> 1008 bytes .../bin/gui/image/CreateImageAllgemein_GUI$2.class | Bin 0 -> 847 bytes .../bin/gui/image/CreateImageAllgemein_GUI$3.class | Bin 0 -> 1166 bytes .../bin/gui/image/CreateImageAllgemein_GUI$4.class | Bin 0 -> 1656 bytes .../bin/gui/image/CreateImageAllgemein_GUI.class | Bin 0 -> 7800 bytes .../bin/gui/image/CreateImageTechnisch_GUI$1.class | Bin 0 -> 758 bytes .../bin/gui/image/CreateImageTechnisch_GUI$2.class | Bin 0 -> 847 bytes .../bin/gui/image/CreateImageTechnisch_GUI$3.class | Bin 0 -> 1673 bytes .../bin/gui/image/CreateImageTechnisch_GUI$4.class | Bin 0 -> 1655 bytes .../bin/gui/image/CreateImageTechnisch_GUI.class | Bin 0 -> 8788 bytes .../bin/gui/image/EditImageTechnisch_GUI$3.class | Bin 1665 -> 1663 bytes .../gui/image/EingabeImageAllgemein_GUI$1.class | Bin 1015 -> 0 bytes .../gui/image/EingabeImageAllgemein_GUI$2.class | Bin 853 -> 0 bytes .../gui/image/EingabeImageAllgemein_GUI$3.class | Bin 1173 -> 0 bytes .../gui/image/EingabeImageAllgemein_GUI$4.class | Bin 1665 -> 0 bytes .../bin/gui/image/EingabeImageAllgemein_GUI.class | Bin 7809 -> 0 bytes .../gui/image/EingabeImageTechnisch_GUI$1.class | Bin 764 -> 0 bytes .../gui/image/EingabeImageTechnisch_GUI$2.class | Bin 853 -> 0 bytes .../gui/image/EingabeImageTechnisch_GUI$3.class | Bin 1681 -> 0 bytes .../gui/image/EingabeImageTechnisch_GUI$4.class | Bin 1661 -> 0 bytes .../bin/gui/image/EingabeImageTechnisch_GUI.class | Bin 8796 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$8.class | Bin 856 -> 854 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class | Bin 1932 -> 1928 bytes .../gui/lecture/CreateLectureAllgemein_GUI$1.class | Bin 0 -> 1034 bytes .../gui/lecture/CreateLectureAllgemein_GUI$2.class | Bin 0 -> 869 bytes .../gui/lecture/CreateLectureAllgemein_GUI$3.class | Bin 0 -> 926 bytes .../gui/lecture/CreateLectureAllgemein_GUI$4.class | Bin 0 -> 923 bytes .../gui/lecture/CreateLectureAllgemein_GUI$5.class | Bin 0 -> 1922 bytes .../gui/lecture/CreateLectureAllgemein_GUI$6.class | Bin 0 -> 3050 bytes .../gui/lecture/CreateLectureAllgemein_GUI.class | Bin 0 -> 10794 bytes .../lecture/EingabeLectureAllgemein_GUI$1.class | Bin 1041 -> 0 bytes .../lecture/EingabeLectureAllgemein_GUI$2.class | Bin 875 -> 0 bytes .../lecture/EingabeLectureAllgemein_GUI$3.class | Bin 932 -> 0 bytes .../lecture/EingabeLectureAllgemein_GUI$4.class | Bin 929 -> 0 bytes .../lecture/EingabeLectureAllgemein_GUI$5.class | Bin 1929 -> 0 bytes .../lecture/EingabeLectureAllgemein_GUI$6.class | Bin 3057 -> 0 bytes .../gui/lecture/EingabeLectureAllgemein_GUI.class | Bin 10805 -> 0 bytes .../lecture/ExtendedSearchForImages_GUI$2.class | Bin 939 -> 937 bytes .../bin/gui/lecture/LinkLecture_GUI$6.class | Bin 998 -> 996 bytes .../src/gui/image/CreateImageAllgemein_GUI.java | 304 +++++++++++++ .../src/gui/image/CreateImageTechnisch_GUI.java | 366 +++++++++++++++ .../src/gui/image/EditImageTechnisch_GUI.java | 2 +- .../src/gui/image/EingabeImageAllgemein_GUI.java | 304 ------------- .../src/gui/image/EingabeImageTechnisch_GUI.java | 366 --------------- Dozentenmodul/src/gui/image/FTPUploader_GUI.java | 2 +- Dozentenmodul/src/gui/intro/MainMenue_GUI.java | 8 +- .../gui/lecture/CreateLectureAllgemein_GUI.java | 506 +++++++++++++++++++++ .../gui/lecture/EingabeLectureAllgemein_GUI.java | 506 --------------------- .../gui/lecture/ExtendedSearchForImages_GUI.java | 4 +- Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java | 2 +- 50 files changed, 1185 insertions(+), 1185 deletions(-) create mode 100644 Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class create mode 100644 Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI.class create mode 100644 Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI.class create mode 100644 Dozentenmodul/src/gui/image/CreateImageAllgemein_GUI.java create mode 100644 Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java delete mode 100644 Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java delete mode 100644 Dozentenmodul/src/gui/image/EingabeImageTechnisch_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java delete mode 100644 Dozentenmodul/src/gui/lecture/EingabeLectureAllgemein_GUI.java diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$1.class new file mode 100644 index 00000000..d5e68cc7 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$2.class new file mode 100644 index 00000000..be29eec5 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$3.class new file mode 100644 index 00000000..07b78998 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$4.class new file mode 100644 index 00000000..b001474a Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class new file mode 100644 index 00000000..c14c26e5 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class new file mode 100644 index 00000000..04edeee9 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$2.class new file mode 100644 index 00000000..a88a21f5 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$3.class new file mode 100644 index 00000000..1ac1680a Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class new file mode 100644 index 00000000..54d32a3f Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class new file mode 100644 index 00000000..2e49913b Binary files /dev/null and b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class index 5d742182..5dcf5a40 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$1.class deleted file mode 100644 index 13b87fc2..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$2.class deleted file mode 100644 index 5fd0f465..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$3.class deleted file mode 100644 index 6a3ce5c1..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class deleted file mode 100644 index 02bb9564..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI.class deleted file mode 100644 index fffd657d..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageAllgemein_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$1.class deleted file mode 100644 index 129b6cdc..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$2.class deleted file mode 100644 index 806acf77..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$3.class deleted file mode 100644 index 154292c3..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$4.class deleted file mode 100644 index a7088c4b..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI.class deleted file mode 100644 index 39e53c25..00000000 Binary files a/Dozentenmodul/bin/gui/image/EingabeImageTechnisch_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class index ed60d191..be1705d0 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class and b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class index 9833fb28..2658640d 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class differ diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$1.class new file mode 100644 index 00000000..9b994ec4 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$2.class new file mode 100644 index 00000000..6862545b Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$3.class new file mode 100644 index 00000000..d71d71d5 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$4.class new file mode 100644 index 00000000..9fe72770 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$5.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$5.class new file mode 100644 index 00000000..09017e11 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class new file mode 100644 index 00000000..f3dd321e Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class new file mode 100644 index 00000000..8bbcc3d0 Binary files /dev/null and b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$1.class deleted file mode 100644 index efca8a22..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$2.class deleted file mode 100644 index c7ac4cbd..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$3.class deleted file mode 100644 index 7d2bf4b7..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$4.class deleted file mode 100644 index 64422578..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$5.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$5.class deleted file mode 100644 index 6faabeed..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$6.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$6.class deleted file mode 100644 index ceeea067..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI.class b/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI.class deleted file mode 100644 index 573cd051..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EingabeLectureAllgemein_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class index c67eb15c..79f4356c 100644 Binary files a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class and b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class index b08d2945..0eaf1aa8 100644 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class and b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class differ diff --git a/Dozentenmodul/src/gui/image/CreateImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/CreateImageAllgemein_GUI.java new file mode 100644 index 00000000..bf1d0230 --- /dev/null +++ b/Dozentenmodul/src/gui/image/CreateImageAllgemein_GUI.java @@ -0,0 +1,304 @@ +package gui.image; + + +import gui.intro.MainMenue_GUI; + +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Toolkit; +import javax.swing.JFrame; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import java.awt.Color; +import javax.swing.JLabel; +import java.awt.Font; +import javax.swing.JTextPane; +import java.awt.SystemColor; +import javax.swing.JTextField; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JSeparator; +import javax.swing.JMenuBar; +import javax.swing.JMenu; +import javax.swing.JMenuItem; + +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.border.TitledBorder; +import javax.swing.JTextArea; + +import models.Image; +import models.person; + +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +@SuppressWarnings("serial") +public class CreateImageAllgemein_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + private JTextField Vorname; + private JTextField Nachname; + private JTextField Hochschule; + private JTextField EMail; + private JTextField imagename; + + /** + * Create the dialog. + */ + public CreateImageAllgemein_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + //Beendet das Fenster auf X + System.exit(0); + } + @Override + public void windowOpened(WindowEvent arg0) { + imagename.requestFocusInWindow(); + } + }); + //Verhindert das Vergrößern des Fensters + setResizable(false); + + try { + //setzt das Look & Feel + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + //Setzt den Titel + setTitle("bwLehrpool Suite *Prototyp*"); + //Zentriert das Fenster + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top=(screenSize.height - 722) / 2; + int left=(screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 66, 557, 369); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel label = new JLabel("Vorname: *"); + label.setBackground(SystemColor.menu); + label.setBounds(10, 245, 125, 20); + panel_1.add(label); + + Vorname = new JTextField(); + Vorname.setEnabled(false); + Vorname.setEditable(false); + Vorname.setBackground(Color.WHITE); + Vorname.setText(person.verantwortlicher.getVorname()); + Vorname.setColumns(10); + Vorname.setBounds(145, 245, 350, 20); + panel_1.add(Vorname); + + JLabel label_7 = new JLabel("Nachname: *"); + label_7.setBackground(SystemColor.menu); + label_7.setBounds(10, 276, 125, 20); + panel_1.add(label_7); + + Nachname = new JTextField(); + Nachname.setEnabled(false); + Nachname.setEditable(false); + Nachname.setBackground(Color.WHITE); + Nachname.setText(person.verantwortlicher.getName()); + Nachname.setColumns(10); + Nachname.setBounds(145, 276, 350, 20); + panel_1.add(Nachname); + + JLabel label_8 = new JLabel("Hochschule: *"); + label_8.setBackground(SystemColor.menu); + label_8.setBounds(10, 307, 125, 20); + panel_1.add(label_8); + + Hochschule = new JTextField(); + Hochschule.setEnabled(false); + Hochschule.setEditable(false); + Hochschule.setBackground(Color.WHITE); + Hochschule.setText(person.verantwortlicher.getHochschule()); + Hochschule.setColumns(10); + Hochschule.setBounds(145, 307, 350, 20); + panel_1.add(Hochschule); + + JLabel label_9 = new JLabel("E-Mail: *"); + label_9.setBackground(SystemColor.menu); + label_9.setBounds(10, 338, 125, 20); + panel_1.add(label_9); + + EMail = new JTextField(); + EMail.setEnabled(false); + EMail.setEditable(false); + EMail.setBackground(Color.WHITE); + EMail.setText(person.verantwortlicher.getEMail()); + EMail.setColumns(10); + EMail.setBounds(145, 338, 350, 20); + panel_1.add(EMail); + + JLabel lblImagename = new JLabel("Imagename: *"); + lblImagename.setBackground(SystemColor.menu); + lblImagename.setBounds(10, 31, 125, 20); + panel_1.add(lblImagename); + + + imagename = new JTextField(); + imagename.setBackground(Color.WHITE); + imagename.setText((String) null); + imagename.setColumns(10); + imagename.setBounds(145, 31, 350, 20); + imagename.setText(Image.image.getImagename()); //null am Anfang, aber speichert die Eingabe, wenn man zurück kommt zur Seite + panel_1.add(imagename); + + JTextArea txtrGebenSieBitte = new JTextArea(); + txtrGebenSieBitte.setEditable(false); + txtrGebenSieBitte.setBackground(SystemColor.menu); + txtrGebenSieBitte.setLineWrap(true); + txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); + txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); + txtrGebenSieBitte.setBounds(145, 62, 350, 110); + panel_1.add(txtrGebenSieBitte); + + JPanel panel = new JPanel(); + panel.setBounds(10, 402, 577, 33); + contentPanel.add(panel); + panel.setLayout(null); + panel.setBorder(new EmptyBorder(5, 5, 5, 5)); + panel.setBackground(SystemColor.menu); + + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(10, 442, 136, 14); + contentPanel.add(lblPflichtfelder); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + //Öffnet das Hauptmenü + CreateImageAllgemein_GUI.this.setVisible(false); + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton backButton = new JButton("Zur\u00FCck"); + backButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Image.image.setImagename(imagename.getText()); + MainMenue_GUI sr=new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + } + }); + backButton.setActionCommand("Cancel"); + buttonPane.add(backButton); + } + { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + //Prüft die Eingabe + if(imagename.getText().isEmpty()==false && Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) + { + //Schreibt die Daten in das Model + Image.image.setImagename(imagename.getText()); + CreateImageTechnisch_GUI ea=new CreateImageTechnisch_GUI(); + ea.setVisible(true); + dispose(); + } + else{ + JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", + "Daten unvollständig", JOptionPane.INFORMATION_MESSAGE); + } + } + }); + continueButton.setActionCommand("OK"); + buttonPane.add(continueButton); + getRootPane().setDefaultButton(continueButton); + } + } + + 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); + + }//end main +} diff --git a/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java new file mode 100644 index 00000000..f72a4f84 --- /dev/null +++ b/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java @@ -0,0 +1,366 @@ +package gui.image; + + +import gui.intro.MainMenue_GUI; + +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Toolkit; +import javax.swing.JFrame; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import java.awt.Color; +import javax.swing.JLabel; +import java.awt.Font; +import javax.swing.JTextPane; +import java.awt.SystemColor; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JSeparator; +import javax.swing.JMenuBar; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.border.TitledBorder; +import javax.swing.JTextArea; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import javax.swing.JRadioButton; +import javax.swing.ButtonGroup; +import javax.swing.JSpinner; +import javax.swing.SpinnerNumberModel; + +import models.Image; + +@SuppressWarnings("serial") +public class CreateImageTechnisch_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JSpinner spinnerCPU; + JSpinner spinnerRam; + JRadioButton rdbtnlicenseJa; + JRadioButton rdbtnlicenseNein; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + private final ButtonGroup buttonGrouplicense = new ButtonGroup(); + private final ButtonGroup buttonGroupInternet = new ButtonGroup(); + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + CreateImageTechnisch_GUI dialog = new CreateImageTechnisch_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public CreateImageTechnisch_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("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 66, 557, 124); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + rdbtnlicenseNein = new JRadioButton("Nein"); + buttonGrouplicense.add(rdbtnlicenseNein); + rdbtnlicenseNein.setBounds(377, 29, 46, 23); + panel_1.add(rdbtnlicenseNein); + + rdbtnInternetNein = new JRadioButton("Nein"); + rdbtnInternetNein.setSelected(true); + buttonGroupInternet.add(rdbtnInternetNein); + rdbtnInternetNein.setBounds(377, 57, 46, 23); + panel_1.add(rdbtnInternetNein); + + JLabel lblInternetIstInnerhalb = new JLabel("Internet ist f\u00FCr dieses Image gesperrt:"); + lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); + panel_1.add(lblInternetIstInnerhalb); + + JButton btnInternetSettings = new JButton("Einstellungen..."); + btnInternetSettings.setEnabled(false); + btnInternetSettings.setBounds(439, 57, 108, 23); + panel_1.add(btnInternetSettings); + + rdbtnInternetJa = new JRadioButton("Ja"); + + buttonGroupInternet.add(rdbtnInternetJa); + rdbtnInternetJa.setBounds(266, 57, 41, 23); + panel_1.add(rdbtnInternetJa); + + rdbtnlicenseJa = new JRadioButton("Ja"); + rdbtnlicenseJa.setSelected(true); + buttonGrouplicense.add(rdbtnlicenseJa); + rdbtnlicenseJa.setBounds(266, 29, 41, 23); + panel_1.add(rdbtnlicenseJa); + + JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + JLabel lblLizenzserverEintragen = new JLabel("Lizenzserver eintragen:"); + lblLizenzserverEintragen.setBounds(10, 85, 250, 20); + panel_1.add(lblLizenzserverEintragen); + + JButton btnLicenseServer = new JButton("Server-Adresse..."); + btnLicenseServer.setEnabled(false); + btnLicenseServer.setBounds(266, 84, 157, 23); + panel_1.add(btnLicenseServer); + + JPanel panel_2 = new JPanel(); + panel_2.setLayout(null); + panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(11, 196, 557, 338); + contentPanel.add(panel_2); + + JLabel lblGbyte = new JLabel("GByte"); + lblGbyte.setBounds(424, 91, 46, 20); + panel_2.add(lblGbyte); + + spinnerCPU = new JSpinner(); + spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); + spinnerCPU.setBounds(385, 188, 29, 20); + panel_2.add(spinnerCPU); + + JTextArea txtrBeispielWindows = new JTextArea(); + txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); + txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtrBeispielWindows.setBackground(SystemColor.menu); + txtrBeispielWindows.setBounds(10, 122, 280, 55); + panel_2.add(txtrBeispielWindows); + + + + JLabel lblKerne = new JLabel("Kerne"); + lblKerne.setBounds(424, 191, 46, 20); + panel_2.add(lblKerne); + + JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); + lblWieVieleCpus.setBounds(10, 191, 280, 20); + panel_2.add(lblWieVieleCpus); + + spinnerRam = new JSpinner(); + spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); + spinnerRam.setBounds(385, 88, 29, 20); + panel_2.add(spinnerRam); + + JLabel label_3 = new JLabel("mindestens"); + label_3.setBounds(315, 191, 60, 20); + panel_2.add(label_3); + + JLabel lblMindestens = new JLabel("mindestens"); + lblMindestens.setBounds(315, 91, 60, 20); + panel_2.add(lblMindestens); + + JTextArea txtrBeispielWindows_1 = new JTextArea(); + txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); + txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtrBeispielWindows_1.setBackground(SystemColor.menu); + txtrBeispielWindows_1.setBounds(10, 222, 280, 55); + panel_2.add(txtrBeispielWindows_1); + + JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); + lblNewLabel_3.setBounds(10, 91, 280, 20); + panel_2.add(lblNewLabel_3); + + JTextArea txtrHinweisSolltenSie = new JTextArea(); + txtrHinweisSolltenSie.setBackground(SystemColor.menu); + txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); + txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); + txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); + panel_2.add(txtrHinweisSolltenSie); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + + CreateImageTechnisch_GUI.this.setVisible(false); + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton cancelButton = new JButton("Zur\u00FCck"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if(rdbtnInternetJa.isSelected()==true) + { + Image.image.setInternet(true); + } + else + { + Image.image.setInternet(false); + } + + if(rdbtnlicenseJa.isSelected()==true) + { + Image.image.setLicensed(true); + } + else + { + Image.image.setLicensed(false); + } + Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); + + CreateImageAllgemein_GUI sr=new CreateImageAllgemein_GUI(); + sr.setVisible(true); + dispose(); + } + }); + cancelButton.setActionCommand("OK"); + buttonPane.add(cancelButton); + //getRootPane().setDefaultButton(cancelButton); + } + { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + if(rdbtnInternetJa.isSelected()==true) + { + Image.image.setInternet(true); + } + else + { + Image.image.setInternet(false); + } + + if(rdbtnlicenseJa.isSelected()==true) + { + Image.image.setLicensed(true); + } + else + { + Image.image.setLicensed(false); + } + Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); + FTPUploader_GUI ea=new FTPUploader_GUI(); + ea.setVisible(true); + dispose(); + + } + }); + continueButton.setActionCommand("Cancel"); + buttonPane.add(continueButton); + getRootPane().setDefaultButton(continueButton); + } + } + + 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/image/EditImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java index c938181e..6e71421b 100644 --- a/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java +++ b/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java @@ -287,7 +287,7 @@ public class EditImageTechnisch_GUI extends JFrame { Image.image.setLicensed(false); } //Öffnet das vorherige Fenster - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); + CreateImageAllgemein_GUI sr=new CreateImageAllgemein_GUI(); sr.setVisible(true); dispose(); } diff --git a/Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java deleted file mode 100644 index 3e45ffc5..00000000 --- a/Dozentenmodul/src/gui/image/EingabeImageAllgemein_GUI.java +++ /dev/null @@ -1,304 +0,0 @@ -package gui.image; - - -import gui.intro.MainMenue_GUI; - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import javax.swing.JTextField; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; - -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import javax.swing.JTextArea; - -import models.Image; -import models.person; - -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; - -@SuppressWarnings("serial") -public class EingabeImageAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField imagename; - - /** - * Create the dialog. - */ - public EingabeImageAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet das Fenster auf X - System.exit(0); - } - @Override - public void windowOpened(WindowEvent arg0) { - imagename.requestFocusInWindow(); - } - }); - //Verhindert das Vergrößern des Fensters - setResizable(false); - - try { - //setzt das Look & Feel - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Titel - setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 245, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEnabled(false); - Vorname.setEditable(false); - Vorname.setBackground(Color.WHITE); - Vorname.setText(person.verantwortlicher.getVorname()); - Vorname.setColumns(10); - Vorname.setBounds(145, 245, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 276, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setBackground(Color.WHITE); - Nachname.setText(person.verantwortlicher.getName()); - Nachname.setColumns(10); - Nachname.setBounds(145, 276, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 307, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setBackground(Color.WHITE); - Hochschule.setText(person.verantwortlicher.getHochschule()); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 307, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 338, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setBackground(Color.WHITE); - EMail.setText(person.verantwortlicher.getEMail()); - EMail.setColumns(10); - EMail.setBounds(145, 338, 350, 20); - panel_1.add(EMail); - - JLabel lblImagename = new JLabel("Imagename: *"); - lblImagename.setBackground(SystemColor.menu); - lblImagename.setBounds(10, 31, 125, 20); - panel_1.add(lblImagename); - - - imagename = new JTextField(); - imagename.setBackground(Color.WHITE); - imagename.setText((String) null); - imagename.setColumns(10); - imagename.setBounds(145, 31, 350, 20); - imagename.setText(Image.image.getImagename()); //null am Anfang, aber speichert die Eingabe, wenn man zurück kommt zur Seite - panel_1.add(imagename); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setEditable(false); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setBounds(145, 62, 350, 110); - panel_1.add(txtrGebenSieBitte); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(10, 442, 136, 14); - contentPanel.add(lblPflichtfelder); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Öffnet das Hauptmenü - EingabeImageAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton backButton = new JButton("Zur\u00FCck"); - backButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - Image.image.setImagename(imagename.getText()); - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - backButton.setActionCommand("Cancel"); - buttonPane.add(backButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - //Prüft die Eingabe - if(imagename.getText().isEmpty()==false && Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) - { - //Schreibt die Daten in das Model - Image.image.setImagename(imagename.getText()); - EingabeImageTechnisch_GUI ea=new EingabeImageTechnisch_GUI(); - ea.setVisible(true); - dispose(); - } - else{ - JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Daten unvollständig", JOptionPane.INFORMATION_MESSAGE); - } - } - }); - continueButton.setActionCommand("OK"); - buttonPane.add(continueButton); - getRootPane().setDefaultButton(continueButton); - } - } - - 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); - - }//end main -} diff --git a/Dozentenmodul/src/gui/image/EingabeImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/EingabeImageTechnisch_GUI.java deleted file mode 100644 index fd25d2cf..00000000 --- a/Dozentenmodul/src/gui/image/EingabeImageTechnisch_GUI.java +++ /dev/null @@ -1,366 +0,0 @@ -package gui.image; - - -import gui.intro.MainMenue_GUI; - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import javax.swing.JTextArea; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import javax.swing.JRadioButton; -import javax.swing.ButtonGroup; -import javax.swing.JSpinner; -import javax.swing.SpinnerNumberModel; - -import models.Image; - -@SuppressWarnings("serial") -public class EingabeImageTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JSpinner spinnerCPU; - JSpinner spinnerRam; - JRadioButton rdbtnlicenseJa; - JRadioButton rdbtnlicenseNein; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - private final ButtonGroup buttonGrouplicense = new ButtonGroup(); - private final ButtonGroup buttonGroupInternet = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EingabeImageTechnisch_GUI dialog = new EingabeImageTechnisch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EingabeImageTechnisch_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("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 124); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - rdbtnlicenseNein = new JRadioButton("Nein"); - buttonGrouplicense.add(rdbtnlicenseNein); - rdbtnlicenseNein.setBounds(377, 29, 46, 23); - panel_1.add(rdbtnlicenseNein); - - rdbtnInternetNein = new JRadioButton("Nein"); - rdbtnInternetNein.setSelected(true); - buttonGroupInternet.add(rdbtnInternetNein); - rdbtnInternetNein.setBounds(377, 57, 46, 23); - panel_1.add(rdbtnInternetNein); - - JLabel lblInternetIstInnerhalb = new JLabel("Internet ist f\u00FCr dieses Image gesperrt:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - JButton btnInternetSettings = new JButton("Einstellungen..."); - btnInternetSettings.setEnabled(false); - btnInternetSettings.setBounds(439, 57, 108, 23); - panel_1.add(btnInternetSettings); - - rdbtnInternetJa = new JRadioButton("Ja"); - - buttonGroupInternet.add(rdbtnInternetJa); - rdbtnInternetJa.setBounds(266, 57, 41, 23); - panel_1.add(rdbtnInternetJa); - - rdbtnlicenseJa = new JRadioButton("Ja"); - rdbtnlicenseJa.setSelected(true); - buttonGrouplicense.add(rdbtnlicenseJa); - rdbtnlicenseJa.setBounds(266, 29, 41, 23); - panel_1.add(rdbtnlicenseJa); - - JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblLizenzserverEintragen = new JLabel("Lizenzserver eintragen:"); - lblLizenzserverEintragen.setBounds(10, 85, 250, 20); - panel_1.add(lblLizenzserverEintragen); - - JButton btnLicenseServer = new JButton("Server-Adresse..."); - btnLicenseServer.setEnabled(false); - btnLicenseServer.setBounds(266, 84, 157, 23); - panel_1.add(btnLicenseServer); - - JPanel panel_2 = new JPanel(); - panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(11, 196, 557, 338); - contentPanel.add(panel_2); - - JLabel lblGbyte = new JLabel("GByte"); - lblGbyte.setBounds(424, 91, 46, 20); - panel_2.add(lblGbyte); - - spinnerCPU = new JSpinner(); - spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); - spinnerCPU.setBounds(385, 188, 29, 20); - panel_2.add(spinnerCPU); - - JTextArea txtrBeispielWindows = new JTextArea(); - txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); - txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows.setBackground(SystemColor.menu); - txtrBeispielWindows.setBounds(10, 122, 280, 55); - panel_2.add(txtrBeispielWindows); - - - - JLabel lblKerne = new JLabel("Kerne"); - lblKerne.setBounds(424, 191, 46, 20); - panel_2.add(lblKerne); - - JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); - lblWieVieleCpus.setBounds(10, 191, 280, 20); - panel_2.add(lblWieVieleCpus); - - spinnerRam = new JSpinner(); - spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); - spinnerRam.setBounds(385, 88, 29, 20); - panel_2.add(spinnerRam); - - JLabel label_3 = new JLabel("mindestens"); - label_3.setBounds(315, 191, 60, 20); - panel_2.add(label_3); - - JLabel lblMindestens = new JLabel("mindestens"); - lblMindestens.setBounds(315, 91, 60, 20); - panel_2.add(lblMindestens); - - JTextArea txtrBeispielWindows_1 = new JTextArea(); - txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); - txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows_1.setBackground(SystemColor.menu); - txtrBeispielWindows_1.setBounds(10, 222, 280, 55); - panel_2.add(txtrBeispielWindows_1); - - JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); - lblNewLabel_3.setBounds(10, 91, 280, 20); - panel_2.add(lblNewLabel_3); - - JTextArea txtrHinweisSolltenSie = new JTextArea(); - txtrHinweisSolltenSie.setBackground(SystemColor.menu); - txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); - txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); - txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); - panel_2.add(txtrHinweisSolltenSie); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeImageTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton cancelButton = new JButton("Zur\u00FCck"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("OK"); - buttonPane.add(cancelButton); - //getRootPane().setDefaultButton(cancelButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - FTPUploader_GUI ea=new FTPUploader_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - continueButton.setActionCommand("Cancel"); - buttonPane.add(continueButton); - getRootPane().setDefaultButton(continueButton); - } - } - - 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/image/FTPUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPUploader_GUI.java index 2af54b17..588657c8 100644 --- a/Dozentenmodul/src/gui/image/FTPUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPUploader_GUI.java @@ -349,7 +349,7 @@ public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { btnZurck.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dispose(); - EingabeImageTechnisch_GUI m = new EingabeImageTechnisch_GUI(); + CreateImageTechnisch_GUI m = new CreateImageTechnisch_GUI(); m.setVisible(true); } }); diff --git a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java index 5f9c2ad5..8b38b00d 100644 --- a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java +++ b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java @@ -1,9 +1,9 @@ package gui.intro; import gui.image.DeleteImage_GUI; -import gui.image.EingabeImageAllgemein_GUI; +import gui.image.CreateImageAllgemein_GUI; import gui.image.SearchEditImage_GUI; -import gui.lecture.EingabeLectureAllgemein_GUI; +import gui.lecture.CreateLectureAllgemein_GUI; import gui.lecture.SearchEditLecture_GUI; import gui.lecture.SearchMethodLecture_GUI; @@ -390,7 +390,7 @@ public class MainMenue_GUI extends JFrame { public void actionPerformed(ActionEvent e) { if (rdbtnImageNew.isSelected() == true) { - EingabeImageAllgemein_GUI sr = new EingabeImageAllgemein_GUI(); + CreateImageAllgemein_GUI sr = new CreateImageAllgemein_GUI(); sr.setVisible(true); dispose(); } else if (rdbtnImageEdit.isSelected() == true) { @@ -407,7 +407,7 @@ public class MainMenue_GUI extends JFrame { di.setVisible(true); dispose(); } else if (rdbtnVeranstaltungNew.isSelected() == true) { - EingabeLectureAllgemein_GUI av = new EingabeLectureAllgemein_GUI(); + CreateLectureAllgemein_GUI av = new CreateLectureAllgemein_GUI(); av.setVisible(true); dispose(); } else if (rdbtnVeranstaltungEdit.isSelected() == true) { diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java new file mode 100644 index 00000000..56abba76 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java @@ -0,0 +1,506 @@ +package gui.lecture; + +import gui.intro.MainMenue_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.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +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.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JSeparator; +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 models.Image; +import models.Lecture; +import models.person; +import javax.swing.JTextArea; +import java.awt.ScrollPane; +import java.util.Calendar; +import java.util.Date; + +import com.toedter.calendar.JDateChooser; +import javax.swing.JRadioButton; + +@SuppressWarnings("serial") +public class CreateLectureAllgemein_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + private JTextField Vorname; + private JTextField Nachname; + private JTextField Hochschule; + private JTextField EMail; + private JTextField txtFldVeranstaltungsname; + JTextArea description; + JRadioButton radioButtonyes; + JRadioButton radioButtonno; + JDateChooser dateChooserend; + JDateChooser dateChooserstart; + Date startDate = new Date(); + Date endDate; + int maxLifeTime = 180; // Anzahl Tage, die eine Veranstaltung in der Zukunft + // aktiv sein darf + boolean isDateOrderCorrect, isDateMaxLifeTimeCorrect, + isAllInformationReady = false; + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + CreateLectureAllgemein_GUI dialog = new CreateLectureAllgemein_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public CreateLectureAllgemein_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + System.exit(0); + } + + @Override + public void windowOpened(WindowEvent arg0) { + txtFldVeranstaltungsname.requestFocusInWindow(); + } + }); + 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("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie + .setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 331, 557, 162); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel label = new JLabel("Vorname: *"); + label.setBackground(SystemColor.menu); + label.setBounds(10, 33, 125, 20); + panel_1.add(label); + + Vorname = new JTextField(); + Vorname.setEditable(false); + Vorname.setEnabled(false); + Vorname.setText(person.verantwortlicher.getVorname()); + Vorname.setBackground(Color.WHITE); + Vorname.setColumns(10); + Vorname.setBounds(145, 33, 350, 20); + panel_1.add(Vorname); + + JLabel label_7 = new JLabel("Nachname: *"); + label_7.setBackground(SystemColor.menu); + label_7.setBounds(10, 64, 125, 20); + panel_1.add(label_7); + + Nachname = new JTextField(); + Nachname.setEnabled(false); + Nachname.setEditable(false); + Nachname.setText(person.verantwortlicher.getName()); + Nachname.setBackground(Color.WHITE); + Nachname.setColumns(10); + Nachname.setBounds(145, 64, 350, 20); + panel_1.add(Nachname); + + JLabel label_8 = new JLabel("Hochschule: *"); + label_8.setBackground(SystemColor.menu); + label_8.setBounds(10, 95, 125, 20); + panel_1.add(label_8); + + Hochschule = new JTextField(); + Hochschule.setEnabled(false); + Hochschule.setEditable(false); + Hochschule.setText(person.verantwortlicher.getHochschule()); + Hochschule.setBackground(Color.WHITE); + Hochschule.setColumns(10); + Hochschule.setBounds(145, 95, 350, 20); + panel_1.add(Hochschule); + + JLabel label_9 = new JLabel("E-Mail: *"); + label_9.setBackground(SystemColor.menu); + label_9.setBounds(10, 126, 125, 20); + panel_1.add(label_9); + + EMail = new JTextField(); + EMail.setEnabled(false); + EMail.setEditable(false); + EMail.setText(person.verantwortlicher.getEMail()); + EMail.setBackground(Color.WHITE); + EMail.setColumns(10); + EMail.setBounds(145, 126, 350, 20); + panel_1.add(EMail); + + JPanel panel = new JPanel(); + panel.setBounds(10, 402, 577, 33); + contentPanel.add(panel); + panel.setLayout(null); + panel.setBorder(new EmptyBorder(5, 5, 5, 5)); + panel.setBackground(SystemColor.menu); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + + CreateLectureAllgemein_GUI.this.setVisible(false); + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); + + JPanel 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); + + txtFldVeranstaltungsname = new JTextField(); + txtFldVeranstaltungsname.setColumns(10); + txtFldVeranstaltungsname.setBounds(200, 22, 347, 20); + txtFldVeranstaltungsname.setText(Lecture.lecture.getName()); + panel_2.add(txtFldVeranstaltungsname); + + JTextArea textArea = new JTextArea(); + textArea.setEditable(false); + 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 lblDesc = new JLabel("Beschreibung: *"); + lblDesc.setBounds(10, 111, 180, 14); + panel_2.add(lblDesc); + + ScrollPane scrollPane = new ScrollPane(); + scrollPane.setBounds(200, 104, 347, 78); + panel_2.add(scrollPane); + description = new JTextArea(); + description.setFont(new Font("Tahoma", Font.PLAIN, 11)); + description.setLineWrap(true); + description.setText(Lecture.lecture.getDesc()); + scrollPane.add(description); + description.setBounds(0, 0, 4, 22); + scrollPane.add(description); + + dateChooserend = new JDateChooser(); + endDate = addDays(new Date(), maxLifeTime); // Datum darf weiter als 6 + // Monate in der Zukunft + // liegen + dateChooserend.setDate(endDate); + if (Lecture.lecture.getEnddate() == null) { + // is not defined yet + dateChooserend.setDate(endDate); + } else { + // already defined from last visit on this page + dateChooserend.setDate(Lecture.lecture.getEnddate()); + } + dateChooserend.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserend.setBounds(404, 188, 143, 20); + panel_2.add(dateChooserend); + + JLabel lblBis = new JLabel("bis:"); + lblBis.setBounds(378, 188, 21, 20); + panel_2.add(lblBis); + + dateChooserstart = new JDateChooser(); + if (Lecture.lecture.getStartdate() == null) { + // is not defined yet + dateChooserstart.setDate(startDate); + } else { + // already defined from last visit on this page + dateChooserstart.setDate(Lecture.lecture.getStartdate()); + } + dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserstart.setBounds(226, 188, 143, 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, 194, 127, 14); + panel_2.add(label_10); + + JLabel label_11 = new JLabel("Aktiv:"); + label_11.setBounds(10, 229, 127, 14); + panel_2.add(label_11); + + radioButtonyes = new JRadioButton("Ja"); + radioButtonyes.setSelected(true); + radioButtonyes.setBounds(200, 225, 73, 23); + panel_2.add(radioButtonyes); + + radioButtonno = new JRadioButton("Nein"); + radioButtonyes.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + radioButtonyes.setSelected(true); + radioButtonno.setSelected(false); + } + }); + radioButtonno.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + radioButtonno.setSelected(true); + radioButtonyes.setSelected(false); + } + }); + radioButtonno.setBounds(296, 225, 73, 23); + panel_2.add(radioButtonno); + + JLabel lblimVmchooserSichtbar = new JLabel("(im VMChooser sichtbar)"); + lblimVmchooserSichtbar.setBounds(10, 245, 127, 14); + panel_2.add(lblimVmchooserSichtbar); + + JLabel lblmaxMonate = new JLabel("(max. 6 Monate)"); + lblmaxMonate.setBounds(10, 208, 127, 14); + panel_2.add(lblmaxMonate); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton backButton = new JButton("Zur\u00FCck"); + backButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + if (radioButtonyes.isSelected() == true) { + Lecture.lecture.setActive(true); + } else { + Lecture.lecture.setActive(false); + } + + Lecture.lecture.setName(txtFldVeranstaltungsname + .getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(txtFldVeranstaltungsname + .getText()); + + MainMenue_GUI sr = new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + } + }); + backButton.setActionCommand("Cancel"); + buttonPane.add(backButton); + getRootPane().setDefaultButton(backButton); + } + { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + // liegt das End-Datum vor dem Start-Datum? + if (dateChooserend.getDate().before( + dateChooserstart.getDate())) { + // datum ist falsch rum + isDateOrderCorrect = false; + JOptionPane + .showMessageDialog( + null, + "Das End-Datum liegt vor dem Start-Datum. Bitte ändern.", + "Datum fehlerhaft", + JOptionPane.ERROR_MESSAGE); + } else { + // bereit + isDateOrderCorrect = true; + } + // liegt das eingegebene Datum nach dem erlaubten + // End-Datum? + if (dateChooserend.getDate().after(endDate)) { + // Datum zu weit weg + isDateMaxLifeTimeCorrect = false; + JOptionPane.showMessageDialog(null, + "Das End-Datum liegt zu weit in der Zukunft. Erlaubt ist maximal:\n" + + endDate, "Datum fehlerhaft", + JOptionPane.ERROR_MESSAGE); + } else { + // bereit + isDateMaxLifeTimeCorrect = true; + } + // Prüfen ob alles eingegeben wurde + if (txtFldVeranstaltungsname.getText().isEmpty() == true + || description.getText().isEmpty() == true) { + // mind 1 Textfeld ist leer + isAllInformationReady = false; + JOptionPane + .showMessageDialog( + null, + "Bitte geben Sie einen Veranstaltungsnamen und eine Beschreibung ein.", + "Datum fehlerhaft", + JOptionPane.ERROR_MESSAGE); + } else { + // Textfelder bereit + isAllInformationReady = true; + } + + // welcher Radiobutton ist geklickt? + if (radioButtonyes.isSelected() == true) { + Lecture.lecture.setActive(true); + } else { + Lecture.lecture.setActive(false); + } + // Prüfe ob alle Eingaben korrekt sind, dann mache + // weiter + if (isAllInformationReady == true + && isDateMaxLifeTimeCorrect == true + && isDateOrderCorrect == true) { + // everything is ok, proceed + Lecture.lecture.setName(txtFldVeranstaltungsname + .getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart + .getDate()); + Image.image.setImagename(txtFldVeranstaltungsname + .getText()); + + LinkLecture_GUI ev = new LinkLecture_GUI(); + ev.setVisible(true); + dispose(); + } + + } + }); + continueButton.setActionCommand("OK"); + buttonPane.add(continueButton); + } + } + + 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); + + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(32, 602, 136, 14); + getContentPane().add(lblPflichtfelder); + + 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 Date addDays(Date date, int days) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + cal.add(Calendar.DATE, days); // minus number would decrement the days + return cal.getTime(); + } +} diff --git a/Dozentenmodul/src/gui/lecture/EingabeLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/EingabeLectureAllgemein_GUI.java deleted file mode 100644 index ed915892..00000000 --- a/Dozentenmodul/src/gui/lecture/EingabeLectureAllgemein_GUI.java +++ /dev/null @@ -1,506 +0,0 @@ -package gui.lecture; - -import gui.intro.MainMenue_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.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -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.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JSeparator; -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 models.Image; -import models.Lecture; -import models.person; -import javax.swing.JTextArea; -import java.awt.ScrollPane; -import java.util.Calendar; -import java.util.Date; - -import com.toedter.calendar.JDateChooser; -import javax.swing.JRadioButton; - -@SuppressWarnings("serial") -public class EingabeLectureAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField txtFldVeranstaltungsname; - JTextArea description; - JRadioButton radioButtonyes; - JRadioButton radioButtonno; - JDateChooser dateChooserend; - JDateChooser dateChooserstart; - Date startDate = new Date(); - Date endDate; - int maxLifeTime = 180; // Anzahl Tage, die eine Veranstaltung in der Zukunft - // aktiv sein darf - boolean isDateOrderCorrect, isDateMaxLifeTimeCorrect, - isAllInformationReady = false; - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EingabeLectureAllgemein_GUI dialog = new EingabeLectureAllgemein_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EingabeLectureAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - - @Override - public void windowOpened(WindowEvent arg0) { - txtFldVeranstaltungsname.requestFocusInWindow(); - } - }); - 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("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie - .setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 331, 557, 162); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 33, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEditable(false); - Vorname.setEnabled(false); - Vorname.setText(person.verantwortlicher.getVorname()); - Vorname.setBackground(Color.WHITE); - Vorname.setColumns(10); - Vorname.setBounds(145, 33, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 64, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setText(person.verantwortlicher.getName()); - Nachname.setBackground(Color.WHITE); - Nachname.setColumns(10); - Nachname.setBounds(145, 64, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 95, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setText(person.verantwortlicher.getHochschule()); - Hochschule.setBackground(Color.WHITE); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 95, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 126, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setText(person.verantwortlicher.getEMail()); - EMail.setBackground(Color.WHITE); - EMail.setColumns(10); - EMail.setBounds(145, 126, 350, 20); - panel_1.add(EMail); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeLectureAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - - JPanel 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); - - txtFldVeranstaltungsname = new JTextField(); - txtFldVeranstaltungsname.setColumns(10); - txtFldVeranstaltungsname.setBounds(200, 22, 347, 20); - txtFldVeranstaltungsname.setText(Lecture.lecture.getName()); - panel_2.add(txtFldVeranstaltungsname); - - JTextArea textArea = new JTextArea(); - textArea.setEditable(false); - 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 lblDesc = new JLabel("Beschreibung: *"); - lblDesc.setBounds(10, 111, 180, 14); - panel_2.add(lblDesc); - - ScrollPane scrollPane = new ScrollPane(); - scrollPane.setBounds(200, 104, 347, 78); - panel_2.add(scrollPane); - description = new JTextArea(); - description.setFont(new Font("Tahoma", Font.PLAIN, 11)); - description.setLineWrap(true); - description.setText(Lecture.lecture.getDesc()); - scrollPane.add(description); - description.setBounds(0, 0, 4, 22); - scrollPane.add(description); - - dateChooserend = new JDateChooser(); - endDate = addDays(new Date(), maxLifeTime); // Datum darf weiter als 6 - // Monate in der Zukunft - // liegen - dateChooserend.setDate(endDate); - if (Lecture.lecture.getEnddate() == null) { - // is not defined yet - dateChooserend.setDate(endDate); - } else { - // already defined from last visit on this page - dateChooserend.setDate(Lecture.lecture.getEnddate()); - } - dateChooserend.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserend.setBounds(404, 188, 143, 20); - panel_2.add(dateChooserend); - - JLabel lblBis = new JLabel("bis:"); - lblBis.setBounds(378, 188, 21, 20); - panel_2.add(lblBis); - - dateChooserstart = new JDateChooser(); - if (Lecture.lecture.getStartdate() == null) { - // is not defined yet - dateChooserstart.setDate(startDate); - } else { - // already defined from last visit on this page - dateChooserstart.setDate(Lecture.lecture.getStartdate()); - } - dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserstart.setBounds(226, 188, 143, 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, 194, 127, 14); - panel_2.add(label_10); - - JLabel label_11 = new JLabel("Aktiv:"); - label_11.setBounds(10, 229, 127, 14); - panel_2.add(label_11); - - radioButtonyes = new JRadioButton("Ja"); - radioButtonyes.setSelected(true); - radioButtonyes.setBounds(200, 225, 73, 23); - panel_2.add(radioButtonyes); - - radioButtonno = new JRadioButton("Nein"); - radioButtonyes.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - radioButtonyes.setSelected(true); - radioButtonno.setSelected(false); - } - }); - radioButtonno.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - radioButtonno.setSelected(true); - radioButtonyes.setSelected(false); - } - }); - radioButtonno.setBounds(296, 225, 73, 23); - panel_2.add(radioButtonno); - - JLabel lblimVmchooserSichtbar = new JLabel("(im VMChooser sichtbar)"); - lblimVmchooserSichtbar.setBounds(10, 245, 127, 14); - panel_2.add(lblimVmchooserSichtbar); - - JLabel lblmaxMonate = new JLabel("(max. 6 Monate)"); - lblmaxMonate.setBounds(10, 208, 127, 14); - panel_2.add(lblmaxMonate); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton backButton = new JButton("Zur\u00FCck"); - backButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if (radioButtonyes.isSelected() == true) { - Lecture.lecture.setActive(true); - } else { - Lecture.lecture.setActive(false); - } - - Lecture.lecture.setName(txtFldVeranstaltungsname - .getText()); - Lecture.lecture.setDesc(description.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setStartdate(dateChooserstart.getDate()); - Image.image.setImagename(txtFldVeranstaltungsname - .getText()); - - MainMenue_GUI sr = new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - backButton.setActionCommand("Cancel"); - buttonPane.add(backButton); - getRootPane().setDefaultButton(backButton); - } - { - JButton continueButton = new JButton("Weiter"); - continueButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - // liegt das End-Datum vor dem Start-Datum? - if (dateChooserend.getDate().before( - dateChooserstart.getDate())) { - // datum ist falsch rum - isDateOrderCorrect = false; - JOptionPane - .showMessageDialog( - null, - "Das End-Datum liegt vor dem Start-Datum. Bitte ändern.", - "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); - } else { - // bereit - isDateOrderCorrect = true; - } - // liegt das eingegebene Datum nach dem erlaubten - // End-Datum? - if (dateChooserend.getDate().after(endDate)) { - // Datum zu weit weg - isDateMaxLifeTimeCorrect = false; - JOptionPane.showMessageDialog(null, - "Das End-Datum liegt zu weit in der Zukunft. Erlaubt ist maximal:\n" - + endDate, "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); - } else { - // bereit - isDateMaxLifeTimeCorrect = true; - } - // Prüfen ob alles eingegeben wurde - if (txtFldVeranstaltungsname.getText().isEmpty() == true - || description.getText().isEmpty() == true) { - // mind 1 Textfeld ist leer - isAllInformationReady = false; - JOptionPane - .showMessageDialog( - null, - "Bitte geben Sie einen Veranstaltungsnamen und eine Beschreibung ein.", - "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); - } else { - // Textfelder bereit - isAllInformationReady = true; - } - - // welcher Radiobutton ist geklickt? - if (radioButtonyes.isSelected() == true) { - Lecture.lecture.setActive(true); - } else { - Lecture.lecture.setActive(false); - } - // Prüfe ob alle Eingaben korrekt sind, dann mache - // weiter - if (isAllInformationReady == true - && isDateMaxLifeTimeCorrect == true - && isDateOrderCorrect == true) { - // everything is ok, proceed - Lecture.lecture.setName(txtFldVeranstaltungsname - .getText()); - Lecture.lecture.setDesc(description.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setStartdate(dateChooserstart - .getDate()); - Image.image.setImagename(txtFldVeranstaltungsname - .getText()); - - LinkLecture_GUI ev = new LinkLecture_GUI(); - ev.setVisible(true); - dispose(); - } - - } - }); - continueButton.setActionCommand("OK"); - buttonPane.add(continueButton); - } - } - - 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); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(32, 602, 136, 14); - getContentPane().add(lblPflichtfelder); - - 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 Date addDays(Date date, int days) { - Calendar cal = Calendar.getInstance(); - cal.setTime(date); - cal.add(Calendar.DATE, days); // minus number would decrement the days - return cal.getTime(); - } -} diff --git a/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java index 5f6336c8..9aa07a4b 100644 --- a/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java +++ b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java @@ -1,7 +1,7 @@ package gui.lecture; -import gui.image.EingabeImageAllgemein_GUI; +import gui.image.CreateImageAllgemein_GUI; import gui.image.FTPUploader_GUI; import java.awt.Dimension; @@ -181,7 +181,7 @@ public class ExtendedSearchForImages_GUI extends JFrame { public void actionPerformed(ActionEvent e) { - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); + CreateImageAllgemein_GUI sr=new CreateImageAllgemein_GUI(); sr.setVisible(true); dispose(); } diff --git a/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java b/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java index b45897e6..d6464e4d 100644 --- a/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java +++ b/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java @@ -345,7 +345,7 @@ public class LinkLecture_GUI extends JFrame { cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { con.closeThriftConnection(); - EingabeLectureAllgemein_GUI eVAG = new EingabeLectureAllgemein_GUI(); + CreateLectureAllgemein_GUI eVAG = new CreateLectureAllgemein_GUI(); eVAG.setVisible(true); dispose(); } -- cgit v1.2.3-55-g7522 From 1f051c3be9c5787602dd5d1d82e5cc7db3665fd7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 14:22:50 +0200 Subject: Bugfix -Zurück-Button leitet jetzt auf korrekte Seite zurück --- .../src/gui/image/EditImageTechnisch_GUI.java | 192 ++++++++++----------- 1 file changed, 92 insertions(+), 100 deletions(-) diff --git a/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java index 6e71421b..7d9de383 100644 --- a/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java +++ b/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java @@ -1,6 +1,5 @@ package gui.image; - import gui.intro.MainMenue_GUI; import java.awt.Color; @@ -49,7 +48,6 @@ public class EditImageTechnisch_GUI extends JFrame { private final ButtonGroup buttonGrouplicense = new ButtonGroup(); private final ButtonGroup buttonGroupInternet = new ButtonGroup(); - /** * Create the dialog. */ @@ -57,32 +55,31 @@ public class EditImageTechnisch_GUI extends JFrame { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung bei Klick auf das X - + // Beendet die Anwendung bei Klick auf das X + System.exit(0); } - + }); - //Verhindert das Vergrößern des Fensters + // Verhindert das Vergrößern des Fensters setResizable(false); - + try { - //setzt das Look & Feel + // setzt das Look & Feel UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { // TODO Auto-generated catch block e.printStackTrace(); } - //Setzt den Titel des Fensters + // Setzt den Titel des Fensters setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster + // Zentriert das Fenster Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; setBounds(left, top, 603, 722); - - + getContentPane().setLayout(null); { JPanel panel = new JPanel(); @@ -96,11 +93,12 @@ public class EditImageTechnisch_GUI extends JFrame { 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 + .setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); panel.add(txtpnBitteWhlenSie); } @@ -112,147 +110,152 @@ public class EditImageTechnisch_GUI extends JFrame { JPanel panel_1 = new JPanel(); panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_1.setBounds(10, 66, 557, 95); contentPanel.add(panel_1); panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); + + JLabel lblNewLabel_2 = new JLabel( + "Image enth\u00E4lt lizenzpflichtige Software:"); lblNewLabel_2.setBounds(10, 30, 250, 20); panel_1.add(lblNewLabel_2); - + rdbtnlicenseJa = new JRadioButton("Ja"); rdbtnlicenseJa.setSelected(true); buttonGrouplicense.add(rdbtnlicenseJa); rdbtnlicenseJa.setBounds(266, 29, 109, 23); panel_1.add(rdbtnlicenseJa); - + rdbtnlicenseNein = new JRadioButton("Nein"); buttonGrouplicense.add(rdbtnlicenseNein); rdbtnlicenseNein.setBounds(377, 29, 109, 23); panel_1.add(rdbtnlicenseNein); - if(Image.image.isLicensed()==true){ + if (Image.image.isLicensed() == true) { rdbtnlicenseJa.setSelected(true); - } - else - { + } else { rdbtnlicenseNein.setSelected(true); } - - - JLabel lblInternetIstInnerhalb = new JLabel("Internet ist innerhalb des Image gesperrt:"); + JLabel lblInternetIstInnerhalb = new JLabel( + "Internet ist innerhalb des Image gesperrt:"); lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); panel_1.add(lblInternetIstInnerhalb); - + rdbtnInternetJa = new JRadioButton("Ja"); buttonGroupInternet.add(rdbtnInternetJa); rdbtnInternetJa.setBounds(266, 57, 109, 23); panel_1.add(rdbtnInternetJa); - + rdbtnInternetNein = new JRadioButton("Nein"); rdbtnInternetNein.setSelected(true); buttonGroupInternet.add(rdbtnInternetNein); rdbtnInternetNein.setBounds(377, 57, 109, 23); panel_1.add(rdbtnInternetNein); - if(Image.image.isInternet()==true){ + if (Image.image.isInternet() == true) { rdbtnInternetJa.setSelected(true); - } - else - { + } else { rdbtnInternetNein.setSelected(true); } JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); lblHauptmen.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { - //Macht dieses Fenster unsichtbar und das vorhergehende Fenster sichtbar + // Macht dieses Fenster unsichtbar und das vorhergehende Fenster + // sichtbar EditImageTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); } }); lblHauptmen.setForeground(Color.BLUE); lblHauptmen.setBounds(10, 11, 61, 14); contentPanel.add(lblHauptmen); - + JLabel label_1 = new JLabel(">"); label_1.setBounds(69, 11, 13, 14); contentPanel.add(label_1); - + JLabel lblVlimage = new JLabel("VL-Image"); lblVlimage.setForeground(Color.BLUE); lblVlimage.setBounds(81, 11, 45, 14); contentPanel.add(lblVlimage); - + JLabel label_2 = new JLabel(">"); label_2.setBounds(133, 11, 13, 14); contentPanel.add(label_2); - + JLabel lblNewLabel_1 = new JLabel("Neu"); lblNewLabel_1.setBounds(146, 11, 46, 14); contentPanel.add(lblNewLabel_1); - + JPanel panel_2 = new JPanel(); panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBorder(new TitledBorder(null, + "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, + TitledBorder.TOP, null, null)); panel_2.setBackground(SystemColor.menu); panel_2.setBounds(10, 172, 557, 338); contentPanel.add(panel_2); - + JTextArea txtrHinweisSolltenSie = new JTextArea(); txtrHinweisSolltenSie.setBackground(SystemColor.menu); txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); - txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); + txtrHinweisSolltenSie + .setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); panel_2.add(txtrHinweisSolltenSie); - - JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); + + JLabel lblNewLabel_3 = new JLabel( + "Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); lblNewLabel_3.setBounds(10, 91, 280, 20); panel_2.add(lblNewLabel_3); - + JLabel lblMindestens = new JLabel("mindestens"); lblMindestens.setBounds(315, 91, 60, 20); panel_2.add(lblMindestens); - + spinnerRam = new JSpinner(); spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); spinnerRam.setBounds(385, 88, 29, 20); spinnerRam.setValue(Image.image.getRam()); panel_2.add(spinnerRam); - + JLabel lblGbyte = new JLabel("GByte"); lblGbyte.setBounds(424, 91, 46, 20); panel_2.add(lblGbyte); - + JTextArea txtrBeispielWindows = new JTextArea(); - txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); + txtrBeispielWindows + .setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); txtrBeispielWindows.setBackground(SystemColor.menu); txtrBeispielWindows.setBounds(20, 111, 280, 55); panel_2.add(txtrBeispielWindows); - + JTextArea txtrBeispielWindows_1 = new JTextArea(); - txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); + txtrBeispielWindows_1 + .setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); txtrBeispielWindows_1.setBackground(SystemColor.menu); txtrBeispielWindows_1.setBounds(20, 226, 280, 55); panel_2.add(txtrBeispielWindows_1); - - JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); + + JLabel lblWieVieleCpus = new JLabel( + "Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); lblWieVieleCpus.setBounds(10, 201, 280, 20); panel_2.add(lblWieVieleCpus); - + JLabel label_3 = new JLabel("mindestens"); label_3.setBounds(315, 201, 60, 20); panel_2.add(label_3); - + spinnerCPU = new JSpinner(); spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); spinnerCPU.setBounds(385, 198, 29, 20); spinnerCPU.setValue(Image.image.getCpu()); panel_2.add(spinnerCPU); - + JLabel lblKerne = new JLabel("Kerne"); lblKerne.setBounds(424, 201, 46, 20); panel_2.add(lblKerne); @@ -266,29 +269,25 @@ public class EditImageTechnisch_GUI extends JFrame { JButton okButton = new JButton("Zur\u00FCck"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - //Setzt die Imagewerte in das Model - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { + // Setzt die Imagewerte in das Model + Image.image.setCpu(Integer.valueOf( + spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf( + spinnerRam.getValue().toString()).intValue()); + if (rdbtnInternetJa.isSelected() == true) { Image.image.setInternet(true); - } - else - { + } else { Image.image.setInternet(false); } - - if(rdbtnlicenseJa.isSelected()==true) - { + + if (rdbtnlicenseJa.isSelected() == true) { Image.image.setLicensed(true); - } - else - { + } else { Image.image.setLicensed(false); } - //Öffnet das vorherige Fenster - CreateImageAllgemein_GUI sr=new CreateImageAllgemein_GUI(); - sr.setVisible(true); + // Öffnet das vorherige Fenster + EditImageAllgemein_GUI ei = new EditImageAllgemein_GUI(); + ei.setVisible(true); dispose(); } }); @@ -300,60 +299,53 @@ public class EditImageTechnisch_GUI extends JFrame { JButton cancelButton = new JButton("Weiter"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { + Image.image.setCpu(Integer.valueOf( + spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf( + spinnerRam.getValue().toString()).intValue()); + if (rdbtnInternetJa.isSelected() == true) { Image.image.setInternet(true); - } - else - { + } else { Image.image.setInternet(false); } - - if(rdbtnlicenseJa.isSelected()==true) - { + + if (rdbtnlicenseJa.isSelected() == true) { Image.image.setLicensed(true); - } - else - { + } else { Image.image.setLicensed(false); } - //Öffnet das nächste Fenster - FTPEditUploader_GUI ea=new FTPEditUploader_GUI(); + // Öffnet das nächste Fenster + FTPEditUploader_GUI ea = new FTPEditUploader_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_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); - - } - - } +} -- cgit v1.2.3-55-g7522 From d39c936281894a9380587731bdc4b7e2d24724cf Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 14:23:59 +0200 Subject: Klassenname geändert zu "FTPCreateUploader" --- .../bin/gui/image/CreateImageTechnisch_GUI$4.class | Bin 1655 -> 1667 bytes .../bin/gui/image/EditImageTechnisch_GUI$1.class | Bin 746 -> 746 bytes .../bin/gui/image/EditImageTechnisch_GUI$2.class | Bin 835 -> 835 bytes .../bin/gui/image/EditImageTechnisch_GUI$3.class | Bin 1663 -> 1691 bytes .../bin/gui/image/EditImageTechnisch_GUI$4.class | Bin 1653 -> 1685 bytes .../bin/gui/image/EditImageTechnisch_GUI.class | Bin 8443 -> 8511 bytes .../bin/gui/image/FTPCreateUploader_GUI$1.class | Bin 0 -> 792 bytes .../bin/gui/image/FTPCreateUploader_GUI$2.class | Bin 0 -> 1313 bytes .../bin/gui/image/FTPCreateUploader_GUI$3.class | Bin 0 -> 1626 bytes .../bin/gui/image/FTPCreateUploader_GUI$4.class | Bin 0 -> 1198 bytes .../bin/gui/image/FTPCreateUploader_GUI$5.class | Bin 0 -> 813 bytes .../bin/gui/image/FTPCreateUploader_GUI$6.class | Bin 0 -> 1707 bytes .../bin/gui/image/FTPCreateUploader_GUI$7.class | Bin 0 -> 1652 bytes .../bin/gui/image/FTPCreateUploader_GUI$8.class | Bin 0 -> 890 bytes .../bin/gui/image/FTPCreateUploader_GUI.class | Bin 0 -> 12258 bytes .../bin/gui/image/FTPUploader_GUI$1.class | Bin 762 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$2.class | Bin 1277 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$3.class | Bin 1590 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$4.class | Bin 1162 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$5.class | Bin 771 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$6.class | Bin 1671 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$7.class | Bin 1616 -> 0 bytes .../bin/gui/image/FTPUploader_GUI$8.class | Bin 854 -> 0 bytes Dozentenmodul/bin/gui/image/FTPUploader_GUI.class | Bin 12180 -> 0 bytes .../lecture/ExtendedSearchForImages_GUI$3.class | Bin 919 -> 931 bytes .../src/gui/image/CreateImageTechnisch_GUI.java | 2 +- .../src/gui/image/FTPCreateUploader_GUI.java | 485 +++++++++++++++++++++ Dozentenmodul/src/gui/image/FTPUploader_GUI.java | 485 --------------------- .../gui/lecture/ExtendedSearchForImages_GUI.java | 4 +- 29 files changed, 488 insertions(+), 488 deletions(-) create mode 100644 Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class create mode 100644 Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class create mode 100644 Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class create mode 100644 Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class create mode 100644 Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class create mode 100644 Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class create mode 100644 Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class create mode 100644 Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class create mode 100644 Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class delete mode 100644 Dozentenmodul/bin/gui/image/FTPUploader_GUI.class create mode 100644 Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java delete mode 100644 Dozentenmodul/src/gui/image/FTPUploader_GUI.java diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class index 54d32a3f..ac331f22 100644 Binary files a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class and b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class index b6e700d1..216e48c4 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class index 00451da1..d22c246d 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class index 5dcf5a40..4edb101c 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class index ccf62925..b31208f2 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class index 84957fcf..edcd12d8 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class and b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class new file mode 100644 index 00000000..f8f17cdd Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class new file mode 100644 index 00000000..5bf673b1 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class new file mode 100644 index 00000000..6f66b19e Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class new file mode 100644 index 00000000..1c95b480 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class new file mode 100644 index 00000000..215b47fe Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class new file mode 100644 index 00000000..b0c2904f Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class new file mode 100644 index 00000000..a5045e6e Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class new file mode 100644 index 00000000..47662324 Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class new file mode 100644 index 00000000..0e42153a Binary files /dev/null and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$1.class deleted file mode 100644 index 8459bd28..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class deleted file mode 100644 index cc009734..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class deleted file mode 100644 index 836abc27..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class deleted file mode 100644 index a06a172b..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class deleted file mode 100644 index a3f4459b..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class deleted file mode 100644 index b4a9fbbf..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class deleted file mode 100644 index ea3b93d2..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class deleted file mode 100644 index be1705d0..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI$8.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class deleted file mode 100644 index 49b56187..00000000 Binary files a/Dozentenmodul/bin/gui/image/FTPUploader_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class index 9392da27..b6c8be8f 100644 Binary files a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class and b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class differ diff --git a/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java index f72a4f84..e9d2d91a 100644 --- a/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java +++ b/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java @@ -324,7 +324,7 @@ public class CreateImageTechnisch_GUI extends JFrame { } Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - FTPUploader_GUI ea=new FTPUploader_GUI(); + FTPCreateUploader_GUI ea=new FTPCreateUploader_GUI(); ea.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java new file mode 100644 index 00000000..d34db8f0 --- /dev/null +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -0,0 +1,485 @@ +package gui.image; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.EventQueue; +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.WindowAdapter; +import java.awt.event.WindowEvent; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.File; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.JSeparator; +import javax.swing.JTextPane; +import javax.swing.SwingConstants; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import models.Image; +import models.person; +import org.apache.thrift.TException; +import server.Server.Client; +import thrift.ThriftConnection; +//import util.XMLCreator; +import ftp.UploadTask; +import gui.intro.MainMenue_GUI; + +@SuppressWarnings("serial") +public class FTPCreateUploader_GUI extends JFrame implements PropertyChangeListener { + + @SuppressWarnings("unused") + private JPanel contentPane; + private final JPanel contentPanel = new JPanel(); + JLabel lblPath; + JProgressBar progressBar; + String host = "141.79.128.121"; + int port = 21; + server.User user; + String filename = ""; + File uploadFile; + static String arg = ""; + UploadTask task; + JLabel UpSpeed; + JLabel labelfertig; + JLabel labelfilesize; + JLabel labelZeit; + JLabel labelverbleibend; + long filesize; + double speed; + long bytesread; + boolean taskrun = false; + ThriftConnection thrift = new ThriftConnection(); + Client client = thrift.getThriftConnection(); + JButton finishButton = new JButton("Fertigstellen"); + JButton btnUploadStarten = new JButton("Upload auf Server starten"); + JButton btnZurck = new JButton("Zur\u00FCck"); + int progress = 0; // progress of upload + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + FTPCreateUploader_GUI frame = new FTPCreateUploader_GUI(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public FTPCreateUploader_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + if (taskrun == true) { + try { + client.DeleteFtpUser(user.userName); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + System.exit(0); + }//end window closing + }); + setResizable(false); + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + // filename=name; + setBackground(Color.WHITE); + setTitle("Dozentenmodul *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, 250); + getContentPane().setLayout(new BorderLayout()); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel, BorderLayout.CENTER); + contentPanel.setLayout(null); + { + JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen"); + btnSpeicherortAuswhlen.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + JFileChooser fc = new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.FILES_ONLY); + + fc.showOpenDialog(getParent()); + File file = fc.getSelectedFile(); + // check if a file is selected and exists + if (file != null) { + System.out.println("File to upload exists"); + uploadFile = file; + filename = uploadFile.getName(); + lblPath.setText(file.getAbsolutePath()); + } else { + System.out.println("No file selected"); + lblPath.setText(""); + }// end if + } + }); + + btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); + btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); + contentPanel.add(btnSpeicherortAuswhlen); + } + + lblPath = new JLabel(""); + lblPath.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent arg0) { + if (lblPath.getText().isEmpty()) { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(false); + btnUploadStarten.setText("Bitte warten"); + } else { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(true); + btnUploadStarten.setText("Upload auf Server starten"); + } + } + }); + lblPath.setHorizontalAlignment(SwingConstants.LEFT); + lblPath.setBounds(102, 158, 485, 23); + contentPanel.add(lblPath); + + btnUploadStarten.setEnabled(false); + btnUploadStarten.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + buttonUploadActionPerformed(arg0); + + } + }); + + btnUploadStarten.setBounds(102, 200, 173, 23); + contentPanel.add(btnUploadStarten); + + progressBar = new JProgressBar(0, 100); + progressBar.setStringPainted(true); + + progressBar.setBounds(102, 234, 485, 30); + contentPanel.add(progressBar); + + JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:"); + lblUploadgeschwindigkeit.setBounds(102, 275, 141, 14); + contentPanel.add(lblUploadgeschwindigkeit); + + JLabel label_1 = new JLabel("Fertig:"); + label_1.setBounds(102, 325, 46, 14); + contentPanel.add(label_1); + + labelfertig = new JLabel("0"); + labelfertig.setHorizontalAlignment(SwingConstants.LEFT); + labelfertig.setBounds(183, 325, 108, 14); + contentPanel.add(labelfertig); + + UpSpeed = new JLabel("0"); + UpSpeed.setHorizontalAlignment(SwingConstants.LEFT); + UpSpeed.setBounds(374, 275, 117, 14); + contentPanel.add(UpSpeed); + + JLabel label_4 = new JLabel("von:"); + label_4.setBounds(318, 325, 46, 14); + contentPanel.add(label_4); + + labelfilesize = new JLabel("0"); + labelfilesize.setHorizontalAlignment(SwingConstants.LEFT); + labelfilesize.setBounds(374, 325, 117, 14); + contentPanel.add(labelfilesize); + + JLabel label_6 = new JLabel("Verbleibend:"); + label_6.setBounds(102, 350, 71, 14); + contentPanel.add(label_6); + + JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); + label_7.setBounds(102, 300, 150, 14); + contentPanel.add(label_7); + + labelZeit = new JLabel("0"); + labelZeit.setHorizontalAlignment(SwingConstants.LEFT); + labelZeit.setBounds(374, 300, 117, 14); + contentPanel.add(labelZeit); + + labelverbleibend = new JLabel("0"); + labelverbleibend.setHorizontalAlignment(SwingConstants.LEFT); + labelverbleibend.setBounds(183, 350, 108, 14); + contentPanel.add(labelverbleibend); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + contentPanel.add(panel); + + JLabel lblUploadIhresImage = new JLabel("Upload Ihres Image"); + lblUploadIhresImage.setFont(new Font("Tahoma", Font.BOLD, 18)); + lblUploadIhresImage.setBounds(10, 11, 509, 22); + panel.add(lblUploadIhresImage); + + JTextPane txtpnFhreSieBitte = new JTextPane(); + txtpnFhreSieBitte + .setText("F\u00FChre Sie bitte die folgenden 3 Schritte aus um Ihr Image auf unseren Server zu laden."); + txtpnFhreSieBitte.setEditable(false); + txtpnFhreSieBitte.setBackground(SystemColor.menu); + txtpnFhreSieBitte.setBounds(10, 36, 509, 32); + panel.add(txtpnFhreSieBitte); + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 79, 597, 2); + contentPanel.add(separator); + + JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); + lblNewLabel_1.setForeground(Color.BLUE); + lblNewLabel_1.setBounds(20, 88, 61, 20); + contentPanel.add(lblNewLabel_1); + + JLabel label_3 = new JLabel(">"); + label_3.setBounds(80, 91, 14, 14); + contentPanel.add(label_3); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(91, 88, 46, 20); + contentPanel.add(lblVlimage); + + JLabel label_5 = new JLabel(">"); + label_5.setBounds(139, 91, 14, 14); + contentPanel.add(label_5); + + JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); + lblNeubearbeiten.setBounds(149, 91, 108, 14); + contentPanel.add(lblNeubearbeiten); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(0, 627, 597, 2); + contentPanel.add(separator_1); + + JButton btnCopyFileTo = new JButton("Copy File to Prod"); + btnCopyFileTo.setEnabled(false); + btnCopyFileTo.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + System.out.println("Copying file to " + user.path + "/" + + uploadFile.getName()); + client.startFileCopy(user.path + "/" + uploadFile.getName()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + }); + btnCopyFileTo.setBounds(102, 375, 173, 23); + contentPanel.add(btnCopyFileTo); + + JLabel lblSchritt_1 = new JLabel("Schritt 1:"); + lblSchritt_1.setBounds(24, 128, 57, 14); + contentPanel.add(lblSchritt_1); + + JLabel lblSchritt_2 = new JLabel("Schritt 2:"); + lblSchritt_2.setBounds(24, 204, 57, 14); + contentPanel.add(lblSchritt_2); + + JLabel lblSchritt_3 = new JLabel("Schritt 3:"); + lblSchritt_3.setBounds(20, 423, 57, 14); + contentPanel.add(lblSchritt_3); + + JLabel lblKlickenSieAuf = new JLabel( + "Klicken Sie auf \"Fertigstellen\"."); + lblKlickenSieAuf.setBounds(98, 423, 241, 14); + contentPanel.add(lblKlickenSieAuf); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBackground(UIManager.getColor("Button.background")); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane, BorderLayout.SOUTH); + { + finishButton.setEnabled(false); + finishButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + writeData(); + dispose(); + MainMenue_GUI m = new MainMenue_GUI(); + m.setVisible(true); + if (taskrun == true) { + try { + client.DeleteFtpUser(user.userName); + thrift.closeThriftConnection(); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + + } + }); + + btnZurck.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dispose(); + CreateImageTechnisch_GUI m = new CreateImageTechnisch_GUI(); + m.setVisible(true); + } + }); + btnZurck.setActionCommand("Cancel"); + buttonPane.add(btnZurck); + finishButton.setActionCommand("Cancel"); + buttonPane.add(finishButton); + } + } + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnHillfe = new JMenu("Hillfe"); + menuBar.add(mnHillfe); + setVisible(true); + + } + + private void buttonUploadActionPerformed(ActionEvent event) { + + progressBar.setValue(0); + btnUploadStarten.setEnabled(false); //verhindert einen weiteren klick + btnUploadStarten.setText("Bitte warten"); + + try { + user = client.getFtpUser(); + System.out.println("name" + user.userName); + System.out.println("path" + user.path); + System.out.println("pass" + user.password); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); + + System.out.println(formatter.format(new Date()) + "_" + + person.verantwortlicher.getHochschule() + "_" + + person.verantwortlicher.getUsername() + "_" + + Image.image.getImagename() + ".vmdk"); + Image.image.setNewName(formatter.format(new Date()) + "_" + + person.verantwortlicher.getHochschule() + "_" + + person.verantwortlicher.getUsername() + "_" + + Image.image.getImagename() + ".vmdk"); + task = new UploadTask(host, port, user.userName, user.password, + user.path, uploadFile); + + task.addPropertyChangeListener(this); + task.execute(); + taskrun = true; + + } + + public void propertyChange(PropertyChangeEvent arg0) { + progress = 0; + if ("progress" == arg0.getPropertyName()) { + progress = (Integer) arg0.getNewValue(); + progressBar.setValue(progress); + + + //if (progress == 100) { + // finishButton.setEnabled(true); + //} + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + } + + } + + if ("speed" == arg0.getPropertyName()) { + speed = (double) arg0.getNewValue(); + // if(speed<=1){ + + UpSpeed.setText(String.valueOf(speed).substring(0, + String.valueOf(speed).lastIndexOf(".") + 3) + + " MB/s"); + + } + if ("bytesread" == arg0.getPropertyName()) { + bytesread = (long) arg0.getNewValue(); + labelfertig.setText((bytesread / 1024 / 1024) + " MB"); + labelverbleibend + .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) + + " MB"); + + labelZeit + .setText(String + .valueOf( + ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) + .substring( + 0, + String.valueOf( + (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + .lastIndexOf(".")) + + " Minuten"); + + } + if ("filesize" == arg0.getPropertyName()) { + filesize = (long) arg0.getNewValue(); + labelfilesize.setText((filesize / 1024 / 1024) + " MB"); + + } + + } + + public boolean writeData() { + + try { + + client.writeVLdata(Image.image.getImagename(), + person.verantwortlicher.getVorname(), + person.verantwortlicher.getName(), + person.verantwortlicher.getHochschule(), + person.verantwortlicher.getEMail(), + person.verantwortlicher.getTel(), + person.verantwortlicher.getFakultät(), + Image.image.isLicensed(), Image.image.isInternet(), + Image.image.getRam(), Image.image.getCpu(), + "/srv/openslx/nfs/temp/" + Image.image.getNewName()); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return false; + } + return true; + + } +} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/image/FTPUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPUploader_GUI.java deleted file mode 100644 index 588657c8..00000000 --- a/Dozentenmodul/src/gui/image/FTPUploader_GUI.java +++ /dev/null @@ -1,485 +0,0 @@ -package gui.image; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.EventQueue; -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.WindowAdapter; -import java.awt.event.WindowEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.io.File; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.JSeparator; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import models.Image; -import models.person; -import org.apache.thrift.TException; -import server.Server.Client; -import thrift.ThriftConnection; -//import util.XMLCreator; -import ftp.UploadTask; -import gui.intro.MainMenue_GUI; - -@SuppressWarnings("serial") -public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblPath; - JProgressBar progressBar; - String host = "141.79.128.121"; - int port = 21; - server.User user; - String filename = ""; - File uploadFile; - static String arg = ""; - UploadTask task; - JLabel UpSpeed; - JLabel labelfertig; - JLabel labelfilesize; - JLabel labelZeit; - JLabel labelverbleibend; - long filesize; - double speed; - long bytesread; - boolean taskrun = false; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); - JButton finishButton = new JButton("Fertigstellen"); - JButton btnUploadStarten = new JButton("Upload auf Server starten"); - JButton btnZurck = new JButton("Zur\u00FCck"); - int progress = 0; // progress of upload - - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - FTPUploader_GUI frame = new FTPUploader_GUI(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public FTPUploader_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - if (taskrun == true) { - try { - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - System.exit(0); - }//end window closing - }); - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - // filename=name; - setBackground(Color.WHITE); - setTitle("Dozentenmodul *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, 250); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc = new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.FILES_ONLY); - - fc.showOpenDialog(getParent()); - File file = fc.getSelectedFile(); - // check if a file is selected and exists - if (file != null) { - System.out.println("File to upload exists"); - uploadFile = file; - filename = uploadFile.getName(); - lblPath.setText(file.getAbsolutePath()); - } else { - System.out.println("No file selected"); - lblPath.setText(""); - }// end if - } - }); - - btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblPath = new JLabel(""); - lblPath.addPropertyChangeListener(new PropertyChangeListener() { - public void propertyChange(PropertyChangeEvent arg0) { - if (lblPath.getText().isEmpty()) { - // wenn leer, dann upload button nicht freigeben - btnUploadStarten.setEnabled(false); - btnUploadStarten.setText("Bitte warten"); - } else { - // wenn leer, dann upload button nicht freigeben - btnUploadStarten.setEnabled(true); - btnUploadStarten.setText("Upload auf Server starten"); - } - } - }); - lblPath.setHorizontalAlignment(SwingConstants.LEFT); - lblPath.setBounds(102, 158, 485, 23); - contentPanel.add(lblPath); - - btnUploadStarten.setEnabled(false); - btnUploadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonUploadActionPerformed(arg0); - - } - }); - - btnUploadStarten.setBounds(102, 200, 173, 23); - contentPanel.add(btnUploadStarten); - - progressBar = new JProgressBar(0, 100); - progressBar.setStringPainted(true); - - progressBar.setBounds(102, 234, 485, 30); - contentPanel.add(progressBar); - - JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:"); - lblUploadgeschwindigkeit.setBounds(102, 275, 141, 14); - contentPanel.add(lblUploadgeschwindigkeit); - - JLabel label_1 = new JLabel("Fertig:"); - label_1.setBounds(102, 325, 46, 14); - contentPanel.add(label_1); - - labelfertig = new JLabel("0"); - labelfertig.setHorizontalAlignment(SwingConstants.LEFT); - labelfertig.setBounds(183, 325, 108, 14); - contentPanel.add(labelfertig); - - UpSpeed = new JLabel("0"); - UpSpeed.setHorizontalAlignment(SwingConstants.LEFT); - UpSpeed.setBounds(374, 275, 117, 14); - contentPanel.add(UpSpeed); - - JLabel label_4 = new JLabel("von:"); - label_4.setBounds(318, 325, 46, 14); - contentPanel.add(label_4); - - labelfilesize = new JLabel("0"); - labelfilesize.setHorizontalAlignment(SwingConstants.LEFT); - labelfilesize.setBounds(374, 325, 117, 14); - contentPanel.add(labelfilesize); - - JLabel label_6 = new JLabel("Verbleibend:"); - label_6.setBounds(102, 350, 71, 14); - contentPanel.add(label_6); - - JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - label_7.setBounds(102, 300, 150, 14); - contentPanel.add(label_7); - - labelZeit = new JLabel("0"); - labelZeit.setHorizontalAlignment(SwingConstants.LEFT); - labelZeit.setBounds(374, 300, 117, 14); - contentPanel.add(labelZeit); - - labelverbleibend = new JLabel("0"); - labelverbleibend.setHorizontalAlignment(SwingConstants.LEFT); - labelverbleibend.setBounds(183, 350, 108, 14); - contentPanel.add(labelverbleibend); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel lblUploadIhresImage = new JLabel("Upload Ihres Image"); - lblUploadIhresImage.setFont(new Font("Tahoma", Font.BOLD, 18)); - lblUploadIhresImage.setBounds(10, 11, 509, 22); - panel.add(lblUploadIhresImage); - - JTextPane txtpnFhreSieBitte = new JTextPane(); - txtpnFhreSieBitte - .setText("F\u00FChre Sie bitte die folgenden 3 Schritte aus um Ihr Image auf unseren Server zu laden."); - txtpnFhreSieBitte.setEditable(false); - txtpnFhreSieBitte.setBackground(SystemColor.menu); - txtpnFhreSieBitte.setBounds(10, 36, 509, 32); - panel.add(txtpnFhreSieBitte); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setForeground(Color.BLUE); - lblNewLabel_1.setBounds(20, 88, 61, 20); - contentPanel.add(lblNewLabel_1); - - JLabel label_3 = new JLabel(">"); - label_3.setBounds(80, 91, 14, 14); - contentPanel.add(label_3); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(91, 88, 46, 20); - contentPanel.add(lblVlimage); - - JLabel label_5 = new JLabel(">"); - label_5.setBounds(139, 91, 14, 14); - contentPanel.add(label_5); - - JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); - lblNeubearbeiten.setBounds(149, 91, 108, 14); - contentPanel.add(lblNeubearbeiten); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - contentPanel.add(separator_1); - - JButton btnCopyFileTo = new JButton("Copy File to Prod"); - btnCopyFileTo.setEnabled(false); - btnCopyFileTo.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - System.out.println("Copying file to " + user.path + "/" - + uploadFile.getName()); - client.startFileCopy(user.path + "/" + uploadFile.getName()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - }); - btnCopyFileTo.setBounds(102, 375, 173, 23); - contentPanel.add(btnCopyFileTo); - - JLabel lblSchritt_1 = new JLabel("Schritt 1:"); - lblSchritt_1.setBounds(24, 128, 57, 14); - contentPanel.add(lblSchritt_1); - - JLabel lblSchritt_2 = new JLabel("Schritt 2:"); - lblSchritt_2.setBounds(24, 204, 57, 14); - contentPanel.add(lblSchritt_2); - - JLabel lblSchritt_3 = new JLabel("Schritt 3:"); - lblSchritt_3.setBounds(20, 423, 57, 14); - contentPanel.add(lblSchritt_3); - - JLabel lblKlickenSieAuf = new JLabel( - "Klicken Sie auf \"Fertigstellen\"."); - lblKlickenSieAuf.setBounds(98, 423, 241, 14); - contentPanel.add(lblKlickenSieAuf); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - finishButton.setEnabled(false); - finishButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - writeData(); - dispose(); - MainMenue_GUI m = new MainMenue_GUI(); - m.setVisible(true); - if (taskrun == true) { - try { - client.DeleteFtpUser(user.userName); - thrift.closeThriftConnection(); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - - } - }); - - btnZurck.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - dispose(); - CreateImageTechnisch_GUI m = new CreateImageTechnisch_GUI(); - m.setVisible(true); - } - }); - btnZurck.setActionCommand("Cancel"); - buttonPane.add(btnZurck); - finishButton.setActionCommand("Cancel"); - buttonPane.add(finishButton); - } - } - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnHillfe = new JMenu("Hillfe"); - menuBar.add(mnHillfe); - setVisible(true); - - } - - private void buttonUploadActionPerformed(ActionEvent event) { - - progressBar.setValue(0); - btnUploadStarten.setEnabled(false); //verhindert einen weiteren klick - btnUploadStarten.setText("Bitte warten"); - - try { - user = client.getFtpUser(); - System.out.println("name" + user.userName); - System.out.println("path" + user.path); - System.out.println("pass" + user.password); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); - - System.out.println(formatter.format(new Date()) + "_" - + person.verantwortlicher.getHochschule() + "_" - + person.verantwortlicher.getUsername() + "_" - + Image.image.getImagename() + ".vmdk"); - Image.image.setNewName(formatter.format(new Date()) + "_" - + person.verantwortlicher.getHochschule() + "_" - + person.verantwortlicher.getUsername() + "_" - + Image.image.getImagename() + ".vmdk"); - task = new UploadTask(host, port, user.userName, user.password, - user.path, uploadFile); - - task.addPropertyChangeListener(this); - task.execute(); - taskrun = true; - - } - - public void propertyChange(PropertyChangeEvent arg0) { - progress = 0; - if ("progress" == arg0.getPropertyName()) { - progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - - - //if (progress == 100) { - // finishButton.setEnabled(true); - //} - // Button zum Fertigstellen freischalten, wenn 100% erreicht sind - if (progress == 0 || progress == 100) { - // not uploading currently - btnZurck.setEnabled(true); - } else { - // currently uploading, don't let user interact - btnZurck.setEnabled(false); - } - - } - - if ("speed" == arg0.getPropertyName()) { - speed = (double) arg0.getNewValue(); - // if(speed<=1){ - - UpSpeed.setText(String.valueOf(speed).substring(0, - String.valueOf(speed).lastIndexOf(".") + 3) - + " MB/s"); - - } - if ("bytesread" == arg0.getPropertyName()) { - bytesread = (long) arg0.getNewValue(); - labelfertig.setText((bytesread / 1024 / 1024) + " MB"); - labelverbleibend - .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) - + " MB"); - - labelZeit - .setText(String - .valueOf( - ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) - .substring( - 0, - String.valueOf( - (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) - .lastIndexOf(".")) - + " Minuten"); - - } - if ("filesize" == arg0.getPropertyName()) { - filesize = (long) arg0.getNewValue(); - labelfilesize.setText((filesize / 1024 / 1024) + " MB"); - - } - - } - - public boolean writeData() { - - try { - - client.writeVLdata(Image.image.getImagename(), - person.verantwortlicher.getVorname(), - person.verantwortlicher.getName(), - person.verantwortlicher.getHochschule(), - person.verantwortlicher.getEMail(), - person.verantwortlicher.getTel(), - person.verantwortlicher.getFakultät(), - Image.image.isLicensed(), Image.image.isInternet(), - Image.image.getRam(), Image.image.getCpu(), - "/srv/openslx/nfs/temp/" + Image.image.getNewName()); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return false; - } - return true; - - } -} \ No newline at end of file diff --git a/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java index 9aa07a4b..3fc4b7f6 100644 --- a/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java +++ b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java @@ -2,7 +2,7 @@ package gui.lecture; import gui.image.CreateImageAllgemein_GUI; -import gui.image.FTPUploader_GUI; +import gui.image.FTPCreateUploader_GUI; import java.awt.Dimension; import java.awt.FlowLayout; @@ -196,7 +196,7 @@ public class ExtendedSearchForImages_GUI extends JFrame { public void actionPerformed(ActionEvent e) { - FTPUploader_GUI ea=new FTPUploader_GUI(); + FTPCreateUploader_GUI ea=new FTPCreateUploader_GUI(); ea.setVisible(true); dispose(); -- cgit v1.2.3-55-g7522 From cb05c80ec012a106fcd7f3429cd45b918b2b8090 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 15:28:43 +0200 Subject: added .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..6b468b62 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.class -- cgit v1.2.3-55-g7522 From b753407b7c70a412eb3dd916e444ac63ad66846f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 16:15:57 +0200 Subject: Bugfixes: -Buttons funktionieren jetzt korrekt --- .../src/gui/image/FTPCreateUploader_GUI.java | 38 +- .../src/gui/image/FTPEditUploader_GUI.java | 460 +++++++++++---------- 2 files changed, 274 insertions(+), 224 deletions(-) diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java index d34db8f0..b585fa50 100644 --- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -42,7 +42,8 @@ import ftp.UploadTask; import gui.intro.MainMenue_GUI; @SuppressWarnings("serial") -public class FTPCreateUploader_GUI extends JFrame implements PropertyChangeListener { +public class FTPCreateUploader_GUI extends JFrame implements + PropertyChangeListener { @SuppressWarnings("unused") private JPanel contentPane; @@ -105,7 +106,7 @@ public class FTPCreateUploader_GUI extends JFrame implements PropertyChangeListe task.cancel(true); } System.exit(0); - }//end window closing + }// end window closing }); setResizable(false); @@ -278,7 +279,7 @@ public class FTPCreateUploader_GUI extends JFrame implements PropertyChangeListe label_5.setBounds(139, 91, 14, 14); contentPanel.add(label_5); - JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); + JLabel lblNeubearbeiten = new JLabel("Neu"); lblNeubearbeiten.setBounds(149, 91, 108, 14); contentPanel.add(lblNeubearbeiten); @@ -370,9 +371,9 @@ public class FTPCreateUploader_GUI extends JFrame implements PropertyChangeListe } private void buttonUploadActionPerformed(ActionEvent event) { - + progressBar.setValue(0); - btnUploadStarten.setEnabled(false); //verhindert einen weiteren klick + btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick btnUploadStarten.setText("Bitte warten"); try { @@ -409,19 +410,22 @@ public class FTPCreateUploader_GUI extends JFrame implements PropertyChangeListe progress = (Integer) arg0.getNewValue(); progressBar.setValue(progress); - - //if (progress == 100) { - // finishButton.setEnabled(true); - //} - // Button zum Fertigstellen freischalten, wenn 100% erreicht sind - if (progress == 0 || progress == 100) { - // not uploading currently - btnZurck.setEnabled(true); - } else { - // currently uploading, don't let user interact - btnZurck.setEnabled(false); - } + } + + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + } + // Fertigstellen erlauben wenn upload abgeschlossen + if (progress == 100) { + finishButton.setEnabled(true); + } else { + finishButton.setEnabled(false); } if ("speed" == arg0.getPropertyName()) { diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java index c8a23428..9e60e788 100644 --- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -18,7 +18,6 @@ import java.io.File; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; - import javax.swing.JButton; import javax.swing.JFileChooser; import javax.swing.JFrame; @@ -35,30 +34,27 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import models.Image; import models.person; -//import models.person; - import org.apache.thrift.TException; - import server.Server.Client; import thrift.ThriftConnection; import ftp.UploadTask; import gui.intro.MainMenue_GUI; - @SuppressWarnings("serial") -public class FTPEditUploader_GUI extends JFrame implements PropertyChangeListener { +public class FTPEditUploader_GUI extends JFrame implements + PropertyChangeListener { @SuppressWarnings("unused") private JPanel contentPane; private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; + JLabel lblPath; JProgressBar progressBar; - String host="141.79.128.121"; - int port=21; + String host = "141.79.128.121"; + int port = 21; server.User user; - String filename=""; + String filename = ""; File uploadFile; - static String arg=""; + static String arg = ""; UploadTask task; JLabel UpSpeed; JLabel labelfertig; @@ -68,9 +64,16 @@ public class FTPEditUploader_GUI extends JFrame implements PropertyChangeListene long filesize; double speed; long bytesread; - boolean taskrun=false; - ThriftConnection thrift=new ThriftConnection(); - Client client=thrift.getThriftConnection(); + boolean taskrun = false; + int progress = 0; + ThriftConnection thrift = new ThriftConnection(); + Client client = thrift.getThriftConnection(); + JButton btnUploadStarten = new JButton("Upload auf Server starten"); + JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen"); + JButton btnCopyFileTo = new JButton("Copy File to Prod"); + JButton finishButton = new JButton("Fertigstellen"); + JButton btnZurck = new JButton("Zur\u00FCck"); + /** * Launch the application. */ @@ -94,24 +97,21 @@ public class FTPEditUploader_GUI extends JFrame implements PropertyChangeListene addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { - if(taskrun==true) - { + if (taskrun == true) { try { - + client.DeleteFtpUser(user.userName); } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } - task.cancel(true); + task.cancel(true); } } }); setResizable(false); - //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - - + // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException @@ -120,309 +120,355 @@ public class FTPEditUploader_GUI extends JFrame implements PropertyChangeListene e.printStackTrace(); } - //filename=name; + // filename=name; setBackground(Color.WHITE); setTitle("Dozentenmodul *Prototyp*"); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 250); + // setBounds(100, 100, 603, 250); getContentPane().setLayout(new BorderLayout()); contentPanel.setBackground(SystemColor.menu); contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel, BorderLayout.CENTER); contentPanel.setLayout(null); { - JButton btnSpeicherortAuswhlen = new JButton("VMDK ausw\u00E4hlen"); + btnSpeicherortAuswhlen.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { - JFileChooser fc=new JFileChooser(); + JFileChooser fc = new JFileChooser(); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); - + fc.showOpenDialog(getParent()); - File dir=fc.getSelectedFile(); - uploadFile=dir; - filename=uploadFile.getName(); - lblNewLabel.setText(dir.getAbsolutePath()); + File file = fc.getSelectedFile(); + // check if a file is selected and exists + if (file != null) { + System.out.println("File to upload exists"); + uploadFile = file; + filename = uploadFile.getName(); + lblPath.setText(file.getAbsolutePath()); + } else { + System.out.println("No file selected"); + lblPath.setText(""); + }// end if } }); - btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23); + btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); contentPanel.add(btnSpeicherortAuswhlen); } - - lblNewLabel = new JLabel(""); - lblNewLabel.setBounds(184, 124, 255, 23); - contentPanel.add(lblNewLabel); - - JButton btnDownloadStarten = new JButton("Upload starten"); - btnDownloadStarten.addActionListener(new ActionListener() { + + lblPath = new JLabel(""); + lblPath.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent arg0) { + if (lblPath.getText().isEmpty()) { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(false); + btnUploadStarten.setText("Bitte warten"); + } else { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(true); + btnUploadStarten.setText("Upload auf Server starten"); + } + } + }); + lblPath.setBounds(102, 158, 485, 23); + contentPanel.add(lblPath); + + btnUploadStarten.setEnabled(false); + btnUploadStarten.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { buttonUploadActionPerformed(arg0); - + } }); - btnDownloadStarten.setBounds(10, 330, 141, 23); - contentPanel.add(btnDownloadStarten); - - progressBar = new JProgressBar(0,100); + btnUploadStarten.setBounds(102, 200, 173, 23); + contentPanel.add(btnUploadStarten); + + progressBar = new JProgressBar(0, 100); progressBar.setStringPainted(true); - - progressBar.setBounds(10, 158, 577, 30); + progressBar.setBounds(102, 234, 485, 30); contentPanel.add(progressBar); - - JLabel label = new JLabel("Downloadgeschwindigkeit:"); - label.setBounds(10, 199, 141, 14); - contentPanel.add(label); - + + JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:"); + lblUploadgeschwindigkeit.setBounds(102, 275, 141, 14); + contentPanel.add(lblUploadgeschwindigkeit); + JLabel label_1 = new JLabel("Fertig:"); - label_1.setBounds(10, 249, 46, 14); + label_1.setBounds(102, 325, 46, 14); contentPanel.add(label_1); - + labelfertig = new JLabel("0"); - labelfertig.setBounds(66, 249, 108, 14); + labelfertig.setBounds(183, 325, 108, 14); contentPanel.add(labelfertig); - + UpSpeed = new JLabel("0"); - UpSpeed.setBounds(329, 199, 95, 14); + UpSpeed.setBounds(374, 275, 117, 14); contentPanel.add(UpSpeed); - + JLabel label_4 = new JLabel("von:"); - label_4.setBounds(184, 249, 46, 14); + label_4.setBounds(318, 325, 46, 14); contentPanel.add(label_4); - + labelfilesize = new JLabel("0"); - labelfilesize.setBounds(240, 249, 108, 14); + labelfilesize.setBounds(374, 325, 117, 14); contentPanel.add(labelfilesize); - + JLabel label_6 = new JLabel("Verbleibend:"); - label_6.setBounds(10, 274, 71, 14); + label_6.setBounds(102, 350, 71, 14); contentPanel.add(label_6); - + JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - label_7.setBounds(10, 224, 150, 14); + label_7.setBounds(102, 300, 150, 14); contentPanel.add(label_7); - + labelZeit = new JLabel("0"); - labelZeit.setBounds(329, 224, 117, 14); + labelZeit.setBounds(374, 300, 117, 14); contentPanel.add(labelZeit); - + labelverbleibend = new JLabel("0"); - labelverbleibend.setBounds(91, 274, 108, 14); + labelverbleibend.setBounds(183, 350, 108, 14); contentPanel.add(labelverbleibend); - + JPanel panel = new JPanel(); panel.setLayout(null); panel.setBackground(SystemColor.menu); panel.setBounds(10, 11, 577, 57); contentPanel.add(panel); - - JLabel label_2 = new JLabel("Eingabe Ihrer Daten"); - label_2.setFont(new Font("Tahoma", Font.BOLD, 18)); - label_2.setBounds(10, 11, 509, 22); - panel.add(label_2); - - JTextPane textPane = new JTextPane(); - textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - textPane.setEditable(false); - textPane.setBackground(SystemColor.menu); - textPane.setBounds(10, 36, 509, 32); - panel.add(textPane); - + + JLabel lblUploadIhresImage = new JLabel("Upload Ihres Image"); + lblUploadIhresImage.setFont(new Font("Tahoma", Font.BOLD, 18)); + lblUploadIhresImage.setBounds(10, 11, 509, 22); + panel.add(lblUploadIhresImage); + + JTextPane txtpnFhreSieBitte = new JTextPane(); + txtpnFhreSieBitte + .setText("F\u00FChre Sie bitte die folgenden 3 Schritte aus um Ihr Image auf unseren Server zu laden."); + txtpnFhreSieBitte.setEditable(false); + txtpnFhreSieBitte.setBackground(SystemColor.menu); + txtpnFhreSieBitte.setBounds(10, 36, 509, 32); + panel.add(txtpnFhreSieBitte); + JSeparator separator = new JSeparator(); separator.setBounds(0, 79, 597, 2); contentPanel.add(separator); - + JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); lblNewLabel_1.setForeground(Color.BLUE); lblNewLabel_1.setBounds(20, 88, 61, 20); contentPanel.add(lblNewLabel_1); - + JLabel label_3 = new JLabel(">"); label_3.setBounds(80, 91, 14, 14); contentPanel.add(label_3); - + JLabel lblVlimage = new JLabel("VL-Image"); lblVlimage.setForeground(Color.BLUE); lblVlimage.setBounds(91, 88, 46, 20); contentPanel.add(lblVlimage); - + JLabel label_5 = new JLabel(">"); label_5.setBounds(139, 91, 14, 14); contentPanel.add(label_5); - - JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); + + JLabel lblNeubearbeiten = new JLabel("Bearbeiten"); lblNeubearbeiten.setBounds(149, 91, 108, 14); contentPanel.add(lblNeubearbeiten); - + JSeparator separator_1 = new JSeparator(); separator_1.setBounds(0, 627, 597, 2); contentPanel.add(separator_1); - - JButton btnCopyFileTo = new JButton("Copy File to Prod"); + + btnCopyFileTo.setEnabled(false); btnCopyFileTo.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { - client.startFileCopy(user.path+"/"+uploadFile.getName()); + client.startFileCopy(user.path + "/" + uploadFile.getName()); } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } }); - btnCopyFileTo.setBounds(10, 375, 264, 23); + btnCopyFileTo.setBounds(102, 375, 173, 23); contentPanel.add(btnCopyFileTo); + + JLabel lblSchritt_1 = new JLabel("Schritt 1:"); + lblSchritt_1.setBounds(24, 128, 57, 14); + contentPanel.add(lblSchritt_1); + + JLabel lblSchritt_2 = new JLabel("Schritt 2:"); + lblSchritt_2.setBounds(24, 204, 57, 14); + contentPanel.add(lblSchritt_2); + + JLabel label = new JLabel("Schritt 3:"); + label.setBounds(20, 423, 57, 14); + contentPanel.add(label); + + JLabel label_2 = new JLabel("Klicken Sie auf \"Fertigstellen\"."); + label_2.setBounds(98, 423, 241, 14); + contentPanel.add(label_2); { JPanel buttonPane = new JPanel(); buttonPane.setBackground(UIManager.getColor("Button.background")); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane, BorderLayout.SOUTH); { - JButton ButtonReady = new JButton("Abschlie\u00DFen"); - ButtonReady.addActionListener(new ActionListener() { + + finishButton.setEnabled(false); + finishButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - + updateData(); dispose(); - MainMenue_GUI m=new MainMenue_GUI(); + MainMenue_GUI m = new MainMenue_GUI(); m.setVisible(true); - - if(taskrun==true) - { - try { - client.DeleteFtpUser(user.userName); - - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); + + if (taskrun == true) { + try { + client.DeleteFtpUser(user.userName); + + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); } thrift.closeThriftConnection(); } }); - - JButton buttonCancel = new JButton("Schlie\u00DFen"); - buttonCancel.setActionCommand("Cancel"); - buttonPane.add(buttonCancel); - ButtonReady.setActionCommand("Cancel"); - buttonPane.add(ButtonReady); + btnZurck.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + dispose(); + EditImageTechnisch_GUI ei = new EditImageTechnisch_GUI(); + ei.setVisible(true); + } + }); + + btnZurck.setActionCommand("Cancel"); + buttonPane.add(btnZurck); + finishButton.setActionCommand("Cancel"); + buttonPane.add(finishButton); } } - + JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); - + JMenu mnHillfe = new JMenu("Hillfe"); menuBar.add(mnHillfe); setVisible(true); - + } - - private void buttonUploadActionPerformed(ActionEvent event) { - // File (or directory) with old name - // File file = new File(lblNewLabel.getText()); - - // File (or directory) with new name - //System.out.println(file.getAbsolutePath().substring(0,file.getAbsolutePath().lastIndexOf("\\"))+"\\"+vm.vl.getLaborname()+".vmdk"); - //File file2 = new File(file.getAbsoluteFile()+"\\"+vm.vl.getLaborname()+".vmdk"); - - - // Rename file (or directory) - //boolean success = file.renameTo(file2); - //if (!success) { - // File was not successfully renamed - //System.out.println("Not OK"); - //} - //else - //{ - //System.out.println("OK"); - //} - progressBar.setValue(0); - - try { - user=client.getFtpUser(); - System.out.println("name"+user.userName); - System.out.println("path"+user.path); - System.out.println("pass"+user.password); + + private void buttonUploadActionPerformed(ActionEvent event) { + + progressBar.setValue(0); + btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick + btnUploadStarten.setText("Bitte warten"); + + try { + user = client.getFtpUser(); + System.out.println("name" + user.userName); + System.out.println("path" + user.path); + System.out.println("pass" + user.password); } catch (TException e) { // TODO Auto-generated catch block e.printStackTrace(); } - DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); + DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); Image.image.setNewName(formatter.format(new Date()) + "_" + person.verantwortlicher.getHochschule() + "_" + person.verantwortlicher.getUsername() + "_" + Image.image.getImagename() + ".vmdk"); - task=new UploadTask(host,port,user.userName,user.password,user.path, uploadFile); - - task.addPropertyChangeListener(this); - task.execute(); - taskrun=true; - - //createXML(); - //TransferToSatellit(); - - - } + task = new UploadTask(host, port, user.userName, user.password, + user.path, uploadFile); + + task.addPropertyChangeListener(this); + task.execute(); + taskrun = true; + + } public void propertyChange(PropertyChangeEvent arg0) { - if ("progress" == arg0.getPropertyName()) { - int progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - } - if("speed"==arg0.getPropertyName()){ - speed=(double)arg0.getNewValue(); - //if(speed<=1){ - - UpSpeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s"); - - // }else - //{ - //double MBSpeed=speed/1024; - //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf("."))); - //} - - } - if("bytesread"==arg0.getPropertyName()) - { - bytesread=(long)arg0.getNewValue(); - labelfertig.setText((bytesread/1024/1024)+" MB"); - labelverbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB"); - - - labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten"); - - - } - if("filesize"==arg0.getPropertyName()) - { - filesize=(long)arg0.getNewValue(); - labelfilesize.setText((filesize/1024/1024)+" MB"); - - } - - } - - public boolean updateData(){ - - try { - - - System.out.println("Start Update"); - client.updateImageData(Image.image.getImagename(),Image.image.getNewName(), Image.image.isLicensed(), Image.image.isInternet(), Image.image.getRam(), Image.image.getCpu(),Image.image.getImageId(),Image.image.getVersion()); - } catch (TException e) { + if ("progress" == arg0.getPropertyName()) { + progress = (Integer) arg0.getNewValue(); + progressBar.setValue(progress); + + } + + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + } + + // Fertigstellen erlauben wenn upload abgeschlossen + if (progress == 100) { + finishButton.setEnabled(true); + } else { + finishButton.setEnabled(false); + } + + if ("speed" == arg0.getPropertyName()) { + speed = (double) arg0.getNewValue(); + // if(speed<=1){ + + UpSpeed.setText(String.valueOf(speed).substring(0, + String.valueOf(speed).lastIndexOf(".") + 3) + + " MB/s"); + + } + if ("bytesread" == arg0.getPropertyName()) { + bytesread = (long) arg0.getNewValue(); + labelfertig.setText((bytesread / 1024 / 1024) + " MB"); + labelverbleibend + .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) + + " MB"); + + labelZeit + .setText(String + .valueOf( + ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) + .substring( + 0, + String.valueOf( + (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + .lastIndexOf(".")) + + " Minuten"); + + } + if ("filesize" == arg0.getPropertyName()) { + filesize = (long) arg0.getNewValue(); + labelfilesize.setText((filesize / 1024 / 1024) + " MB"); + + } + + } + + public boolean updateData() { + + try { + + System.out.println("Start Update"); + client.updateImageData(Image.image.getImagename(), + Image.image.getNewName(), Image.image.isLicensed(), + Image.image.isInternet(), Image.image.getRam(), + Image.image.getCpu(), Image.image.getImageId(), + Image.image.getVersion()); + } catch (TException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } return true; - - - } + + } } \ No newline at end of file -- cgit v1.2.3-55-g7522 From 799ae166981c27418898ca5cc854b446bec68b72 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 16:25:32 +0200 Subject: Breadcrumbs entfernt, passen nicht ins Hauptmenü --- Dozentenmodul/src/gui/intro/MainMenue_GUI.java | 40 +------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java index 8b38b00d..612f5f20 100644 --- a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java +++ b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java @@ -232,44 +232,6 @@ public class MainMenue_GUI extends JFrame { rdbtnVeranstaltungSearch.setBounds(6, 102, 175, 23); panelVeranstaltung.add(rdbtnVeranstaltungSearch); - JLabel lblCrumbStart = new JLabel("Startseite"); - lblCrumbStart.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - Login_GUI lw = new Login_GUI(); - lw.setVisible(true); - MainMenue_GUI.this.setVisible(false); - } - }); - lblCrumbStart.setForeground(Color.BLUE); - lblCrumbStart.setBounds(10, 0, 52, 14); - contentPanel.add(lblCrumbStart); - - JLabel label = new JLabel(">"); - label.setBounds(60, 0, 13, 14); - contentPanel.add(label); - - JLabel lblRechtshinweis = new JLabel("Rechtshinweis"); - lblRechtshinweis.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - BillOfRights_GUI rb = new BillOfRights_GUI(); - rb.setVisible(true); - MainMenue_GUI.this.setVisible(false); - } - }); - lblRechtshinweis.setForeground(Color.BLUE); - lblRechtshinweis.setBounds(72, 0, 68, 14); - contentPanel.add(lblRechtshinweis); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(142, 0, 13, 14); - contentPanel.add(label_1); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setBounds(150, 0, 74, 14); - contentPanel.add(lblNewLabel_1); - JPanel panelNews = new JPanel(); panelNews.setLayout(null); panelNews.setBorder(new TitledBorder(UIManager @@ -367,7 +329,7 @@ public class MainMenue_GUI extends JFrame { // ToolTipp lange anzeigen - 60sec ToolTipManager.sharedInstance().setDismissDelay(60000); ToolTipManager.sharedInstance().registerComponent(lblGrafik); - lblGrafik.setBounds(82, 11, 391, 110); + lblGrafik.setBounds(82, 3, 391, 110); contentPanel.add(lblGrafik); JTextPane txtpnUmDetaillierteInformationen = new JTextPane(); -- cgit v1.2.3-55-g7522 From 685f72fdcef38b9bfd5fd1b1122a4a6d33c6b708 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 16:40:07 +0200 Subject: Anwendung schließt nun, wenn Fenster schließt --- Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java index 9e60e788..dd35ad83 100644 --- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -107,7 +107,8 @@ public class FTPEditUploader_GUI extends JFrame implements } task.cancel(true); } - } + System.exit(0); + }// end window closing }); setResizable(false); // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); -- cgit v1.2.3-55-g7522 From d9273594675fc82e454263380805c17dc123a4f7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 18:27:11 +0200 Subject: Bugfixes -Namensänderungen -falsche Seiten wurden aufgerufen- -Plausibilitätschecks -Text-Änderungen -GUI Anpassungen --- .../bin/gui/image/FTPCreateUploader_GUI$1.class | Bin 792 -> 792 bytes .../bin/gui/image/FTPCreateUploader_GUI$2.class | Bin 1313 -> 1313 bytes .../bin/gui/image/FTPCreateUploader_GUI$3.class | Bin 1626 -> 1626 bytes .../bin/gui/image/FTPCreateUploader_GUI$4.class | Bin 1198 -> 1198 bytes .../bin/gui/image/FTPCreateUploader_GUI$5.class | Bin 813 -> 813 bytes .../bin/gui/image/FTPCreateUploader_GUI$6.class | Bin 1707 -> 1707 bytes .../bin/gui/image/FTPCreateUploader_GUI$7.class | Bin 1652 -> 1652 bytes .../bin/gui/image/FTPCreateUploader_GUI$8.class | Bin 890 -> 890 bytes .../bin/gui/image/FTPCreateUploader_GUI.class | Bin 12258 -> 12294 bytes .../bin/gui/image/FTPEditUploader_GUI$1.class | Bin 782 -> 782 bytes .../bin/gui/image/FTPEditUploader_GUI$2.class | Bin 1247 -> 1301 bytes .../bin/gui/image/FTPEditUploader_GUI$3.class | Bin 1366 -> 1614 bytes .../bin/gui/image/FTPEditUploader_GUI$4.class | Bin 799 -> 1186 bytes .../bin/gui/image/FTPEditUploader_GUI$5.class | Bin 1503 -> 799 bytes .../bin/gui/image/FTPEditUploader_GUI$6.class | Bin 1641 -> 1503 bytes .../bin/gui/image/FTPEditUploader_GUI.class | Bin 10952 -> 11883 bytes .../bin/gui/image/SearchEditImage_GUI$1.class | Bin 1094 -> 1094 bytes .../bin/gui/image/SearchEditImage_GUI$2.class | Bin 1301 -> 1301 bytes .../bin/gui/image/SearchEditImage_GUI$3.class | Bin 951 -> 951 bytes .../bin/gui/image/SearchEditImage_GUI$4.class | Bin 1298 -> 1298 bytes .../bin/gui/image/SearchEditImage_GUI$5.class | Bin 938 -> 938 bytes .../bin/gui/image/SearchEditImage_GUI$6.class | Bin 1771 -> 1771 bytes .../bin/gui/image/SearchEditImage_GUI$7.class | Bin 1941 -> 1941 bytes .../bin/gui/image/SearchEditImage_GUI$8.class | Bin 980 -> 980 bytes .../bin/gui/image/SearchEditImage_GUI$9.class | Bin 2177 -> 2177 bytes .../bin/gui/image/SearchEditImage_GUI.class | Bin 11743 -> 11743 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class | Bin 692 -> 692 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class | Bin 823 -> 1928 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class | Bin 1098 -> 0 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class | Bin 1928 -> 0 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class | Bin 771 -> 1088 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class | Bin 782 -> 1006 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class | Bin 1088 -> 977 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class | Bin 1006 -> 1068 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class | Bin 977 -> 1083 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class | Bin 1068 -> 974 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class | Bin 1083 -> 821 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class | Bin 974 -> 1096 bytes Dozentenmodul/bin/gui/intro/MainMenue_GUI.class | Bin 10983 -> 10295 bytes .../gui/lecture/CreateLectureAllgemein_GUI$6.class | Bin 3050 -> 3062 bytes .../gui/lecture/EditLectureAllgemein_GUI$4.class | Bin 1900 -> 1912 bytes .../bin/gui/lecture/EditLinkLecture_GUI$1.class | Bin 738 -> 0 bytes .../bin/gui/lecture/EditLinkLecture_GUI$2.class | Bin 1543 -> 0 bytes .../bin/gui/lecture/EditLinkLecture_GUI$3.class | Bin 840 -> 0 bytes .../bin/gui/lecture/EditLinkLecture_GUI$4.class | Bin 1554 -> 0 bytes .../bin/gui/lecture/EditLinkLecture_GUI$5.class | Bin 827 -> 0 bytes .../bin/gui/lecture/EditLinkLecture_GUI$6.class | Bin 869 -> 0 bytes .../bin/gui/lecture/EditLinkLecture_GUI$7.class | Bin 2478 -> 0 bytes .../bin/gui/lecture/EditLinkLecture_GUI.class | Bin 11459 -> 0 bytes .../bin/gui/lecture/LinkLecture_GUI$1.class | Bin 957 -> 0 bytes .../bin/gui/lecture/LinkLecture_GUI$2.class | Bin 1519 -> 0 bytes .../bin/gui/lecture/LinkLecture_GUI$3.class | Bin 816 -> 0 bytes .../bin/gui/lecture/LinkLecture_GUI$4.class | Bin 1530 -> 0 bytes .../bin/gui/lecture/LinkLecture_GUI$5.class | Bin 803 -> 0 bytes .../bin/gui/lecture/LinkLecture_GUI$6.class | Bin 996 -> 0 bytes .../bin/gui/lecture/LinkLecture_GUI$7.class | Bin 3353 -> 0 bytes .../bin/gui/lecture/LinkLecture_GUI.class | Bin 11468 -> 0 bytes .../bin/gui/lecture/SearchEditLecture_GUI$1.class | Bin 871 -> 0 bytes .../bin/gui/lecture/SearchEditLecture_GUI$2.class | Bin 1313 -> 0 bytes .../bin/gui/lecture/SearchEditLecture_GUI$3.class | Bin 973 -> 0 bytes .../bin/gui/lecture/SearchEditLecture_GUI$4.class | Bin 960 -> 0 bytes .../bin/gui/lecture/SearchEditLecture_GUI$5.class | Bin 1783 -> 0 bytes .../bin/gui/lecture/SearchEditLecture_GUI$6.class | Bin 1002 -> 0 bytes .../bin/gui/lecture/SearchEditLecture_GUI$7.class | Bin 3044 -> 0 bytes .../bin/gui/lecture/SearchEditLecture_GUI.class | Bin 11464 -> 0 bytes .../src/gui/image/SearchEditImage_GUI.java | 1 - Dozentenmodul/src/gui/intro/MainMenue_GUI.java | 17 +- .../gui/lecture/CreateLectureAllgemein_GUI.java | 8 +- .../src/gui/lecture/CreateLectureLink_GUI.java | 495 +++++++++++++++++++ .../src/gui/lecture/EditLectureAllgemein_GUI.java | 2 +- .../src/gui/lecture/EditLectureLink_GUI.java | 482 ++++++++++++++++++ .../src/gui/lecture/EditLectureSearch_GUI.java | 538 +++++++++++++++++++++ .../src/gui/lecture/EditLinkLecture_GUI.java | 438 ----------------- Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java | 476 ------------------ .../src/gui/lecture/SearchEditLecture_GUI.java | 451 ----------------- 75 files changed, 1525 insertions(+), 1383 deletions(-) delete mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class delete mode 100644 Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI.class delete mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class delete mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$1.class delete mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$2.class delete mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$3.class delete mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$4.class delete mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$5.class delete mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$6.class delete mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$7.class delete mode 100644 Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI.class create mode 100644 Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java create mode 100644 Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java delete mode 100644 Dozentenmodul/src/gui/lecture/EditLinkLecture_GUI.java delete mode 100644 Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java delete mode 100644 Dozentenmodul/src/gui/lecture/SearchEditLecture_GUI.java diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class index f8f17cdd..8a14b449 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class index 5bf673b1..8a5194f2 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class index 6f66b19e..39c2910f 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class index 1c95b480..8dcb0f90 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class index 215b47fe..70962f9c 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class index b0c2904f..c02959c2 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class index a5045e6e..f5009ce3 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class index 47662324..8feae5df 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class index 0e42153a..6613c5db 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class index a4ac78a8..5df62ad7 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class index 99826f3b..4a933e6e 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class index 9732d4d5..3933987c 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class index b8da1599..44bbface 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class index b899f1f9..cadf961a 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class index 9b72b607..cd7f2b25 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class index f6b45f3a..8fa34671 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class index 80795cad..9e30be11 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class index bbfae636..ff02ba32 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class index 146b3f50..5b3e93a0 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class index 41b0f8a0..e0ebd234 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class index cf73744d..f0cfc5da 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class index ddc1f540..b6600cc8 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class index ee72ad78..772ed400 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class index 37a9ab4b..ffde361f 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class index b0ed7cbd..e2b34c9a 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class index 533b5b24..c0b06c44 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class index ab46596e..59f25618 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class index 6e02e951..76da6ffd 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class deleted file mode 100644 index 6f117bda..00000000 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$11.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class deleted file mode 100644 index 2658640d..00000000 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$12.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class index 89c32672..d88ea420 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class index f2be5a62..bb811f7a 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class index 89669271..1cf17778 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class index ac611e57..f33e263d 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class index 40333b3d..715c30d8 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class index 0ce905d2..10cac7e7 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class index dfe0fd6d..a42c1174 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class index ffa1370e..293c16b6 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class differ diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class index 1c2b587b..242c673a 100644 Binary files a/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class and b/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class index f3dd321e..e4b01d60 100644 Binary files a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class and b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class index fd1db594..57e66269 100644 Binary files a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class and b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$1.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$1.class deleted file mode 100644 index 47c63d0c..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$2.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$2.class deleted file mode 100644 index 892b1146..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$3.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$3.class deleted file mode 100644 index 90035c9c..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$4.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$4.class deleted file mode 100644 index 5f75304e..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$5.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$5.class deleted file mode 100644 index cffdc75a..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$6.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$6.class deleted file mode 100644 index 50c6fd03..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$7.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$7.class deleted file mode 100644 index d75be1b5..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI.class b/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI.class deleted file mode 100644 index 52d083e0..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/EditLinkLecture_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$1.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$1.class deleted file mode 100644 index 20320054..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$2.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$2.class deleted file mode 100644 index 5648a1e6..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$3.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$3.class deleted file mode 100644 index bc0e3d3e..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$4.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$4.class deleted file mode 100644 index 51852440..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$5.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$5.class deleted file mode 100644 index bb626fb9..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class deleted file mode 100644 index 0eaf1aa8..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class deleted file mode 100644 index c65dc3ac..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class b/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class deleted file mode 100644 index 8edecdf7..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/LinkLecture_GUI.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$1.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$1.class deleted file mode 100644 index e13684eb..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$1.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$2.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$2.class deleted file mode 100644 index ab0ca727..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$2.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$3.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$3.class deleted file mode 100644 index 9be48f4a..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$3.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$4.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$4.class deleted file mode 100644 index 089015f7..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$4.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$5.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$5.class deleted file mode 100644 index 12d258fb..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$5.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$6.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$6.class deleted file mode 100644 index e3015c86..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$6.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$7.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$7.class deleted file mode 100644 index d306ed22..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI$7.class and /dev/null differ diff --git a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI.class b/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI.class deleted file mode 100644 index 87d19a51..00000000 Binary files a/Dozentenmodul/bin/gui/lecture/SearchEditLecture_GUI.class and /dev/null differ diff --git a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java index 75318185..95a50732 100644 --- a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java @@ -21,7 +21,6 @@ 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; diff --git a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java index 612f5f20..9965002c 100644 --- a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java +++ b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java @@ -1,12 +1,7 @@ package gui.intro; -import gui.image.DeleteImage_GUI; -import gui.image.CreateImageAllgemein_GUI; -import gui.image.SearchEditImage_GUI; -import gui.lecture.CreateLectureAllgemein_GUI; -import gui.lecture.SearchEditLecture_GUI; -import gui.lecture.SearchMethodLecture_GUI; - +import gui.image.*; +import gui.lecture.*; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Toolkit; @@ -17,7 +12,6 @@ import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; -import java.awt.Color; import javax.swing.JLabel; import java.awt.Font; import javax.swing.JTextPane; @@ -35,8 +29,6 @@ import javax.swing.ToolTipManager; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.border.TitledBorder; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; import java.awt.ScrollPane; import javax.swing.JTextArea; import javax.swing.ImageIcon; @@ -373,8 +365,9 @@ public class MainMenue_GUI extends JFrame { av.setVisible(true); dispose(); } else if (rdbtnVeranstaltungEdit.isSelected() == true) { - SearchEditLecture_GUI sl = new SearchEditLecture_GUI(); - sl.setVisible(true); + //SearchEditLecture_GUI sl = new SearchEditLecture_GUI(); + EditLectureSearch_GUI el = new EditLectureSearch_GUI(); + el.setVisible(true); dispose(); } } diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java index 56abba76..936f9b13 100644 --- a/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java @@ -398,7 +398,7 @@ public class CreateLectureAllgemein_GUI extends JFrame { null, "Das End-Datum liegt vor dem Start-Datum. Bitte ändern.", "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); + JOptionPane.INFORMATION_MESSAGE); } else { // bereit isDateOrderCorrect = true; @@ -411,7 +411,7 @@ public class CreateLectureAllgemein_GUI extends JFrame { JOptionPane.showMessageDialog(null, "Das End-Datum liegt zu weit in der Zukunft. Erlaubt ist maximal:\n" + endDate, "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); + JOptionPane.INFORMATION_MESSAGE); } else { // bereit isDateMaxLifeTimeCorrect = true; @@ -426,7 +426,7 @@ public class CreateLectureAllgemein_GUI extends JFrame { null, "Bitte geben Sie einen Veranstaltungsnamen und eine Beschreibung ein.", "Datum fehlerhaft", - JOptionPane.ERROR_MESSAGE); + JOptionPane.INFORMATION_MESSAGE); } else { // Textfelder bereit isAllInformationReady = true; @@ -453,7 +453,7 @@ public class CreateLectureAllgemein_GUI extends JFrame { Image.image.setImagename(txtFldVeranstaltungsname .getText()); - LinkLecture_GUI ev = new LinkLecture_GUI(); + CreateLectureLink_GUI ev = new CreateLectureLink_GUI(); ev.setVisible(true); dispose(); } diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java new file mode 100644 index 00000000..29193798 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java @@ -0,0 +1,495 @@ +package gui.lecture; + +import gui.intro.MainMenue_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.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.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 CreateLectureLink_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JComboBox comboBox; + JTable tableAllImages = new JTable(); + JTable tablemyImages = new JTable(); + JTable tableCoopImages = new JTable(); + JTable tablePublicImages = new JTable(); + JTable tablePublicVorlagen = new JTable(); + private JTextField textFieldName; + String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", + "Verantwortlicher", "Letztes Update", "Schlagwort" }; + ThriftConnection con = new ThriftConnection(); + Client client = con.getThriftConnection(); + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + CreateLectureLink_GUI dialog = new CreateLectureLink_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public CreateLectureLink_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + System.exit(0); + } + + @Override + public void windowOpened(WindowEvent arg0) { + textFieldName.requestFocusInWindow(); + } + }); + 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("Image zur Verlinkung ausw\u00E4hlen"); + 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("W\u00E4hlen Sie bitte ein Image aus, auf dem Ihre Versanstaltung basiert."); + 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( + "Erweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + comboBox = new JComboBox(); + try { + List 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) { + + CreateLectureLink_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("Imageauswahl"); + lblNewLabel_1.setBounds(164, 11, 85, 14); + contentPanel.add(lblNewLabel_1); + + JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); + + tabbedPane.setBounds(10, 197, 557, 300); + contentPanel.add(tabbedPane); + + JScrollPane scrollPaneMyImage = new JScrollPane(); + + 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(); + + 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); + tabbedPane.setEnabledAt(2, false); + + JScrollPane scrollPanePublicImages = new JScrollPane(); + + 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(); + + 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); + + 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 cancelButton = new JButton("Zur\u00FCck"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + con.closeThriftConnection(); + CreateLectureAllgemein_GUI eVAG = new CreateLectureAllgemein_GUI(); + eVAG.setVisible(true); + dispose(); + } + }); + cancelButton.setActionCommand("CANCEL"); + buttonPane.add(cancelButton); + getRootPane().setDefaultButton(cancelButton); + } + { + JButton doLinkButton = new JButton( + "Veranstaltung erzeugen und abschlie\u00DFen"); + doLinkButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + // check if a row is selected + if ((tableAllImages.getSelectedRow() != -1) + || (tablemyImages.getSelectedRow() != -1) + || (tableCoopImages.getSelectedRow() != -1) + || (tablePublicImages.getSelectedRow() != -1) + || (tablePublicVorlagen.getSelectedRow() != -1)) { + + // a row is selected, do operations + String imagename = tableAllImages.getValueAt( + tableAllImages.getSelectedRow(), 0) + .toString(); + try { + DateFormat formatter = new SimpleDateFormat( + "yyyy-MM-dd hh:mm:ss"); + System.out.println("Veranstaltung anlegen um: " + + 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()); + JOptionPane + .showMessageDialog( + null, + "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmenü zurück.", + "Veranstaltung angelegt", + JOptionPane.INFORMATION_MESSAGE); + // zurück zum Menü + MainMenue_GUI m = new MainMenue_GUI(); + m.setVisible(true); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + JOptionPane + .showMessageDialog( + null, + "Beim Anlegen Ihrer Veranstaltung ist ein Fehler aufgetreten.", + "Error", + JOptionPane.ERROR_MESSAGE); + } + con.closeThriftConnection(); + dispose(); + + } else { + // nothing selected + JOptionPane.showMessageDialog(null, + "Bitte wählen Sie ein Image aus.", + "Image Auswahl", + JOptionPane.INFORMATION_MESSAGE); + } + + } + }); + doLinkButton.setActionCommand("OK"); + buttonPane.add(doLinkButton); + } + } + + 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 images; + try { + images = client.getImageList(); + Iterator i = images.iterator(); + List ListObj = new ArrayList(); + 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/lecture/EditLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java index 5c84610c..40b3ce84 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java @@ -367,7 +367,7 @@ public class EditLectureAllgemein_GUI extends JFrame { Image.image.setImagename(textFieldLaborname.getText()); - LinkLecture_GUI ev=new LinkLecture_GUI(); + CreateLectureLink_GUI ev=new CreateLectureLink_GUI(); ev.setVisible(true); dispose(); } diff --git a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java new file mode 100644 index 00000000..819f3541 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java @@ -0,0 +1,482 @@ +package gui.lecture; + +import gui.intro.MainMenue_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.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.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 EditLectureLink_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JComboBox comboBox; + JTable tableAllImages = new JTable(); + JTable tablemyImages = new JTable(); + JTable tableCoopImages = new JTable(); + JTable tablePublicImages = new JTable(); + JTable tablePublicVorlagen = new JTable(); + 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 { + EditLectureLink_GUI dialog = new EditLectureLink_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public EditLectureLink_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("Image zur Verlinkung ausw\u00E4hlen"); + 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("W\u00E4hlen Sie bitte ein Image aus, auf dem Ihre Versanstaltung basiert."); + 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( + "Erweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + comboBox = new JComboBox(); + try { + List 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) { + + EditLectureLink_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(); + + 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.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(); + + 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); + tabbedPane.setEnabledAt(2, false); + + JScrollPane scrollPanePublicImages = new JScrollPane(); + + 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(); + + 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 btnLinkLschen = new JButton("Link l\u00F6schen"); + btnLinkLschen.setEnabled(false); + 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) { + + EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI(); + el.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) { + + System.out.println("\ntableAllImages.getSelectedRow() = "+tableAllImages.getSelectedRow() + +"\ntablemyImages.getSelectedRow() = "+tablemyImages.getSelectedRow() + +"\ntableCoopImages.getSelectedRow() = "+tableCoopImages.getSelectedRow() + +"\ntablePublicImages.getSelectedRow() = "+tablePublicImages.getSelectedRow() + +"\ntablePublicVorlagen.getSelectedRow() = "+tablePublicVorlagen.getSelectedRow() ); + + // check if a row is selected + if ((tableAllImages.getSelectedRow() != -1) + || (tablemyImages.getSelectedRow() != -1) + || (tableCoopImages.getSelectedRow() != -1) + || (tablePublicImages.getSelectedRow() != -1) + || (tablePublicVorlagen.getSelectedRow() != -1)) { + + // a row is selected, do operations + 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(); + } + + } else { + // nothing selected + JOptionPane.showMessageDialog(null, + "Bitte wählen Sie ein Image aus.", + "Image Auswahl", + JOptionPane.INFORMATION_MESSAGE); + + } + 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 images; + try { + images = client.getImageList(); + Iterator i = images.iterator(); + List ListObj = new ArrayList(); + 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/lecture/EditLectureSearch_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java new file mode 100644 index 00000000..c1ac5790 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java @@ -0,0 +1,538 @@ +package gui.lecture; + +import gui.image.EditImageAllgemein_GUI; +import gui.intro.MainMenue_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.ParseException; +import java.text.SimpleDateFormat; +import java.util.Iterator; +import java.util.List; +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.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.Lecture; +import models.person; +import org.apache.thrift.TException; +import server.Server.Client; +import thrift.ThriftConnection; + +@SuppressWarnings("serial") +public class EditLectureSearch_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JTable tableAllLectures; + JTable tablemyLectures; + JTable tableCoopImages; + JTable tablePublicVorlagen; + JTable tablePublicImages; + 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 rowSorterAll = new TableRowSorter( + modelAll); + final TableRowSorter rowSorterMyLectures = new TableRowSorter( + modelMyLectures); + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + EditLectureSearch_GUI dialog = new EditLectureSearch_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public EditLectureSearch_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( + "Erweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + // Öffnet das Fenster Extended GUI + con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_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 Hauptmenü + con.closeThriftConnection(); + EditLectureSearch_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(); + rowSorterMyLectures.setRowFilter(RowFilter.regexFilter( + username, 5)); + } else if (tabbedPane.getSelectedIndex() == 1) { + + } + + } + }); + + tabbedPane.setBounds(10, 197, 557, 323); + contentPanel.add(tabbedPane); + System.out.println("haaaaaaaaaaa"); + 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(); + 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(); + 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(); + 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); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton btnBack = new JButton("Zur\u00FCck"); + btnBack.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + // Öffnet das Hauptmenü + con.closeThriftConnection(); + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + dispose(); + } + }); + btnBack.setActionCommand("OK"); + buttonPane.add(btnBack); + getRootPane().setDefaultButton(btnBack); + } + { + JButton btnContinue = new JButton("Weiter"); + btnContinue.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + System.out + .println("\ntableAllImages.getSelectedRow() = " + + tableAllLectures.getSelectedRow() + + "\ntablemyImages.getSelectedRow() = " + + tablemyLectures.getSelectedRow() + + "\ntableCoopImages.getSelectedRow() = " + + tableCoopImages.getSelectedRow() + + "\ntablePublicImages.getSelectedRow() = " + + tablePublicImages.getSelectedRow() + + "\ntablePublicVorlagen.getSelectedRow() = " + + tablePublicVorlagen.getSelectedRow()); + + // check if a row is selected + if ((tableAllLectures.getSelectedRow() != -1) + || (tablemyLectures.getSelectedRow() != -1) + || (tableCoopImages.getSelectedRow() != -1) + || (tablePublicImages.getSelectedRow() != -1) + || (tablePublicVorlagen.getSelectedRow() != -1)) { + + // a row is selected, do operations + + if (tabbedPane.getSelectedIndex() == 0) { + + 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(); + System.out.println("original date = " + + modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 2).toString()); + Lecture.lecture.setLinkedImagename(modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 6).toString()); + + int zweitesLeerzeichen = date.indexOf(" ", + date.indexOf(" ") + 1); + + String startdate = date.substring(0, + zweitesLeerzeichen); + String enddate = date + .substring(zweitesLeerzeichen); + System.out.println("startdate = " + startdate); + System.out.println("enddate = " + enddate); + DateFormat df = new SimpleDateFormat( + "yyyy-MM-dd hh:mm:ss"); + + try { + // Format has to be "yyyy-MM-dd hh:mm:ss" + 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); + } + + con.closeThriftConnection(); + // EditImageAllgemein_GUI ea=new + // EditImageAllgemein_GUI(); + EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI(); + el.setVisible(true); + dispose(); + } else { + JOptionPane + .showMessageDialog( + null, + "Bitte wählen Sie ein eigenes Image aus", + "Message", + JOptionPane.INFORMATION_MESSAGE); + } + } else { + // nothing selected + JOptionPane.showMessageDialog(null, + "Bitte wählen Sie ein Image aus.", + "Image Auswahl", + JOptionPane.INFORMATION_MESSAGE); + }// end check if a row is selected + + } + }); + btnContinue.setActionCommand("Cancel"); + buttonPane.add(btnContinue); + } + } + + 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 lectures; + try { + // Hole eine Liste der Images + lectures = client.getLectureList(); + Iterator i = lectures.iterator(); + + int x = 0; + + while (i.hasNext()) { + // erzeuge Objekte für die Tabelle + 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++; + i.next(); + + } + + return model; + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + return model; + } + +} diff --git a/Dozentenmodul/src/gui/lecture/EditLinkLecture_GUI.java b/Dozentenmodul/src/gui/lecture/EditLinkLecture_GUI.java deleted file mode 100644 index 2288f5b0..00000000 --- a/Dozentenmodul/src/gui/lecture/EditLinkLecture_GUI.java +++ /dev/null @@ -1,438 +0,0 @@ -package gui.lecture; - - -import gui.intro.MainMenue_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 EditLinkLecture_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - JComboBox 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 { - EditLinkLecture_GUI dialog = new EditLinkLecture_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EditLinkLecture_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;iErweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - ExtendedSearchForImages_GUI es=new ExtendedSearchForImages_GUI(); - es.setVisible(true); - } - }); - lblErweiterteSuche.setForeground(Color.BLUE); - - lblErweiterteSuche.setBounds(431, 106, 89, 14); - panel_1.add(lblErweiterteSuche); - - comboBox = new JComboBox(); - try { - List list=client.getAllOS(); - comboBox.addItem(""); - for(int i=0;i"); - 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 images; - try { - images = client.getImageList(); - Iterator i=images.iterator(); - List ListObj = new ArrayList(); - 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/lecture/LinkLecture_GUI.java b/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java deleted file mode 100644 index d6464e4d..00000000 --- a/Dozentenmodul/src/gui/lecture/LinkLecture_GUI.java +++ /dev/null @@ -1,476 +0,0 @@ -package gui.lecture; - -import gui.intro.MainMenue_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.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.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 LinkLecture_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - JComboBox comboBox; - JTable tableAllImages; - private JTextField textFieldName; - String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", - "Verantwortlicher", "Letztes Update", "Schlagwort" }; - ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - LinkLecture_GUI dialog = new LinkLecture_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public LinkLecture_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - - @Override - public void windowOpened(WindowEvent arg0) { - textFieldName.requestFocusInWindow(); - } - }); - 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("Suche nach VL-Image"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie - .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 49, 557, 131); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - textFieldName = new JTextField(); - textFieldName.addKeyListener(new KeyAdapter() { - @Override - public void keyReleased(KeyEvent e) { - String stext = textFieldName.getText(); - modelAll.setRowCount(0); - initTableModel(modelAll); - - if (stext != "") - for (int i = 0; i < modelAll.getRowCount(); i++) { - - if (modelAll.getValueAt(i, 0).toString() - .startsWith(stext)) { - - } else { - modelAll.removeRow(i); - } - } - - } - - }); - - textFieldName.setBounds(270, 30, 250, 20); - panel_1.add(textFieldName); - textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel( - "Erweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); - es.setVisible(true); - } - }); - lblErweiterteSuche.setForeground(Color.BLUE); - - lblErweiterteSuche.setBounds(431, 106, 89, 14); - panel_1.add(lblErweiterteSuche); - - comboBox = new JComboBox(); - try { - List 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) { - - LinkLecture_GUI.this.setVisible(false); - MainMenue_GUI main = new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); - contentPanel.add(lblNewLabel_1); - - JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); - - tabbedPane.setBounds(10, 197, 557, 300); - contentPanel.add(tabbedPane); - - JScrollPane scrollPaneMyImage = new JScrollPane(); - JTable tablemyImages = new JTable(); - tablemyImages.setModel(model); - tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - JScrollPane scrollPaneAllImages = new JScrollPane(); - tableAllImages = new JTable(); - tableAllImages.setModel(modelAll); - tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - scrollPaneAllImages.setViewportView(tableAllImages); - tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); - - scrollPaneMyImage.setViewportView(tablemyImages); - tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); - - JScrollPane scrollPaneCoopImages = new JScrollPane(); - JTable tableCoopImages = new JTable(); - tableCoopImages.setModel(model); - tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - scrollPaneCoopImages.setViewportView(tableCoopImages); - tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, - null); - 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); - - 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 cancelButton = new JButton("Zur\u00FCck"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - con.closeThriftConnection(); - CreateLectureAllgemein_GUI eVAG = new CreateLectureAllgemein_GUI(); - eVAG.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("CANCEL"); - buttonPane.add(cancelButton); - getRootPane().setDefaultButton(cancelButton); - } - { - JButton doLinkButton = new JButton( - "Veranstaltung erzeugen und abschlie\u00DFen"); - doLinkButton.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("Veranstaltung anlegen um: " - + 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()); - JOptionPane - .showMessageDialog( - null, - "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmenü zurück.", - "Veranstaltung angelegt", - JOptionPane.PLAIN_MESSAGE); - // zurück zum Menü - MainMenue_GUI m = new MainMenue_GUI(); - m.setVisible(true); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - JOptionPane - .showMessageDialog( - null, - "Beim Anlegen Ihrer Veranstaltung ist ein Fehler aufgetreten.", - "Error", JOptionPane.ERROR_MESSAGE); - } - con.closeThriftConnection(); - dispose(); - - } - }); - doLinkButton.setActionCommand("OK"); - buttonPane.add(doLinkButton); - } - } - - 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 images; - try { - images = client.getImageList(); - Iterator i = images.iterator(); - List ListObj = new ArrayList(); - 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/lecture/SearchEditLecture_GUI.java b/Dozentenmodul/src/gui/lecture/SearchEditLecture_GUI.java deleted file mode 100644 index 93fb899e..00000000 --- a/Dozentenmodul/src/gui/lecture/SearchEditLecture_GUI.java +++ /dev/null @@ -1,451 +0,0 @@ -package gui.lecture; - - -import gui.image.EditImageAllgemein_GUI; -import gui.intro.MainMenue_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.ParseException; -import java.text.SimpleDateFormat; -import java.util.Iterator; -import java.util.List; -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.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.Lecture; -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 rowSorterAll = new TableRowSorter( modelAll ); - final TableRowSorter rowSorterMyLectures = new TableRowSorter( 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("Erweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Öffnet das Fenster Extended GUI - con.closeThriftConnection(); - ExtendedSearchForImages_GUI es=new ExtendedSearchForImages_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 Hauptmenü - 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(); - rowSorterMyLectures.setRowFilter(RowFilter.regexFilter(username, 5)); - } - else if(tabbedPane.getSelectedIndex()==1){ - - - - } - - } - }); - - tabbedPane.setBounds(10, 197, 557, 323); - contentPanel.add(tabbedPane); - System.out.println("haaaaaaaaaaa"); - 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); - { - 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) { - - - //Image.image.setImageId(imageid); - if(tabbedPane.getSelectedIndex()==0){ - - - 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"); - - 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); - } - - 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 lectures; - try { - //Hole eine Liste der Images - lectures = client.getLectureList(); - Iterator i=lectures.iterator(); - - int x=0; - - while(i.hasNext()) - { - //erzeuge Objekte für die Tabelle - 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++; - i.next(); - - } - - return model; - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - return model; - } - - } - - -- cgit v1.2.3-55-g7522 From 7f129e45b05c27ff84c61569d11aec0e8ff2dbe8 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 18:36:41 +0200 Subject: Haufen Konsolenausgaben enfernt --- .../bin/gui/image/EditImageAllgemein_GUI$4.class | Bin 1889 -> 1616 bytes .../bin/gui/image/EditImageAllgemein_GUI.class | Bin 9112 -> 9112 bytes .../bin/gui/image/FTPCreateUploader_GUI$3.class | Bin 1626 -> 1446 bytes .../bin/gui/image/FTPCreateUploader_GUI.class | Bin 12294 -> 12313 bytes .../bin/gui/image/FTPDownloader_GUI$2.class | Bin 1452 -> 1303 bytes .../bin/gui/image/FTPDownloader_GUI$3.class | Bin 1167 -> 1167 bytes .../bin/gui/image/FTPDownloader_GUI$4.class | Bin 785 -> 785 bytes .../bin/gui/image/FTPDownloader_GUI$5.class | Bin 1557 -> 1557 bytes .../bin/gui/image/FTPDownloader_GUI$6.class | Bin 972 -> 972 bytes Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class | Bin 10072 -> 10072 bytes .../bin/gui/image/FTPEditUploader_GUI$3.class | Bin 1614 -> 1434 bytes .../bin/gui/image/FTPEditUploader_GUI.class | Bin 11883 -> 11869 bytes .../bin/gui/image/SearchEditImage_GUI.class | Bin 11743 -> 11743 bytes Dozentenmodul/bin/gui/intro/Login_GUI.class | Bin 7818 -> 7783 bytes .../src/gui/image/EditImageAllgemein_GUI.java | 7 +------ .../src/gui/image/FTPCreateUploader_GUI.java | 10 +++++----- Dozentenmodul/src/gui/image/FTPDownloader_GUI.java | 1 - .../src/gui/image/FTPEditUploader_GUI.java | 12 +++++------- .../src/gui/image/SearchEditImage_GUI.java | 1 - Dozentenmodul/src/gui/intro/Login_GUI.java | 2 +- .../src/gui/lecture/CreateLectureLink_GUI.java | 2 +- .../src/gui/lecture/EditLectureLink_GUI.java | 11 +++-------- .../src/gui/lecture/EditLectureSearch_GUI.java | 11 +---------- 23 files changed, 17 insertions(+), 40 deletions(-) diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class index fd8e0655..64a79922 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class and b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class index b7fda6b3..c0b072cf 100644 Binary files a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class and b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class index 39c2910f..a788e377 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class index 6613c5db..bddb3425 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class index 0c902bbd..30c1812c 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class index f2ab99cc..6d6c863c 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class index 70a5c30b..ef04eb8c 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class index 34e4f69a..d4bc6778 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class index 52cf6065..623a9c0e 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class index 2961f5f1..c8860206 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class index 3933987c..b790203f 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class index 8fa34671..5a6ea8fa 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class index c0b06c44..264f9d4a 100644 Binary files a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class and b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI.class b/Dozentenmodul/bin/gui/intro/Login_GUI.class index 8da7aa27..26499333 100644 Binary files a/Dozentenmodul/bin/gui/intro/Login_GUI.class and b/Dozentenmodul/bin/gui/intro/Login_GUI.class differ diff --git a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java index cdcf9f6d..b80e4953 100644 --- a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java @@ -267,12 +267,7 @@ public class EditImageAllgemein_GUI extends JFrame { okButton = new JButton("Weiter"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { - System.out.println("text length="+imagename.getText().length()); - //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar - - //TODO - //Prüfung ob alle notwendigen Felder ausgefüllt sind --> funktioniert aktuell nicht - //der Button wechselt beim Klick auf die nächste Seite, selbst wenn kein handler implementiert ist... WTF??? + //check is textfield has content if(imagename.getText().length() <= 0){ JOptionPane.showMessageDialog(null, "Bitte geben Sie einen Labornamen ein.", diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java index b585fa50..e8c0c4b9 100644 --- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -142,12 +142,12 @@ public class FTPCreateUploader_GUI extends JFrame implements File file = fc.getSelectedFile(); // check if a file is selected and exists if (file != null) { - System.out.println("File to upload exists"); + // file selected uploadFile = file; filename = uploadFile.getName(); lblPath.setText(file.getAbsolutePath()); } else { - System.out.println("No file selected"); + // no file selected lblPath.setText(""); }// end if } @@ -378,9 +378,9 @@ public class FTPCreateUploader_GUI extends JFrame implements try { user = client.getFtpUser(); - System.out.println("name" + user.userName); - System.out.println("path" + user.path); - System.out.println("pass" + user.password); + System.out.println("FTP name" + user.userName); + System.out.println("FTP path" + user.path); + System.out.println("FTP pass" + user.password); } catch (TException e) { // TODO Auto-generated catch block e.printStackTrace(); diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java index f6175934..4a54e346 100644 --- a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -124,7 +124,6 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener // check if directory is selected if (dir != null) { // is selected - System.out.println("Target directory exists."); lblPath.setText(dir.getAbsolutePath()); } else { // no directory selected diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java index dd35ad83..9863c1c6 100644 --- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -145,12 +145,12 @@ public class FTPEditUploader_GUI extends JFrame implements File file = fc.getSelectedFile(); // check if a file is selected and exists if (file != null) { - System.out.println("File to upload exists"); + // file exists uploadFile = file; filename = uploadFile.getName(); lblPath.setText(file.getAbsolutePath()); } else { - System.out.println("No file selected"); + // no file selected lblPath.setText(""); }// end if } @@ -374,9 +374,9 @@ public class FTPEditUploader_GUI extends JFrame implements try { user = client.getFtpUser(); - System.out.println("name" + user.userName); - System.out.println("path" + user.path); - System.out.println("pass" + user.password); + System.out.println("FTP name" + user.userName); + System.out.println("FTP path" + user.path); + System.out.println("FTP pass" + user.password); } catch (TException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -457,8 +457,6 @@ public class FTPEditUploader_GUI extends JFrame implements public boolean updateData() { try { - - System.out.println("Start Update"); client.updateImageData(Image.image.getImagename(), Image.image.getNewName(), Image.image.isLicensed(), Image.image.isInternet(), Image.image.getRam(), diff --git a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java index 95a50732..e6bb055e 100644 --- a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java @@ -502,7 +502,6 @@ public class SearchEditImage_GUI extends JFrame { images.get(x).getUserData(), images.get(x).getUpdateTime(), "", images.get(x).id, images.get(x).getVersion() }; - // System.out.println("id:"+images.get(x).getId()); // Füge diese Objekte der Tabelle hinzu model.addRow(obj); x++; diff --git a/Dozentenmodul/src/gui/intro/Login_GUI.java b/Dozentenmodul/src/gui/intro/Login_GUI.java index 586b8d13..488c6b69 100644 --- a/Dozentenmodul/src/gui/intro/Login_GUI.java +++ b/Dozentenmodul/src/gui/intro/Login_GUI.java @@ -177,7 +177,7 @@ public class Login_GUI extends JFrame { final thrift.SessionData result; try { String passText = new String(pass.getPassword()); - System.out.println(username.getText() + " " + passText); + System.out.println("Benutzer:" +username.getText() + "\nPasswort" + passText); result = client.authenticate(username.getText(), passText); } catch (thrift.AuthenticationException e) { diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java index 29193798..a9125829 100644 --- a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java @@ -374,7 +374,7 @@ public class CreateLectureLink_GUI extends JFrame { try { DateFormat formatter = new SimpleDateFormat( "yyyy-MM-dd hh:mm:ss"); - System.out.println("Veranstaltung anlegen um: " + System.out.println("Veranstaltung angelegt um: " + formatter.format( Lecture.lecture.getStartdate()) .toString()); diff --git a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java index 819f3541..c245ce79 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java @@ -116,7 +116,8 @@ public class EditLectureLink_GUI extends JFrame { getContentPane().add(panel); panel.setLayout(null); { - JLabel lblNewLabel = new JLabel("Image zur Verlinkung ausw\u00E4hlen"); + JLabel lblNewLabel = new JLabel( + "Image zur Verlinkung ausw\u00E4hlen"); lblNewLabel.setBounds(10, 11, 509, 22); panel.add(lblNewLabel); lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); @@ -357,13 +358,7 @@ public class EditLectureLink_GUI extends JFrame { "Veranstaltung erzeugen und abschlie\u00DFen"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - - System.out.println("\ntableAllImages.getSelectedRow() = "+tableAllImages.getSelectedRow() - +"\ntablemyImages.getSelectedRow() = "+tablemyImages.getSelectedRow() - +"\ntableCoopImages.getSelectedRow() = "+tableCoopImages.getSelectedRow() - +"\ntablePublicImages.getSelectedRow() = "+tablePublicImages.getSelectedRow() - +"\ntablePublicVorlagen.getSelectedRow() = "+tablePublicVorlagen.getSelectedRow() ); - + // check if a row is selected if ((tableAllImages.getSelectedRow() != -1) || (tablemyImages.getSelectedRow() != -1) diff --git a/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java index c1ac5790..ae50fa22 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java @@ -256,7 +256,6 @@ public class EditLectureSearch_GUI extends JFrame { tabbedPane.setBounds(10, 197, 557, 323); contentPanel.add(tabbedPane); - System.out.println("haaaaaaaaaaa"); initTableModel(modelMyLectures); JScrollPane scrollPaneAllImages = new JScrollPane(); @@ -402,13 +401,7 @@ public class EditLectureSearch_GUI extends JFrame { .convertRowIndexToModel(tablemyLectures .getSelectedRow()), 2).toString(); - System.out.println("original date = " - + modelMyLectures - .getValueAt( - tablemyLectures - .convertRowIndexToModel(tablemyLectures - .getSelectedRow()), - 2).toString()); + Lecture.lecture.setLinkedImagename(modelMyLectures .getValueAt( tablemyLectures @@ -423,8 +416,6 @@ public class EditLectureSearch_GUI extends JFrame { zweitesLeerzeichen); String enddate = date .substring(zweitesLeerzeichen); - System.out.println("startdate = " + startdate); - System.out.println("enddate = " + enddate); DateFormat df = new SimpleDateFormat( "yyyy-MM-dd hh:mm:ss"); -- cgit v1.2.3-55-g7522 From fc1f221a322076478ddff1e457a5ce97f1352834 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Apr 2014 09:19:57 +0200 Subject: FTP "Fertigstellen" Button nun korrekt --- .../src/gui/image/FTPCreateUploader_GUI.java | 33 +++++++++++---------- Dozentenmodul/src/gui/image/FTPDownloader_GUI.java | 3 +- .../src/gui/image/FTPEditUploader_GUI.java | 34 ++++++++++++---------- 3 files changed, 38 insertions(+), 32 deletions(-) diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java index e8c0c4b9..80285684 100644 --- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -50,7 +50,8 @@ public class FTPCreateUploader_GUI extends JFrame implements private final JPanel contentPanel = new JPanel(); JLabel lblPath; JProgressBar progressBar; - String host = "141.79.128.121"; + //String host = "141.79.128.121"; + String host = "141.79.128.102"; int port = 21; server.User user; String filename = ""; @@ -409,24 +410,26 @@ public class FTPCreateUploader_GUI extends JFrame implements if ("progress" == arg0.getPropertyName()) { progress = (Integer) arg0.getNewValue(); progressBar.setValue(progress); + + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + } - } + // Fertigstellen erlauben wenn upload abgeschlossen + if (progress == 100) { + finishButton.setEnabled(true); + } else { + finishButton.setEnabled(false); + } - // Button zum Fertigstellen freischalten, wenn 100% erreicht sind - if (progress == 0 || progress == 100) { - // not uploading currently - btnZurck.setEnabled(true); - } else { - // currently uploading, don't let user interact - btnZurck.setEnabled(false); } - // Fertigstellen erlauben wenn upload abgeschlossen - if (progress == 100) { - finishButton.setEnabled(true); - } else { - finishButton.setEnabled(false); - } + if ("speed" == arg0.getPropertyName()) { speed = (double) arg0.getNewValue(); diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java index 4a54e346..be31c364 100644 --- a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -45,7 +45,8 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener JLabel downspeed; User user; JProgressBar progressBar; - String host = "141.79.128.121"; + //String host = "141.79.128.121"; + String host = "141.79.128.102"; int port = 21; String username = "openslx"; String password = "openslx-ng"; diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java index 9863c1c6..b184c96c 100644 --- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -49,7 +49,8 @@ public class FTPEditUploader_GUI extends JFrame implements private final JPanel contentPanel = new JPanel(); JLabel lblPath; JProgressBar progressBar; - String host = "141.79.128.121"; + //String host = "141.79.128.121"; + String host = "141.79.128.102"; int port = 21; server.User user; String filename = ""; @@ -399,24 +400,25 @@ public class FTPEditUploader_GUI extends JFrame implements if ("progress" == arg0.getPropertyName()) { progress = (Integer) arg0.getNewValue(); progressBar.setValue(progress); + + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + } + // Fertigstellen erlauben wenn upload abgeschlossen + if (progress == 100) { + finishButton.setEnabled(true); + } else { + finishButton.setEnabled(false); + } } - // Button zum Fertigstellen freischalten, wenn 100% erreicht sind - if (progress == 0 || progress == 100) { - // not uploading currently - btnZurck.setEnabled(true); - } else { - // currently uploading, don't let user interact - btnZurck.setEnabled(false); - } - - // Fertigstellen erlauben wenn upload abgeschlossen - if (progress == 100) { - finishButton.setEnabled(true); - } else { - finishButton.setEnabled(false); - } + if ("speed" == arg0.getPropertyName()) { speed = (double) arg0.getNewValue(); -- cgit v1.2.3-55-g7522 From 5a4b5717873cbf93d233f3208f706f138acf1a22 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Apr 2014 09:23:00 +0200 Subject: testserver eingetragen --- Dozentenmodul/src/thrift/ThriftConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dozentenmodul/src/thrift/ThriftConnection.java b/Dozentenmodul/src/thrift/ThriftConnection.java index 79f4a123..311125f5 100644 --- a/Dozentenmodul/src/thrift/ThriftConnection.java +++ b/Dozentenmodul/src/thrift/ThriftConnection.java @@ -10,7 +10,8 @@ import server.Server; import server.Server.Client; public class ThriftConnection { - final TTransport transport = new TSocket("141.79.128.121", 9090); + //final TTransport transport = new TSocket("141.79.128.121", 9090); + final TTransport transport = new TSocket("141.79.128.102", 9090); public Client getThriftConnection() { -- cgit v1.2.3-55-g7522 From 071717fa422ec882ee50a15b21ba8d43aa3c5507 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Apr 2014 09:24:07 +0200 Subject: ycxv --- .../bin/gui/image/FTPCreateUploader_GUI$1.class | Bin 792 -> 792 bytes .../bin/gui/image/FTPCreateUploader_GUI$2.class | Bin 1313 -> 1313 bytes .../bin/gui/image/FTPCreateUploader_GUI$3.class | Bin 1446 -> 1446 bytes .../bin/gui/image/FTPCreateUploader_GUI$4.class | Bin 1198 -> 1198 bytes .../bin/gui/image/FTPCreateUploader_GUI$5.class | Bin 813 -> 813 bytes .../bin/gui/image/FTPCreateUploader_GUI$6.class | Bin 1707 -> 1707 bytes .../bin/gui/image/FTPCreateUploader_GUI$7.class | Bin 1652 -> 1652 bytes .../bin/gui/image/FTPCreateUploader_GUI$8.class | Bin 890 -> 890 bytes .../bin/gui/image/FTPCreateUploader_GUI.class | Bin 12313 -> 12312 bytes .../bin/gui/image/FTPDownloader_GUI$1.class | Bin 1414 -> 1414 bytes .../bin/gui/image/FTPDownloader_GUI$2.class | Bin 1303 -> 1303 bytes .../bin/gui/image/FTPDownloader_GUI$3.class | Bin 1167 -> 1167 bytes .../bin/gui/image/FTPDownloader_GUI$4.class | Bin 785 -> 785 bytes .../bin/gui/image/FTPDownloader_GUI$5.class | Bin 1557 -> 1557 bytes .../bin/gui/image/FTPDownloader_GUI$6.class | Bin 972 -> 972 bytes Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class | Bin 10072 -> 10072 bytes .../bin/gui/image/FTPEditUploader_GUI$1.class | Bin 782 -> 782 bytes .../bin/gui/image/FTPEditUploader_GUI$2.class | Bin 1301 -> 1301 bytes .../bin/gui/image/FTPEditUploader_GUI$3.class | Bin 1434 -> 1434 bytes .../bin/gui/image/FTPEditUploader_GUI$4.class | Bin 1186 -> 1186 bytes .../bin/gui/image/FTPEditUploader_GUI$5.class | Bin 799 -> 799 bytes .../bin/gui/image/FTPEditUploader_GUI$6.class | Bin 1503 -> 1503 bytes .../bin/gui/image/FTPEditUploader_GUI.class | Bin 11869 -> 11868 bytes Dozentenmodul/bin/thrift/ThriftConnection.class | Bin 1590 -> 1590 bytes 24 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class index 8a14b449..3eded544 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class index 8a5194f2..aac75f6d 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class index a788e377..4adde720 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class index 8dcb0f90..03aeea73 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class index 70962f9c..7ffa5033 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class index c02959c2..720ce3cd 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class index f5009ce3..496f2158 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class index 8feae5df..4cffa045 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class index bddb3425..1da41c16 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class index 40fe319c..8d1a72b2 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class index 30c1812c..da9b9274 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class index 6d6c863c..f2ab99cc 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class index ef04eb8c..70a5c30b 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class index d4bc6778..34e4f69a 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class index 623a9c0e..52cf6065 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class index c8860206..7b45a7b4 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class index 5df62ad7..a25d7157 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class index 4a933e6e..55d72ee9 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class index b790203f..23f71ee1 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class index 44bbface..dfb69143 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class index cadf961a..87c0067c 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class index cd7f2b25..8d99419a 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class index 5a6ea8fa..d3571c94 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class differ diff --git a/Dozentenmodul/bin/thrift/ThriftConnection.class b/Dozentenmodul/bin/thrift/ThriftConnection.class index 7f087cc1..f378593f 100644 Binary files a/Dozentenmodul/bin/thrift/ThriftConnection.class and b/Dozentenmodul/bin/thrift/ThriftConnection.class differ -- cgit v1.2.3-55-g7522 From ec67e80ff104bf90d307bf264283eb79d937f262 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Apr 2014 10:29:52 +0200 Subject: Test --- .../bin/gui/image/FTPCreateUploader_GUI$8.class | Bin 890 -> 1014 bytes .../bin/gui/image/FTPCreateUploader_GUI.class | Bin 12313 -> 12313 bytes .../bin/gui/image/FTPDownloader_GUI$1.class | Bin 1414 -> 1414 bytes .../bin/gui/image/FTPDownloader_GUI$2.class | Bin 1303 -> 1303 bytes .../bin/gui/image/FTPDownloader_GUI$3.class | Bin 1167 -> 1167 bytes .../bin/gui/image/FTPDownloader_GUI$4.class | Bin 785 -> 785 bytes .../bin/gui/image/FTPDownloader_GUI$5.class | Bin 1557 -> 1557 bytes .../bin/gui/image/FTPDownloader_GUI$6.class | Bin 972 -> 972 bytes .../bin/gui/image/FTPDownloader_GUI.class | Bin 10072 -> 9974 bytes Dozentenmodul/bin/gui/intro/Login_GUI$1.class | Bin 1106 -> 1106 bytes Dozentenmodul/bin/gui/intro/Login_GUI$2.class | Bin 665 -> 665 bytes Dozentenmodul/bin/gui/intro/Login_GUI$3.class | Bin 677 -> 677 bytes Dozentenmodul/bin/gui/intro/Login_GUI$4.class | Bin 677 -> 677 bytes Dozentenmodul/bin/gui/intro/Login_GUI$5.class | Bin 674 -> 674 bytes Dozentenmodul/bin/gui/intro/Login_GUI.class | Bin 7783 -> 8052 bytes .../SessionData$SessionDataStandardScheme.class | Bin 2652 -> 2843 bytes ...sionData$SessionDataStandardSchemeFactory.class | Bin 965 -> 965 bytes .../SessionData$SessionDataTupleScheme.class | Bin 2118 -> 2290 bytes ...SessionData$SessionDataTupleSchemeFactory.class | Bin 941 -> 941 bytes Dozentenmodul/bin/thrift/SessionData$_Fields.class | Bin 2934 -> 3030 bytes Dozentenmodul/bin/thrift/SessionData.class | Bin 10381 -> 11687 bytes .../src/gui/image/FTPCreateUploader_GUI.java | 1 + Dozentenmodul/src/gui/image/FTPDownloader_GUI.java | 2 - Dozentenmodul/src/gui/intro/Login_GUI.java | 9 + Dozentenmodul/src/thrift/SessionData.java | 108 +- .../Server$AsyncClient$DeleteFtpUser_call.class | Bin 3131 -> 3131 bytes .../bin/server/Server$AsyncClient$Factory.class | Bin 1442 -> 1442 bytes .../server/Server$AsyncClient$getAllOS_call.class | Bin 2993 -> 2993 bytes .../Server$AsyncClient$getFtpUser_call.class | Bin 2945 -> 2945 bytes .../Server$AsyncClient$getImageData_call.class | Bin 3332 -> 3332 bytes .../Server$AsyncClient$getImageList_call.class | Bin 3021 -> 3021 bytes .../Server$AsyncClient$getLectureData_call.class | Bin 3246 -> 3246 bytes .../Server$AsyncClient$getLectureList_call.class | Bin 3039 -> 3039 bytes .../Server$AsyncClient$getPathOfImage_call.class | Bin 3267 -> 3267 bytes .../Server$AsyncClient$getPersonData_call.class | Bin 3333 -> 3333 bytes .../Server$AsyncClient$startFileCopy_call.class | Bin 3131 -> 3131 bytes .../Server$AsyncClient$updateImageData_call.class | Bin 3863 -> 3863 bytes .../Server$AsyncClient$writeLecturedata_call.class | Bin 4410 -> 4410 bytes .../Server$AsyncClient$writeVLdata_call.class | Bin 4241 -> 4241 bytes .../bin/server/Server$AsyncClient.class | Bin 8238 -> 9469 bytes .../bin/server/Server$AsyncIface.class | Bin 1460 -> 1802 bytes .../Server$AsyncProcessor$DeleteFtpUser$1.class | Bin 2969 -> 2969 bytes .../Server$AsyncProcessor$DeleteFtpUser.class | Bin 3107 -> 3107 bytes .../server/Server$AsyncProcessor$getAllOS$1.class | Bin 2997 -> 2997 bytes .../server/Server$AsyncProcessor$getAllOS.class | Bin 3062 -> 3062 bytes .../Server$AsyncProcessor$getFtpUser$1.class | Bin 2851 -> 2851 bytes .../server/Server$AsyncProcessor$getFtpUser.class | Bin 2996 -> 2996 bytes .../Server$AsyncProcessor$getImageData$1.class | Bin 3081 -> 3081 bytes .../Server$AsyncProcessor$getImageData.class | Bin 3292 -> 3292 bytes .../Server$AsyncProcessor$getImageList$1.class | Bin 3021 -> 3021 bytes .../Server$AsyncProcessor$getImageList.class | Bin 3098 -> 3098 bytes .../Server$AsyncProcessor$getLectureData$1.class | Bin 3099 -> 3099 bytes .../Server$AsyncProcessor$getLectureData.class | Bin 3275 -> 3275 bytes .../Server$AsyncProcessor$getLectureList$1.class | Bin 3045 -> 3045 bytes .../Server$AsyncProcessor$getLectureList.class | Bin 3132 -> 3132 bytes .../Server$AsyncProcessor$getPathOfImage$1.class | Bin 2907 -> 2907 bytes .../Server$AsyncProcessor$getPathOfImage.class | Bin 3174 -> 3174 bytes .../Server$AsyncProcessor$getPersonData$1.class | Bin 3090 -> 3090 bytes .../Server$AsyncProcessor$getPersonData.class | Bin 3301 -> 3301 bytes .../Server$AsyncProcessor$startFileCopy$1.class | Bin 2984 -> 2984 bytes .../Server$AsyncProcessor$startFileCopy.class | Bin 3119 -> 3119 bytes .../Server$AsyncProcessor$updateImageData$1.class | Bin 3002 -> 3002 bytes .../Server$AsyncProcessor$updateImageData.class | Bin 3367 -> 3367 bytes .../Server$AsyncProcessor$writeLecturedata$1.class | Bin 3011 -> 3011 bytes .../Server$AsyncProcessor$writeLecturedata.class | Bin 3648 -> 3648 bytes .../Server$AsyncProcessor$writeVLdata$1.class | Bin 2966 -> 2966 bytes .../server/Server$AsyncProcessor$writeVLdata.class | Bin 3490 -> 3490 bytes .../bin/server/Server$AsyncProcessor.class | Bin 3382 -> 3490 bytes .../bin/server/Server$Client$Factory.class | Bin 1411 -> 1411 bytes Dozentenmodulserver/bin/server/Server$Client.class | Bin 14914 -> 16916 bytes ...ser_args$DeleteFtpUser_argsStandardScheme.class | Bin 2628 -> 2628 bytes ...s$DeleteFtpUser_argsStandardSchemeFactory.class | Bin 1162 -> 1162 bytes ...tpUser_args$DeleteFtpUser_argsTupleScheme.class | Bin 2112 -> 2112 bytes ...args$DeleteFtpUser_argsTupleSchemeFactory.class | Bin 1138 -> 1138 bytes .../server/Server$DeleteFtpUser_args$_Fields.class | Bin 3004 -> 3004 bytes .../bin/server/Server$DeleteFtpUser_args.class | Bin 9460 -> 9460 bytes ...result$DeleteFtpUser_resultStandardScheme.class | Bin 2632 -> 2632 bytes ...DeleteFtpUser_resultStandardSchemeFactory.class | Bin 1194 -> 1194 bytes ...er_result$DeleteFtpUser_resultTupleScheme.class | Bin 2088 -> 2088 bytes ...lt$DeleteFtpUser_resultTupleSchemeFactory.class | Bin 1170 -> 1170 bytes .../Server$DeleteFtpUser_result$_Fields.class | Bin 3030 -> 3030 bytes .../bin/server/Server$DeleteFtpUser_result.class | Bin 9823 -> 9823 bytes Dozentenmodulserver/bin/server/Server$Iface.class | Bin 1695 -> 1992 bytes .../server/Server$Processor$DeleteFtpUser.class | Bin 2029 -> 2029 bytes .../bin/server/Server$Processor$getAllOS.class | Bin 1875 -> 1875 bytes .../bin/server/Server$Processor$getFtpUser.class | Bin 1901 -> 1901 bytes .../bin/server/Server$Processor$getImageData.class | Bin 2047 -> 2047 bytes .../bin/server/Server$Processor$getImageList.class | Bin 1939 -> 1939 bytes .../server/Server$Processor$getLectureData.class | Bin 2036 -> 2036 bytes .../server/Server$Processor$getLectureList.class | Bin 1971 -> 1971 bytes .../server/Server$Processor$getPathOfImage.class | Bin 2060 -> 2060 bytes .../server/Server$Processor$getPersonData.class | Bin 2059 -> 2059 bytes .../server/Server$Processor$startFileCopy.class | Bin 2029 -> 2029 bytes .../server/Server$Processor$updateImageData.class | Bin 2279 -> 2279 bytes .../server/Server$Processor$writeLecturedata.class | Bin 2563 -> 2563 bytes .../bin/server/Server$Processor$writeVLdata.class | Bin 2390 -> 2390 bytes .../bin/server/Server$Processor.class | Bin 3210 -> 3313 bytes .../bin/server/Server$getAllOS_args$_Fields.class | Bin 2848 -> 2848 bytes ...getAllOS_args$getAllOS_argsStandardScheme.class | Bin 2153 -> 2153 bytes ...S_args$getAllOS_argsStandardSchemeFactory.class | Bin 1082 -> 1082 bytes ...er$getAllOS_args$getAllOS_argsTupleScheme.class | Bin 1463 -> 1463 bytes ...llOS_args$getAllOS_argsTupleSchemeFactory.class | Bin 1058 -> 1058 bytes .../bin/server/Server$getAllOS_args.class | Bin 7328 -> 7328 bytes .../server/Server$getAllOS_result$_Fields.class | Bin 2980 -> 2980 bytes ...llOS_result$getAllOS_resultStandardScheme.class | Bin 3464 -> 3464 bytes ...sult$getAllOS_resultStandardSchemeFactory.class | Bin 1114 -> 1114 bytes ...etAllOS_result$getAllOS_resultTupleScheme.class | Bin 2849 -> 2849 bytes ..._result$getAllOS_resultTupleSchemeFactory.class | Bin 1090 -> 1090 bytes .../bin/server/Server$getAllOS_result.class | Bin 10548 -> 10548 bytes .../server/Server$getFtpUser_args$_Fields.class | Bin 2868 -> 2868 bytes ...tpUser_args$getFtpUser_argsStandardScheme.class | Bin 2177 -> 2177 bytes ...args$getFtpUser_argsStandardSchemeFactory.class | Bin 1114 -> 1114 bytes ...etFtpUser_args$getFtpUser_argsTupleScheme.class | Bin 1487 -> 1487 bytes ...er_args$getFtpUser_argsTupleSchemeFactory.class | Bin 1090 -> 1090 bytes .../bin/server/Server$getFtpUser_args.class | Bin 7400 -> 7400 bytes .../server/Server$getFtpUser_result$_Fields.class | Bin 3000 -> 3000 bytes ...er_result$getFtpUser_resultStandardScheme.class | Bin 2624 -> 2624 bytes ...lt$getFtpUser_resultStandardSchemeFactory.class | Bin 1146 -> 1146 bytes ...pUser_result$getFtpUser_resultTupleScheme.class | Bin 2111 -> 2111 bytes ...esult$getFtpUser_resultTupleSchemeFactory.class | Bin 1122 -> 1122 bytes .../bin/server/Server$getFtpUser_result.class | Bin 9665 -> 9665 bytes .../server/Server$getImageData_args$_Fields.class | Bin 3094 -> 3094 bytes ...Data_args$getImageData_argsStandardScheme.class | Bin 2811 -> 2811 bytes ...gs$getImageData_argsStandardSchemeFactory.class | Bin 1146 -> 1146 bytes ...ageData_args$getImageData_argsTupleScheme.class | Bin 2278 -> 2278 bytes ..._args$getImageData_argsTupleSchemeFactory.class | Bin 1122 -> 1122 bytes .../bin/server/Server$getImageData_args.class | Bin 10767 -> 10767 bytes .../Server$getImageData_result$_Fields.class | Bin 3020 -> 3020 bytes ..._result$getImageData_resultStandardScheme.class | Bin 3869 -> 3869 bytes ...$getImageData_resultStandardSchemeFactory.class | Bin 1178 -> 1178 bytes ...ata_result$getImageData_resultTupleScheme.class | Bin 3261 -> 3261 bytes ...ult$getImageData_resultTupleSchemeFactory.class | Bin 1154 -> 1154 bytes .../bin/server/Server$getImageData_result.class | Bin 10534 -> 10534 bytes .../server/Server$getImageList_args$_Fields.class | Bin 2888 -> 2888 bytes ...List_args$getImageList_argsStandardScheme.class | Bin 2201 -> 2201 bytes ...gs$getImageList_argsStandardSchemeFactory.class | Bin 1146 -> 1146 bytes ...ageList_args$getImageList_argsTupleScheme.class | Bin 1511 -> 1511 bytes ..._args$getImageList_argsTupleSchemeFactory.class | Bin 1122 -> 1122 bytes .../bin/server/Server$getImageList_args.class | Bin 7472 -> 7472 bytes .../Server$getImageList_result$_Fields.class | Bin 3020 -> 3020 bytes ..._result$getImageList_resultStandardScheme.class | Bin 3488 -> 3488 bytes ...$getImageList_resultStandardSchemeFactory.class | Bin 1178 -> 1178 bytes ...ist_result$getImageList_resultTupleScheme.class | Bin 2873 -> 2873 bytes ...ult$getImageList_resultTupleSchemeFactory.class | Bin 1154 -> 1154 bytes .../bin/server/Server$getImageList_result.class | Bin 10892 -> 10892 bytes .../Server$getLectureData_args$_Fields.class | Bin 3028 -> 3028 bytes ...ta_args$getLectureData_argsStandardScheme.class | Bin 2654 -> 2654 bytes ...$getLectureData_argsStandardSchemeFactory.class | Bin 1178 -> 1178 bytes ...eData_args$getLectureData_argsTupleScheme.class | Bin 2145 -> 2145 bytes ...rgs$getLectureData_argsTupleSchemeFactory.class | Bin 1154 -> 1154 bytes .../bin/server/Server$getLectureData_args.class | Bin 9574 -> 9574 bytes .../Server$getLectureData_result$_Fields.class | Bin 3040 -> 3040 bytes ...esult$getLectureData_resultStandardScheme.class | Bin 3893 -> 3893 bytes ...etLectureData_resultStandardSchemeFactory.class | Bin 1210 -> 1210 bytes ...a_result$getLectureData_resultTupleScheme.class | Bin 3285 -> 3285 bytes ...t$getLectureData_resultTupleSchemeFactory.class | Bin 1186 -> 1186 bytes .../bin/server/Server$getLectureData_result.class | Bin 10610 -> 10610 bytes .../Server$getLectureList_args$_Fields.class | Bin 2908 -> 2908 bytes ...st_args$getLectureList_argsStandardScheme.class | Bin 2225 -> 2225 bytes ...$getLectureList_argsStandardSchemeFactory.class | Bin 1178 -> 1178 bytes ...eList_args$getLectureList_argsTupleScheme.class | Bin 1535 -> 1535 bytes ...rgs$getLectureList_argsTupleSchemeFactory.class | Bin 1154 -> 1154 bytes .../bin/server/Server$getLectureList_args.class | Bin 7544 -> 7544 bytes .../Server$getLectureList_result$_Fields.class | Bin 3040 -> 3040 bytes ...esult$getLectureList_resultStandardScheme.class | Bin 3518 -> 3518 bytes ...etLectureList_resultStandardSchemeFactory.class | Bin 1210 -> 1210 bytes ...t_result$getLectureList_resultTupleScheme.class | Bin 2905 -> 2905 bytes ...t$getLectureList_resultTupleSchemeFactory.class | Bin 1186 -> 1186 bytes .../bin/server/Server$getLectureList_result.class | Bin 10984 -> 10984 bytes .../Server$getPathOfImage_args$_Fields.class | Bin 3106 -> 3106 bytes ...ge_args$getPathOfImage_argsStandardScheme.class | Bin 2827 -> 2827 bytes ...$getPathOfImage_argsStandardSchemeFactory.class | Bin 1178 -> 1178 bytes ...Image_args$getPathOfImage_argsTupleScheme.class | Bin 2290 -> 2290 bytes ...rgs$getPathOfImage_argsTupleSchemeFactory.class | Bin 1154 -> 1154 bytes .../bin/server/Server$getPathOfImage_args.class | Bin 10797 -> 10797 bytes .../Server$getPathOfImage_result$_Fields.class | Bin 3040 -> 3040 bytes ...esult$getPathOfImage_resultStandardScheme.class | Bin 2670 -> 2670 bytes ...etPathOfImage_resultStandardSchemeFactory.class | Bin 1210 -> 1210 bytes ...e_result$getPathOfImage_resultTupleScheme.class | Bin 2157 -> 2157 bytes ...t$getPathOfImage_resultTupleSchemeFactory.class | Bin 1186 -> 1186 bytes .../bin/server/Server$getPathOfImage_result.class | Bin 9604 -> 9604 bytes .../server/Server$getPersonData_args$_Fields.class | Bin 3096 -> 3096 bytes ...ata_args$getPersonData_argsStandardScheme.class | Bin 2815 -> 2815 bytes ...s$getPersonData_argsStandardSchemeFactory.class | Bin 1162 -> 1162 bytes ...onData_args$getPersonData_argsTupleScheme.class | Bin 2278 -> 2278 bytes ...args$getPersonData_argsTupleSchemeFactory.class | Bin 1138 -> 1138 bytes .../bin/server/Server$getPersonData_args.class | Bin 10760 -> 10760 bytes .../Server$getPersonData_result$_Fields.class | Bin 3030 -> 3030 bytes ...result$getPersonData_resultStandardScheme.class | Bin 3881 -> 3881 bytes ...getPersonData_resultStandardSchemeFactory.class | Bin 1194 -> 1194 bytes ...ta_result$getPersonData_resultTupleScheme.class | Bin 3273 -> 3273 bytes ...lt$getPersonData_resultTupleSchemeFactory.class | Bin 1170 -> 1170 bytes .../bin/server/Server$getPersonData_result.class | Bin 10572 -> 10572 bytes .../server/Server$startFileCopy_args$_Fields.class | Bin 3004 -> 3004 bytes ...opy_args$startFileCopy_argsStandardScheme.class | Bin 2628 -> 2628 bytes ...s$startFileCopy_argsStandardSchemeFactory.class | Bin 1162 -> 1162 bytes ...leCopy_args$startFileCopy_argsTupleScheme.class | Bin 2112 -> 2112 bytes ...args$startFileCopy_argsTupleSchemeFactory.class | Bin 1138 -> 1138 bytes .../bin/server/Server$startFileCopy_args.class | Bin 9460 -> 9460 bytes .../Server$startFileCopy_result$_Fields.class | Bin 3030 -> 3030 bytes ...result$startFileCopy_resultStandardScheme.class | Bin 2620 -> 2620 bytes ...startFileCopy_resultStandardSchemeFactory.class | Bin 1194 -> 1194 bytes ...py_result$startFileCopy_resultTupleScheme.class | Bin 2077 -> 2077 bytes ...lt$startFileCopy_resultTupleSchemeFactory.class | Bin 1170 -> 1170 bytes .../bin/server/Server$startFileCopy_result.class | Bin 9724 -> 9724 bytes .../Server$updateImageData_args$_Fields.class | Bin 3587 -> 3587 bytes ...a_args$updateImageData_argsStandardScheme.class | Bin 3944 -> 3944 bytes ...updateImageData_argsStandardSchemeFactory.class | Bin 1194 -> 1194 bytes ...Data_args$updateImageData_argsTupleScheme.class | Bin 3289 -> 3289 bytes ...gs$updateImageData_argsTupleSchemeFactory.class | Bin 1170 -> 1170 bytes .../bin/server/Server$updateImageData_args.class | Bin 18468 -> 18468 bytes .../Server$updateImageData_result$_Fields.class | Bin 3050 -> 3050 bytes ...sult$updateImageData_resultStandardScheme.class | Bin 2644 -> 2644 bytes ...dateImageData_resultStandardSchemeFactory.class | Bin 1226 -> 1226 bytes ..._result$updateImageData_resultTupleScheme.class | Bin 2101 -> 2101 bytes ...$updateImageData_resultTupleSchemeFactory.class | Bin 1202 -> 1202 bytes .../bin/server/Server$updateImageData_result.class | Bin 9798 -> 9798 bytes .../Server$writeLecturedata_args$_Fields.class | Bin 4053 -> 4053 bytes ..._args$writeLecturedata_argsStandardScheme.class | Bin 4862 -> 4862 bytes ...riteLecturedata_argsStandardSchemeFactory.class | Bin 1210 -> 1210 bytes ...ata_args$writeLecturedata_argsTupleScheme.class | Bin 4056 -> 4056 bytes ...s$writeLecturedata_argsTupleSchemeFactory.class | Bin 1186 -> 1186 bytes .../bin/server/Server$writeLecturedata_args.class | Bin 24604 -> 24604 bytes .../Server$writeLecturedata_result$_Fields.class | Bin 3060 -> 3060 bytes ...ult$writeLecturedata_resultStandardScheme.class | Bin 2656 -> 2656 bytes ...teLecturedata_resultStandardSchemeFactory.class | Bin 1242 -> 1242 bytes ...result$writeLecturedata_resultTupleScheme.class | Bin 2113 -> 2113 bytes ...writeLecturedata_resultTupleSchemeFactory.class | Bin 1218 -> 1218 bytes .../server/Server$writeLecturedata_result.class | Bin 9835 -> 9835 bytes .../server/Server$writeVLdata_args$_Fields.class | Bin 3914 -> 3914 bytes ...Ldata_args$writeVLdata_argsStandardScheme.class | Bin 4637 -> 4637 bytes ...rgs$writeVLdata_argsStandardSchemeFactory.class | Bin 1130 -> 1130 bytes ...teVLdata_args$writeVLdata_argsTupleScheme.class | Bin 3886 -> 3886 bytes ...a_args$writeVLdata_argsTupleSchemeFactory.class | Bin 1106 -> 1106 bytes .../bin/server/Server$writeVLdata_args.class | Bin 23310 -> 23310 bytes .../server/Server$writeVLdata_result$_Fields.class | Bin 3010 -> 3010 bytes ...a_result$writeVLdata_resultStandardScheme.class | Bin 2596 -> 2596 bytes ...t$writeVLdata_resultStandardSchemeFactory.class | Bin 1162 -> 1162 bytes ...data_result$writeVLdata_resultTupleScheme.class | Bin 2053 -> 2053 bytes ...sult$writeVLdata_resultTupleSchemeFactory.class | Bin 1138 -> 1138 bytes .../bin/server/Server$writeVLdata_result.class | Bin 9650 -> 9650 bytes Dozentenmodulserver/bin/server/Server.class | Bin 2354 -> 2508 bytes Dozentenmodulserver/bin/server/ServerHandler.class | Bin 10530 -> 11027 bytes .../bin/server/User$UserStandardScheme.class | Bin 2769 -> 2737 bytes .../server/User$UserStandardSchemeFactory.class | Bin 853 -> 853 bytes .../bin/server/User$UserTupleScheme.class | Bin 2173 -> 2173 bytes .../bin/server/User$UserTupleSchemeFactory.class | Bin 829 -> 829 bytes Dozentenmodulserver/bin/server/User$_Fields.class | Bin 2946 -> 2938 bytes Dozentenmodulserver/bin/server/User.class | Bin 11400 -> 11240 bytes Dozentenmodulserver/bin/sql/SQL.class | Bin 13630 -> 14453 bytes Dozentenmodulserver/src/server/Server.java | 2296 ++++++++++++++++++++ Dozentenmodulserver/src/server/ServerHandler.java | 11 + Dozentenmodulserver/src/server/User.java | 1154 +++++----- Dozentenmodulserver/src/sql/SQL.java | 52 + Dozentenmodulserver/thrift/server.thrift | 1 + 255 files changed, 3026 insertions(+), 608 deletions(-) diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class index 8feae5df..e3beaa57 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class index bddb3425..cec2cfad 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class index 40fe319c..28596b7f 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class index 30c1812c..8b17dab5 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class index 6d6c863c..0b03bc49 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class index ef04eb8c..75c93b92 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class index d4bc6778..0c97260a 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class index 623a9c0e..842bbb87 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class index c8860206..0f9f8a09 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$1.class b/Dozentenmodul/bin/gui/intro/Login_GUI$1.class index a5df5dde..a064efc0 100644 Binary files a/Dozentenmodul/bin/gui/intro/Login_GUI$1.class and b/Dozentenmodul/bin/gui/intro/Login_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$2.class b/Dozentenmodul/bin/gui/intro/Login_GUI$2.class index e012848d..9c179a21 100644 Binary files a/Dozentenmodul/bin/gui/intro/Login_GUI$2.class and b/Dozentenmodul/bin/gui/intro/Login_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$3.class b/Dozentenmodul/bin/gui/intro/Login_GUI$3.class index 110634ac..33e222c7 100644 Binary files a/Dozentenmodul/bin/gui/intro/Login_GUI$3.class and b/Dozentenmodul/bin/gui/intro/Login_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$4.class b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class index 6a5edcf2..0fa234c1 100644 Binary files a/Dozentenmodul/bin/gui/intro/Login_GUI$4.class and b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$5.class b/Dozentenmodul/bin/gui/intro/Login_GUI$5.class index 95da5c83..c09574b4 100644 Binary files a/Dozentenmodul/bin/gui/intro/Login_GUI$5.class and b/Dozentenmodul/bin/gui/intro/Login_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI.class b/Dozentenmodul/bin/gui/intro/Login_GUI.class index 26499333..7f627245 100644 Binary files a/Dozentenmodul/bin/gui/intro/Login_GUI.class and b/Dozentenmodul/bin/gui/intro/Login_GUI.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class index f7b6f6b6..9b8c9ed9 100644 Binary files a/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class and b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class index 245e7cdc..132cbe65 100644 Binary files a/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class and b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class index 9c968929..eaa4e9a6 100644 Binary files a/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class and b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class index 2c83a82f..0abd2b91 100644 Binary files a/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class and b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$_Fields.class b/Dozentenmodul/bin/thrift/SessionData$_Fields.class index 13a9da4f..8a9df0f6 100644 Binary files a/Dozentenmodul/bin/thrift/SessionData$_Fields.class and b/Dozentenmodul/bin/thrift/SessionData$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData.class b/Dozentenmodul/bin/thrift/SessionData.class index f8597a01..f084b247 100644 Binary files a/Dozentenmodul/bin/thrift/SessionData.class and b/Dozentenmodul/bin/thrift/SessionData.class differ diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java index e8c0c4b9..81e34dcc 100644 --- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -350,6 +350,7 @@ public class FTPCreateUploader_GUI extends JFrame implements btnZurck.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dispose(); + thrift.closeThriftConnection(); CreateImageTechnisch_GUI m = new CreateImageTechnisch_GUI(); m.setVisible(true); } diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java index 4a54e346..dd8782f3 100644 --- a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -47,8 +47,6 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener JProgressBar progressBar; String host = "141.79.128.121"; int port = 21; - String username = "openslx"; - String password = "openslx-ng"; String downloadFile = ""; static String arg = ""; DownloadTask task; diff --git a/Dozentenmodul/src/gui/intro/Login_GUI.java b/Dozentenmodul/src/gui/intro/Login_GUI.java index 488c6b69..e2db747e 100644 --- a/Dozentenmodul/src/gui/intro/Login_GUI.java +++ b/Dozentenmodul/src/gui/intro/Login_GUI.java @@ -12,6 +12,8 @@ import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.File; import java.io.IOException; +import java.nio.channels.SeekableByteChannel; + import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; @@ -23,6 +25,8 @@ import javax.swing.JTextField; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; + +import models.SessionData; import models.person; import org.apache.thrift.TException; import org.ini4j.Wini; @@ -179,6 +183,10 @@ public class Login_GUI extends JFrame { String passText = new String(pass.getPassword()); System.out.println("Benutzer:" +username.getText() + "\nPasswort" + passText); result = client.authenticate(username.getText(), passText); + SessionData.session.setAuthToken(result.authToken); + SessionData.session.setSessionID(result.sessionId); + SessionData.session.setServerAdress(result.serverAddress); + System.out.println("Server Adresse: "+result.serverAddress); } catch (thrift.AuthenticationException e) { System.out.println("Authentifizierung fehlgeschlagen: " + e.message); @@ -232,6 +240,7 @@ public class Login_GUI extends JFrame { person.verantwortlicher.setVorname(user.firstName); person.verantwortlicher.setEMail(user.eMail); person.verantwortlicher.setHochschule(hochschule); + // Öffne das Hauprmenü MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); diff --git a/Dozentenmodul/src/thrift/SessionData.java b/Dozentenmodul/src/thrift/SessionData.java index 98ef43b4..51f0f80b 100644 --- a/Dozentenmodul/src/thrift/SessionData.java +++ b/Dozentenmodul/src/thrift/SessionData.java @@ -37,6 +37,7 @@ public class SessionData implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -46,11 +47,13 @@ public class SessionData implements org.apache.thrift.TBase byName = new HashMap(); @@ -69,6 +72,8 @@ public class SessionData implements org.apache.thrift.TBase getLectureData(String lecturename) throws org.apache.thrift.TException; + public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws org.apache.thrift.TException; + } public interface AsyncIface { @@ -92,6 +94,8 @@ public class Server { public void getLectureData(String lecturename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -442,6 +446,43 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureData failed: unknown result"); } + public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws org.apache.thrift.TException + { + send_updateLecturedata(name, newName, shortdesc, desc, startDate, endDate, isActive, imagename, firstname, lastname, university, Mail, Tel, Fak, id); + return recv_updateLecturedata(); + } + + public void send_updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws org.apache.thrift.TException + { + updateLecturedata_args args = new updateLecturedata_args(); + args.setName(name); + args.setNewName(newName); + args.setShortdesc(shortdesc); + args.setDesc(desc); + args.setStartDate(startDate); + args.setEndDate(endDate); + args.setIsActive(isActive); + args.setImagename(imagename); + args.setFirstname(firstname); + args.setLastname(lastname); + args.setUniversity(university); + args.setMail(Mail); + args.setTel(Tel); + args.setFak(Fak); + args.setId(id); + sendBase("updateLecturedata", args); + } + + public boolean recv_updateLecturedata() throws org.apache.thrift.TException + { + updateLecturedata_result result = new updateLecturedata_result(); + receiveBase(result, "updateLecturedata"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateLecturedata failed: unknown result"); + } + } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { @@ -963,6 +1004,80 @@ public class Server { } } + public void updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + updateLecturedata_call method_call = new updateLecturedata_call(name, newName, shortdesc, desc, startDate, endDate, isActive, imagename, firstname, lastname, university, Mail, Tel, Fak, id, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class updateLecturedata_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + private String newName; + private String shortdesc; + private String desc; + private String startDate; + private String endDate; + private boolean isActive; + private String imagename; + private String firstname; + private String lastname; + private String university; + private String Mail; + private String Tel; + private String Fak; + private String id; + public updateLecturedata_call(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + this.newName = newName; + this.shortdesc = shortdesc; + this.desc = desc; + this.startDate = startDate; + this.endDate = endDate; + this.isActive = isActive; + this.imagename = imagename; + this.firstname = firstname; + this.lastname = lastname; + this.university = university; + this.Mail = Mail; + this.Tel = Tel; + this.Fak = Fak; + this.id = id; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLecturedata", org.apache.thrift.protocol.TMessageType.CALL, 0)); + updateLecturedata_args args = new updateLecturedata_args(); + args.setName(name); + args.setNewName(newName); + args.setShortdesc(shortdesc); + args.setDesc(desc); + args.setStartDate(startDate); + args.setEndDate(endDate); + args.setIsActive(isActive); + args.setImagename(imagename); + args.setFirstname(firstname); + args.setLastname(lastname); + args.setUniversity(university); + args.setMail(Mail); + args.setTel(Tel); + args.setFak(Fak); + args.setId(id); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_updateLecturedata(); + } + } + } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { @@ -989,6 +1104,7 @@ public class Server { processMap.put("getImageData", new getImageData()); processMap.put("updateImageData", new updateImageData()); processMap.put("getLectureData", new getLectureData()); + processMap.put("updateLecturedata", new updateLecturedata()); return processMap; } @@ -1257,6 +1373,27 @@ public class Server { } } + public static class updateLecturedata extends org.apache.thrift.ProcessFunction { + public updateLecturedata() { + super("updateLecturedata"); + } + + public updateLecturedata_args getEmptyArgsInstance() { + return new updateLecturedata_args(); + } + + protected boolean isOneway() { + return false; + } + + public updateLecturedata_result getResult(I iface, updateLecturedata_args args) throws org.apache.thrift.TException { + updateLecturedata_result result = new updateLecturedata_result(); + result.success = iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.id); + result.setSuccessIsSet(true); + return result; + } + } + } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { @@ -1283,6 +1420,7 @@ public class Server { processMap.put("getImageData", new getImageData()); processMap.put("updateImageData", new updateImageData()); processMap.put("getLectureData", new getLectureData()); + processMap.put("updateLecturedata", new updateLecturedata()); return processMap; } @@ -1954,6 +2092,58 @@ public class Server { } } + public static class updateLecturedata extends org.apache.thrift.AsyncProcessFunction { + public updateLecturedata() { + super("updateLecturedata"); + } + + public updateLecturedata_args getEmptyArgsInstance() { + return new updateLecturedata_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + updateLecturedata_result result = new updateLecturedata_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + updateLecturedata_result result = new updateLecturedata_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, updateLecturedata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.id,resultHandler); + } + } + } public static class getFtpUser_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { @@ -14304,4 +14494,2110 @@ public class Server { } + public static class updateLecturedata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecturedata_args"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)-1); + private static final org.apache.thrift.protocol.TField NEW_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("newName", org.apache.thrift.protocol.TType.STRING, (short)-2); + private static final org.apache.thrift.protocol.TField SHORTDESC_FIELD_DESC = new org.apache.thrift.protocol.TField("shortdesc", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.STRING, (short)-5); + private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.STRING, (short)-6); + private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)-7); + private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)-8); + private static final org.apache.thrift.protocol.TField FIRSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstname", org.apache.thrift.protocol.TType.STRING, (short)-9); + private static final org.apache.thrift.protocol.TField LASTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastname", org.apache.thrift.protocol.TType.STRING, (short)-10); + private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-11); + private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("Mail", org.apache.thrift.protocol.TType.STRING, (short)-12); + private static final org.apache.thrift.protocol.TField TEL_FIELD_DESC = new org.apache.thrift.protocol.TField("Tel", org.apache.thrift.protocol.TType.STRING, (short)-13); + private static final org.apache.thrift.protocol.TField FAK_FIELD_DESC = new org.apache.thrift.protocol.TField("Fak", org.apache.thrift.protocol.TType.STRING, (short)-14); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-15); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateLecturedata_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateLecturedata_argsTupleSchemeFactory()); + } + + public String name; // required + public String newName; // required + public String shortdesc; // required + public String desc; // required + public String startDate; // required + public String endDate; // required + public boolean isActive; // required + public String imagename; // required + public String firstname; // required + public String lastname; // required + public String university; // required + public String Mail; // required + public String Tel; // required + public String Fak; // required + public String id; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)-1, "name"), + NEW_NAME((short)-2, "newName"), + SHORTDESC((short)-3, "shortdesc"), + DESC((short)-4, "desc"), + START_DATE((short)-5, "startDate"), + END_DATE((short)-6, "endDate"), + IS_ACTIVE((short)-7, "isActive"), + IMAGENAME((short)-8, "imagename"), + FIRSTNAME((short)-9, "firstname"), + LASTNAME((short)-10, "lastname"), + UNIVERSITY((short)-11, "university"), + MAIL((short)-12, "Mail"), + TEL((short)-13, "Tel"), + FAK((short)-14, "Fak"), + ID((short)-15, "id"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // NAME + return NAME; + case -2: // NEW_NAME + return NEW_NAME; + case -3: // SHORTDESC + return SHORTDESC; + case -4: // DESC + return DESC; + case -5: // START_DATE + return START_DATE; + case -6: // END_DATE + return END_DATE; + case -7: // IS_ACTIVE + return IS_ACTIVE; + case -8: // IMAGENAME + return IMAGENAME; + case -9: // FIRSTNAME + return FIRSTNAME; + case -10: // LASTNAME + return LASTNAME; + case -11: // UNIVERSITY + return UNIVERSITY; + case -12: // MAIL + return MAIL; + case -13: // TEL + return TEL; + case -14: // FAK + return FAK; + case -15: // ID + return ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISACTIVE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_NAME, new org.apache.thrift.meta_data.FieldMetaData("newName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SHORTDESC, new org.apache.thrift.meta_data.FieldMetaData("shortdesc", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FIRSTNAME, new org.apache.thrift.meta_data.FieldMetaData("firstname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LASTNAME, new org.apache.thrift.meta_data.FieldMetaData("lastname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAIL, new org.apache.thrift.meta_data.FieldMetaData("Mail", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TEL, new org.apache.thrift.meta_data.FieldMetaData("Tel", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FAK, new org.apache.thrift.meta_data.FieldMetaData("Fak", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecturedata_args.class, metaDataMap); + } + + public updateLecturedata_args() { + } + + public updateLecturedata_args( + String name, + String newName, + String shortdesc, + String desc, + String startDate, + String endDate, + boolean isActive, + String imagename, + String firstname, + String lastname, + String university, + String Mail, + String Tel, + String Fak, + String id) + { + this(); + this.name = name; + this.newName = newName; + this.shortdesc = shortdesc; + this.desc = desc; + this.startDate = startDate; + this.endDate = endDate; + this.isActive = isActive; + setIsActiveIsSet(true); + this.imagename = imagename; + this.firstname = firstname; + this.lastname = lastname; + this.university = university; + this.Mail = Mail; + this.Tel = Tel; + this.Fak = Fak; + this.id = id; + } + + /** + * Performs a deep copy on other. + */ + public updateLecturedata_args(updateLecturedata_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetNewName()) { + this.newName = other.newName; + } + if (other.isSetShortdesc()) { + this.shortdesc = other.shortdesc; + } + if (other.isSetDesc()) { + this.desc = other.desc; + } + if (other.isSetStartDate()) { + this.startDate = other.startDate; + } + if (other.isSetEndDate()) { + this.endDate = other.endDate; + } + this.isActive = other.isActive; + if (other.isSetImagename()) { + this.imagename = other.imagename; + } + if (other.isSetFirstname()) { + this.firstname = other.firstname; + } + if (other.isSetLastname()) { + this.lastname = other.lastname; + } + if (other.isSetUniversity()) { + this.university = other.university; + } + if (other.isSetMail()) { + this.Mail = other.Mail; + } + if (other.isSetTel()) { + this.Tel = other.Tel; + } + if (other.isSetFak()) { + this.Fak = other.Fak; + } + if (other.isSetId()) { + this.id = other.id; + } + } + + public updateLecturedata_args deepCopy() { + return new updateLecturedata_args(this); + } + + @Override + public void clear() { + this.name = null; + this.newName = null; + this.shortdesc = null; + this.desc = null; + this.startDate = null; + this.endDate = null; + setIsActiveIsSet(false); + this.isActive = false; + this.imagename = null; + this.firstname = null; + this.lastname = null; + this.university = null; + this.Mail = null; + this.Tel = null; + this.Fak = null; + this.id = null; + } + + public String getName() { + return this.name; + } + + public updateLecturedata_args setName(String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public String getNewName() { + return this.newName; + } + + public updateLecturedata_args setNewName(String newName) { + this.newName = newName; + return this; + } + + public void unsetNewName() { + this.newName = null; + } + + /** Returns true if field newName is set (has been assigned a value) and false otherwise */ + public boolean isSetNewName() { + return this.newName != null; + } + + public void setNewNameIsSet(boolean value) { + if (!value) { + this.newName = null; + } + } + + public String getShortdesc() { + return this.shortdesc; + } + + public updateLecturedata_args setShortdesc(String shortdesc) { + this.shortdesc = shortdesc; + return this; + } + + public void unsetShortdesc() { + this.shortdesc = null; + } + + /** Returns true if field shortdesc is set (has been assigned a value) and false otherwise */ + public boolean isSetShortdesc() { + return this.shortdesc != null; + } + + public void setShortdescIsSet(boolean value) { + if (!value) { + this.shortdesc = null; + } + } + + public String getDesc() { + return this.desc; + } + + public updateLecturedata_args setDesc(String desc) { + this.desc = desc; + return this; + } + + public void unsetDesc() { + this.desc = null; + } + + /** Returns true if field desc is set (has been assigned a value) and false otherwise */ + public boolean isSetDesc() { + return this.desc != null; + } + + public void setDescIsSet(boolean value) { + if (!value) { + this.desc = null; + } + } + + public String getStartDate() { + return this.startDate; + } + + public updateLecturedata_args setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + public void unsetStartDate() { + this.startDate = null; + } + + /** Returns true if field startDate is set (has been assigned a value) and false otherwise */ + public boolean isSetStartDate() { + return this.startDate != null; + } + + public void setStartDateIsSet(boolean value) { + if (!value) { + this.startDate = null; + } + } + + public String getEndDate() { + return this.endDate; + } + + public updateLecturedata_args setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + public void unsetEndDate() { + this.endDate = null; + } + + /** Returns true if field endDate is set (has been assigned a value) and false otherwise */ + public boolean isSetEndDate() { + return this.endDate != null; + } + + public void setEndDateIsSet(boolean value) { + if (!value) { + this.endDate = null; + } + } + + public boolean isIsActive() { + return this.isActive; + } + + public updateLecturedata_args setIsActive(boolean isActive) { + this.isActive = isActive; + setIsActiveIsSet(true); + return this; + } + + public void unsetIsActive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISACTIVE_ISSET_ID); + } + + /** Returns true if field isActive is set (has been assigned a value) and false otherwise */ + public boolean isSetIsActive() { + return EncodingUtils.testBit(__isset_bitfield, __ISACTIVE_ISSET_ID); + } + + public void setIsActiveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACTIVE_ISSET_ID, value); + } + + public String getImagename() { + return this.imagename; + } + + public updateLecturedata_args setImagename(String imagename) { + this.imagename = imagename; + return this; + } + + public void unsetImagename() { + this.imagename = null; + } + + /** Returns true if field imagename is set (has been assigned a value) and false otherwise */ + public boolean isSetImagename() { + return this.imagename != null; + } + + public void setImagenameIsSet(boolean value) { + if (!value) { + this.imagename = null; + } + } + + public String getFirstname() { + return this.firstname; + } + + public updateLecturedata_args setFirstname(String firstname) { + this.firstname = firstname; + return this; + } + + public void unsetFirstname() { + this.firstname = null; + } + + /** Returns true if field firstname is set (has been assigned a value) and false otherwise */ + public boolean isSetFirstname() { + return this.firstname != null; + } + + public void setFirstnameIsSet(boolean value) { + if (!value) { + this.firstname = null; + } + } + + public String getLastname() { + return this.lastname; + } + + public updateLecturedata_args setLastname(String lastname) { + this.lastname = lastname; + return this; + } + + public void unsetLastname() { + this.lastname = null; + } + + /** Returns true if field lastname is set (has been assigned a value) and false otherwise */ + public boolean isSetLastname() { + return this.lastname != null; + } + + public void setLastnameIsSet(boolean value) { + if (!value) { + this.lastname = null; + } + } + + public String getUniversity() { + return this.university; + } + + public updateLecturedata_args setUniversity(String university) { + this.university = university; + return this; + } + + public void unsetUniversity() { + this.university = null; + } + + /** Returns true if field university is set (has been assigned a value) and false otherwise */ + public boolean isSetUniversity() { + return this.university != null; + } + + public void setUniversityIsSet(boolean value) { + if (!value) { + this.university = null; + } + } + + public String getMail() { + return this.Mail; + } + + public updateLecturedata_args setMail(String Mail) { + this.Mail = Mail; + return this; + } + + public void unsetMail() { + this.Mail = null; + } + + /** Returns true if field Mail is set (has been assigned a value) and false otherwise */ + public boolean isSetMail() { + return this.Mail != null; + } + + public void setMailIsSet(boolean value) { + if (!value) { + this.Mail = null; + } + } + + public String getTel() { + return this.Tel; + } + + public updateLecturedata_args setTel(String Tel) { + this.Tel = Tel; + return this; + } + + public void unsetTel() { + this.Tel = null; + } + + /** Returns true if field Tel is set (has been assigned a value) and false otherwise */ + public boolean isSetTel() { + return this.Tel != null; + } + + public void setTelIsSet(boolean value) { + if (!value) { + this.Tel = null; + } + } + + public String getFak() { + return this.Fak; + } + + public updateLecturedata_args setFak(String Fak) { + this.Fak = Fak; + return this; + } + + public void unsetFak() { + this.Fak = null; + } + + /** Returns true if field Fak is set (has been assigned a value) and false otherwise */ + public boolean isSetFak() { + return this.Fak != null; + } + + public void setFakIsSet(boolean value) { + if (!value) { + this.Fak = null; + } + } + + public String getId() { + return this.id; + } + + public updateLecturedata_args setId(String id) { + this.id = id; + return this; + } + + public void unsetId() { + this.id = null; + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return this.id != null; + } + + public void setIdIsSet(boolean value) { + if (!value) { + this.id = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case NEW_NAME: + if (value == null) { + unsetNewName(); + } else { + setNewName((String)value); + } + break; + + case SHORTDESC: + if (value == null) { + unsetShortdesc(); + } else { + setShortdesc((String)value); + } + break; + + case DESC: + if (value == null) { + unsetDesc(); + } else { + setDesc((String)value); + } + break; + + case START_DATE: + if (value == null) { + unsetStartDate(); + } else { + setStartDate((String)value); + } + break; + + case END_DATE: + if (value == null) { + unsetEndDate(); + } else { + setEndDate((String)value); + } + break; + + case IS_ACTIVE: + if (value == null) { + unsetIsActive(); + } else { + setIsActive((Boolean)value); + } + break; + + case IMAGENAME: + if (value == null) { + unsetImagename(); + } else { + setImagename((String)value); + } + break; + + case FIRSTNAME: + if (value == null) { + unsetFirstname(); + } else { + setFirstname((String)value); + } + break; + + case LASTNAME: + if (value == null) { + unsetLastname(); + } else { + setLastname((String)value); + } + break; + + case UNIVERSITY: + if (value == null) { + unsetUniversity(); + } else { + setUniversity((String)value); + } + break; + + case MAIL: + if (value == null) { + unsetMail(); + } else { + setMail((String)value); + } + break; + + case TEL: + if (value == null) { + unsetTel(); + } else { + setTel((String)value); + } + break; + + case FAK: + if (value == null) { + unsetFak(); + } else { + setFak((String)value); + } + break; + + case ID: + if (value == null) { + unsetId(); + } else { + setId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case NEW_NAME: + return getNewName(); + + case SHORTDESC: + return getShortdesc(); + + case DESC: + return getDesc(); + + case START_DATE: + return getStartDate(); + + case END_DATE: + return getEndDate(); + + case IS_ACTIVE: + return Boolean.valueOf(isIsActive()); + + case IMAGENAME: + return getImagename(); + + case FIRSTNAME: + return getFirstname(); + + case LASTNAME: + return getLastname(); + + case UNIVERSITY: + return getUniversity(); + + case MAIL: + return getMail(); + + case TEL: + return getTel(); + + case FAK: + return getFak(); + + case ID: + return getId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case NEW_NAME: + return isSetNewName(); + case SHORTDESC: + return isSetShortdesc(); + case DESC: + return isSetDesc(); + case START_DATE: + return isSetStartDate(); + case END_DATE: + return isSetEndDate(); + case IS_ACTIVE: + return isSetIsActive(); + case IMAGENAME: + return isSetImagename(); + case FIRSTNAME: + return isSetFirstname(); + case LASTNAME: + return isSetLastname(); + case UNIVERSITY: + return isSetUniversity(); + case MAIL: + return isSetMail(); + case TEL: + return isSetTel(); + case FAK: + return isSetFak(); + case ID: + return isSetId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateLecturedata_args) + return this.equals((updateLecturedata_args)that); + return false; + } + + public boolean equals(updateLecturedata_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_newName = true && this.isSetNewName(); + boolean that_present_newName = true && that.isSetNewName(); + if (this_present_newName || that_present_newName) { + if (!(this_present_newName && that_present_newName)) + return false; + if (!this.newName.equals(that.newName)) + return false; + } + + boolean this_present_shortdesc = true && this.isSetShortdesc(); + boolean that_present_shortdesc = true && that.isSetShortdesc(); + if (this_present_shortdesc || that_present_shortdesc) { + if (!(this_present_shortdesc && that_present_shortdesc)) + return false; + if (!this.shortdesc.equals(that.shortdesc)) + return false; + } + + boolean this_present_desc = true && this.isSetDesc(); + boolean that_present_desc = true && that.isSetDesc(); + if (this_present_desc || that_present_desc) { + if (!(this_present_desc && that_present_desc)) + return false; + if (!this.desc.equals(that.desc)) + return false; + } + + boolean this_present_startDate = true && this.isSetStartDate(); + boolean that_present_startDate = true && that.isSetStartDate(); + if (this_present_startDate || that_present_startDate) { + if (!(this_present_startDate && that_present_startDate)) + return false; + if (!this.startDate.equals(that.startDate)) + return false; + } + + boolean this_present_endDate = true && this.isSetEndDate(); + boolean that_present_endDate = true && that.isSetEndDate(); + if (this_present_endDate || that_present_endDate) { + if (!(this_present_endDate && that_present_endDate)) + return false; + if (!this.endDate.equals(that.endDate)) + return false; + } + + boolean this_present_isActive = true; + boolean that_present_isActive = true; + if (this_present_isActive || that_present_isActive) { + if (!(this_present_isActive && that_present_isActive)) + return false; + if (this.isActive != that.isActive) + return false; + } + + boolean this_present_imagename = true && this.isSetImagename(); + boolean that_present_imagename = true && that.isSetImagename(); + if (this_present_imagename || that_present_imagename) { + if (!(this_present_imagename && that_present_imagename)) + return false; + if (!this.imagename.equals(that.imagename)) + return false; + } + + boolean this_present_firstname = true && this.isSetFirstname(); + boolean that_present_firstname = true && that.isSetFirstname(); + if (this_present_firstname || that_present_firstname) { + if (!(this_present_firstname && that_present_firstname)) + return false; + if (!this.firstname.equals(that.firstname)) + return false; + } + + boolean this_present_lastname = true && this.isSetLastname(); + boolean that_present_lastname = true && that.isSetLastname(); + if (this_present_lastname || that_present_lastname) { + if (!(this_present_lastname && that_present_lastname)) + return false; + if (!this.lastname.equals(that.lastname)) + return false; + } + + boolean this_present_university = true && this.isSetUniversity(); + boolean that_present_university = true && that.isSetUniversity(); + if (this_present_university || that_present_university) { + if (!(this_present_university && that_present_university)) + return false; + if (!this.university.equals(that.university)) + return false; + } + + boolean this_present_Mail = true && this.isSetMail(); + boolean that_present_Mail = true && that.isSetMail(); + if (this_present_Mail || that_present_Mail) { + if (!(this_present_Mail && that_present_Mail)) + return false; + if (!this.Mail.equals(that.Mail)) + return false; + } + + boolean this_present_Tel = true && this.isSetTel(); + boolean that_present_Tel = true && that.isSetTel(); + if (this_present_Tel || that_present_Tel) { + if (!(this_present_Tel && that_present_Tel)) + return false; + if (!this.Tel.equals(that.Tel)) + return false; + } + + boolean this_present_Fak = true && this.isSetFak(); + boolean that_present_Fak = true && that.isSetFak(); + if (this_present_Fak || that_present_Fak) { + if (!(this_present_Fak && that_present_Fak)) + return false; + if (!this.Fak.equals(that.Fak)) + return false; + } + + boolean this_present_id = true && this.isSetId(); + boolean that_present_id = true && that.isSetId(); + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (!this.id.equals(that.id)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateLecturedata_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNewName()).compareTo(other.isSetNewName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNewName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newName, other.newName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetShortdesc()).compareTo(other.isSetShortdesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetShortdesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shortdesc, other.shortdesc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(other.isSetStartDate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartDate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, other.startDate); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(other.isSetEndDate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndDate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, other.endDate); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(other.isSetIsActive()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsActive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, other.isActive); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImagename()).compareTo(other.isSetImagename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImagename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagename, other.imagename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFirstname()).compareTo(other.isSetFirstname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFirstname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstname, other.firstname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastname()).compareTo(other.isSetLastname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastname, other.lastname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUniversity()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMail()).compareTo(other.isSetMail()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMail()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Mail, other.Mail); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTel()).compareTo(other.isSetTel()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTel()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Tel, other.Tel); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFak()).compareTo(other.isSetFak()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFak()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Fak, other.Fak); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("updateLecturedata_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("newName:"); + if (this.newName == null) { + sb.append("null"); + } else { + sb.append(this.newName); + } + first = false; + if (!first) sb.append(", "); + sb.append("shortdesc:"); + if (this.shortdesc == null) { + sb.append("null"); + } else { + sb.append(this.shortdesc); + } + first = false; + if (!first) sb.append(", "); + sb.append("desc:"); + if (this.desc == null) { + sb.append("null"); + } else { + sb.append(this.desc); + } + first = false; + if (!first) sb.append(", "); + sb.append("startDate:"); + if (this.startDate == null) { + sb.append("null"); + } else { + sb.append(this.startDate); + } + first = false; + if (!first) sb.append(", "); + sb.append("endDate:"); + if (this.endDate == null) { + sb.append("null"); + } else { + sb.append(this.endDate); + } + first = false; + if (!first) sb.append(", "); + sb.append("isActive:"); + sb.append(this.isActive); + first = false; + if (!first) sb.append(", "); + sb.append("imagename:"); + if (this.imagename == null) { + sb.append("null"); + } else { + sb.append(this.imagename); + } + first = false; + if (!first) sb.append(", "); + sb.append("firstname:"); + if (this.firstname == null) { + sb.append("null"); + } else { + sb.append(this.firstname); + } + first = false; + if (!first) sb.append(", "); + sb.append("lastname:"); + if (this.lastname == null) { + sb.append("null"); + } else { + sb.append(this.lastname); + } + first = false; + if (!first) sb.append(", "); + sb.append("university:"); + if (this.university == null) { + sb.append("null"); + } else { + sb.append(this.university); + } + first = false; + if (!first) sb.append(", "); + sb.append("Mail:"); + if (this.Mail == null) { + sb.append("null"); + } else { + sb.append(this.Mail); + } + first = false; + if (!first) sb.append(", "); + sb.append("Tel:"); + if (this.Tel == null) { + sb.append("null"); + } else { + sb.append(this.Tel); + } + first = false; + if (!first) sb.append(", "); + sb.append("Fak:"); + if (this.Fak == null) { + sb.append("null"); + } else { + sb.append(this.Fak); + } + first = false; + if (!first) sb.append(", "); + sb.append("id:"); + if (this.id == null) { + sb.append("null"); + } else { + sb.append(this.id); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class updateLecturedata_argsStandardSchemeFactory implements SchemeFactory { + public updateLecturedata_argsStandardScheme getScheme() { + return new updateLecturedata_argsStandardScheme(); + } + } + + private static class updateLecturedata_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecturedata_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case -1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // NEW_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.newName = iprot.readString(); + struct.setNewNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // SHORTDESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.shortdesc = iprot.readString(); + struct.setShortdescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -5: // START_DATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startDate = iprot.readString(); + struct.setStartDateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -6: // END_DATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.endDate = iprot.readString(); + struct.setEndDateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -7: // IS_ACTIVE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isActive = iprot.readBool(); + struct.setIsActiveIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -8: // IMAGENAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imagename = iprot.readString(); + struct.setImagenameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -9: // FIRSTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.firstname = iprot.readString(); + struct.setFirstnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -10: // LASTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lastname = iprot.readString(); + struct.setLastnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -11: // UNIVERSITY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -12: // MAIL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.Mail = iprot.readString(); + struct.setMailIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -13: // TEL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.Tel = iprot.readString(); + struct.setTelIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -14: // FAK + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.Fak = iprot.readString(); + struct.setFakIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -15: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, updateLecturedata_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.id != null) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeString(struct.id); + oprot.writeFieldEnd(); + } + if (struct.Fak != null) { + oprot.writeFieldBegin(FAK_FIELD_DESC); + oprot.writeString(struct.Fak); + oprot.writeFieldEnd(); + } + if (struct.Tel != null) { + oprot.writeFieldBegin(TEL_FIELD_DESC); + oprot.writeString(struct.Tel); + oprot.writeFieldEnd(); + } + if (struct.Mail != null) { + oprot.writeFieldBegin(MAIL_FIELD_DESC); + oprot.writeString(struct.Mail); + oprot.writeFieldEnd(); + } + if (struct.university != null) { + oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC); + oprot.writeString(struct.university); + oprot.writeFieldEnd(); + } + if (struct.lastname != null) { + oprot.writeFieldBegin(LASTNAME_FIELD_DESC); + oprot.writeString(struct.lastname); + oprot.writeFieldEnd(); + } + if (struct.firstname != null) { + oprot.writeFieldBegin(FIRSTNAME_FIELD_DESC); + oprot.writeString(struct.firstname); + oprot.writeFieldEnd(); + } + if (struct.imagename != null) { + oprot.writeFieldBegin(IMAGENAME_FIELD_DESC); + oprot.writeString(struct.imagename); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC); + oprot.writeBool(struct.isActive); + oprot.writeFieldEnd(); + if (struct.endDate != null) { + oprot.writeFieldBegin(END_DATE_FIELD_DESC); + oprot.writeString(struct.endDate); + oprot.writeFieldEnd(); + } + if (struct.startDate != null) { + oprot.writeFieldBegin(START_DATE_FIELD_DESC); + oprot.writeString(struct.startDate); + oprot.writeFieldEnd(); + } + if (struct.desc != null) { + oprot.writeFieldBegin(DESC_FIELD_DESC); + oprot.writeString(struct.desc); + oprot.writeFieldEnd(); + } + if (struct.shortdesc != null) { + oprot.writeFieldBegin(SHORTDESC_FIELD_DESC); + oprot.writeString(struct.shortdesc); + oprot.writeFieldEnd(); + } + if (struct.newName != null) { + oprot.writeFieldBegin(NEW_NAME_FIELD_DESC); + oprot.writeString(struct.newName); + oprot.writeFieldEnd(); + } + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateLecturedata_argsTupleSchemeFactory implements SchemeFactory { + public updateLecturedata_argsTupleScheme getScheme() { + return new updateLecturedata_argsTupleScheme(); + } + } + + private static class updateLecturedata_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetNewName()) { + optionals.set(1); + } + if (struct.isSetShortdesc()) { + optionals.set(2); + } + if (struct.isSetDesc()) { + optionals.set(3); + } + if (struct.isSetStartDate()) { + optionals.set(4); + } + if (struct.isSetEndDate()) { + optionals.set(5); + } + if (struct.isSetIsActive()) { + optionals.set(6); + } + if (struct.isSetImagename()) { + optionals.set(7); + } + if (struct.isSetFirstname()) { + optionals.set(8); + } + if (struct.isSetLastname()) { + optionals.set(9); + } + if (struct.isSetUniversity()) { + optionals.set(10); + } + if (struct.isSetMail()) { + optionals.set(11); + } + if (struct.isSetTel()) { + optionals.set(12); + } + if (struct.isSetFak()) { + optionals.set(13); + } + if (struct.isSetId()) { + optionals.set(14); + } + oprot.writeBitSet(optionals, 15); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetNewName()) { + oprot.writeString(struct.newName); + } + if (struct.isSetShortdesc()) { + oprot.writeString(struct.shortdesc); + } + if (struct.isSetDesc()) { + oprot.writeString(struct.desc); + } + if (struct.isSetStartDate()) { + oprot.writeString(struct.startDate); + } + if (struct.isSetEndDate()) { + oprot.writeString(struct.endDate); + } + if (struct.isSetIsActive()) { + oprot.writeBool(struct.isActive); + } + if (struct.isSetImagename()) { + oprot.writeString(struct.imagename); + } + if (struct.isSetFirstname()) { + oprot.writeString(struct.firstname); + } + if (struct.isSetLastname()) { + oprot.writeString(struct.lastname); + } + if (struct.isSetUniversity()) { + oprot.writeString(struct.university); + } + if (struct.isSetMail()) { + oprot.writeString(struct.Mail); + } + if (struct.isSetTel()) { + oprot.writeString(struct.Tel); + } + if (struct.isSetFak()) { + oprot.writeString(struct.Fak); + } + if (struct.isSetId()) { + oprot.writeString(struct.id); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(15); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.newName = iprot.readString(); + struct.setNewNameIsSet(true); + } + if (incoming.get(2)) { + struct.shortdesc = iprot.readString(); + struct.setShortdescIsSet(true); + } + if (incoming.get(3)) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } + if (incoming.get(4)) { + struct.startDate = iprot.readString(); + struct.setStartDateIsSet(true); + } + if (incoming.get(5)) { + struct.endDate = iprot.readString(); + struct.setEndDateIsSet(true); + } + if (incoming.get(6)) { + struct.isActive = iprot.readBool(); + struct.setIsActiveIsSet(true); + } + if (incoming.get(7)) { + struct.imagename = iprot.readString(); + struct.setImagenameIsSet(true); + } + if (incoming.get(8)) { + struct.firstname = iprot.readString(); + struct.setFirstnameIsSet(true); + } + if (incoming.get(9)) { + struct.lastname = iprot.readString(); + struct.setLastnameIsSet(true); + } + if (incoming.get(10)) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } + if (incoming.get(11)) { + struct.Mail = iprot.readString(); + struct.setMailIsSet(true); + } + if (incoming.get(12)) { + struct.Tel = iprot.readString(); + struct.setTelIsSet(true); + } + if (incoming.get(13)) { + struct.Fak = iprot.readString(); + struct.setFakIsSet(true); + } + if (incoming.get(14)) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } + } + } + + } + + public static class updateLecturedata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecturedata_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateLecturedata_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateLecturedata_resultTupleSchemeFactory()); + } + + public boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecturedata_result.class, metaDataMap); + } + + public updateLecturedata_result() { + } + + public updateLecturedata_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public updateLecturedata_result(updateLecturedata_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public updateLecturedata_result deepCopy() { + return new updateLecturedata_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public updateLecturedata_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateLecturedata_result) + return this.equals((updateLecturedata_result)that); + return false; + } + + public boolean equals(updateLecturedata_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateLecturedata_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("updateLecturedata_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class updateLecturedata_resultStandardSchemeFactory implements SchemeFactory { + public updateLecturedata_resultStandardScheme getScheme() { + return new updateLecturedata_resultStandardScheme(); + } + } + + private static class updateLecturedata_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecturedata_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, updateLecturedata_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateLecturedata_resultTupleSchemeFactory implements SchemeFactory { + public updateLecturedata_resultTupleScheme getScheme() { + return new updateLecturedata_resultTupleScheme(); + } + } + + private static class updateLecturedata_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + } diff --git a/Dozentenmodulserver/src/server/ServerHandler.java b/Dozentenmodulserver/src/server/ServerHandler.java index 681a9a7c..c7ab500b 100644 --- a/Dozentenmodulserver/src/server/ServerHandler.java +++ b/Dozentenmodulserver/src/server/ServerHandler.java @@ -304,4 +304,15 @@ public class ServerHandler implements Server.Iface { return null; } + + @Override + public boolean updateLecturedata(String name, String newName, + String shortdesc, String desc, String startDate, String endDate, + boolean isActive, String imagename, String firstname, + String lastname, String university, String Mail, String Tel, + String Fak, String id) throws TException { + // TODO Auto-generated method stub + return false; + } + } diff --git a/Dozentenmodulserver/src/server/User.java b/Dozentenmodulserver/src/server/User.java index 5861a6e0..7bf98cc4 100644 --- a/Dozentenmodulserver/src/server/User.java +++ b/Dozentenmodulserver/src/server/User.java @@ -32,607 +32,557 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class User implements org.apache.thrift.TBase, - java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct( - "User"); - - private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField( - "userName", org.apache.thrift.protocol.TType.STRING, (short) -1); - private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField( - "password", org.apache.thrift.protocol.TType.STRING, (short) -2); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField( - "path", org.apache.thrift.protocol.TType.STRING, (short) -3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new UserStandardSchemeFactory()); - schemes.put(TupleScheme.class, new UserTupleSchemeFactory()); - } - - public String userName; // required - public String password; // required - public String path; // required - - /** - * The set of fields this struct contains, along with convenience methods - * for finding and manipulating them. - */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - USER_NAME((short) -1, "userName"), PASSWORD((short) -2, "password"), PATH( - (short) -3, "path"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not - * found. - */ - public static _Fields findByThriftId(int fieldId) { - switch (fieldId) { - case -1: // USER_NAME - return USER_NAME; - case -2: // PASSWORD - return PASSWORD; - case -3: // PATH - return PATH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) - throw new IllegalArgumentException("Field " + fieldId - + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not - * found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>( - _Fields.class); - tmpMap.put(_Fields.USER_NAME, - new org.apache.thrift.meta_data.FieldMetaData("userName", - org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData( - org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PASSWORD, - new org.apache.thrift.meta_data.FieldMetaData("password", - org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData( - org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData( - "path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData( - org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap( - User.class, metaDataMap); - } - - public User() { - } - - public User(String userName, String password, String path) { - this(); - this.userName = userName; - this.password = password; - this.path = path; - } - - /** - * Performs a deep copy on other. - */ - public User(User other) { - if (other.isSetUserName()) { - this.userName = other.userName; - } - if (other.isSetPassword()) { - this.password = other.password; - } - if (other.isSetPath()) { - this.path = other.path; - } - } - - public User deepCopy() { - return new User(this); - } - - @Override - public void clear() { - this.userName = null; - this.password = null; - this.path = null; - } - - public String getUserName() { - return this.userName; - } - - public User setUserName(String userName) { - this.userName = userName; - return this; - } - - public void unsetUserName() { - this.userName = null; - } - - /** - * Returns true if field userName is set (has been assigned a value) and - * false otherwise - */ - public boolean isSetUserName() { - return this.userName != null; - } - - public void setUserNameIsSet(boolean value) { - if (!value) { - this.userName = null; - } - } - - public String getPassword() { - return this.password; - } - - public User setPassword(String password) { - this.password = password; - return this; - } - - public void unsetPassword() { - this.password = null; - } - - /** - * Returns true if field password is set (has been assigned a value) and - * false otherwise - */ - public boolean isSetPassword() { - return this.password != null; - } - - public void setPasswordIsSet(boolean value) { - if (!value) { - this.password = null; - } - } - - public String getPath() { - return this.path; - } - - public User setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** - * Returns true if field path is set (has been assigned a value) and false - * otherwise - */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case USER_NAME: - if (value == null) { - unsetUserName(); - } else { - setUserName((String) value); - } - break; - - case PASSWORD: - if (value == null) { - unsetPassword(); - } else { - setPassword((String) value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String) value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case USER_NAME: - return getUserName(); - - case PASSWORD: - return getPassword(); - - case PATH: - return getPath(); - - } - throw new IllegalStateException(); - } - - /** - * Returns true if field corresponding to fieldID is set (has been assigned - * a value) and false otherwise - */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case USER_NAME: - return isSetUserName(); - case PASSWORD: - return isSetPassword(); - case PATH: - return isSetPath(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof User) - return this.equals((User) that); - return false; - } - - public boolean equals(User that) { - if (that == null) - return false; - - boolean this_present_userName = true && this.isSetUserName(); - boolean that_present_userName = true && that.isSetUserName(); - if (this_present_userName || that_present_userName) { - if (!(this_present_userName && that_present_userName)) - return false; - if (!this.userName.equals(that.userName)) - return false; - } - - boolean this_present_password = true && this.isSetPassword(); - boolean that_present_password = true && that.isSetPassword(); - if (this_present_password || that_present_password) { - if (!(this_present_password && that_present_password)) - return false; - if (!this.password.equals(that.password)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(User other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUserName()).compareTo( - other.isSetUserName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUserName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo( - this.userName, other.userName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPassword()).compareTo( - other.isSetPassword()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPassword()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo( - this.password, other.password); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo( - other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, - other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) - throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) - throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("User("); - boolean first = true; - - sb.append("userName:"); - if (this.userName == null) { - sb.append("null"); - } else { - sb.append(this.userName); - } - first = false; - if (!first) - sb.append(", "); - sb.append("password:"); - if (this.password == null) { - sb.append("null"); - } else { - sb.append(this.password); - } - first = false; - if (!first) - sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) - throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol( - new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) - throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol( - new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class UserStandardSchemeFactory implements SchemeFactory { - public UserStandardScheme getScheme() { - return new UserStandardScheme(); - } - } - - private static class UserStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, User struct) - throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case -1: // USER_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.userName = iprot.readString(); - struct.setUserNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, - schemeField.type); - } - break; - case -2: // PASSWORD - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.password = iprot.readString(); - struct.setPasswordIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, - schemeField.type); - } - break; - case -3: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, - schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, - schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be - // checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, - User struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - if (struct.password != null) { - oprot.writeFieldBegin(PASSWORD_FIELD_DESC); - oprot.writeString(struct.password); - oprot.writeFieldEnd(); - } - if (struct.userName != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(struct.userName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class UserTupleSchemeFactory implements SchemeFactory { - public UserTupleScheme getScheme() { - return new UserTupleScheme(); - } - } - - private static class UserTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, User struct) - throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetUserName()) { - optionals.set(0); - } - if (struct.isSetPassword()) { - optionals.set(1); - } - if (struct.isSetPath()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetUserName()) { - oprot.writeString(struct.userName); - } - if (struct.isSetPassword()) { - oprot.writeString(struct.password); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, User struct) - throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.userName = iprot.readString(); - struct.setUserNameIsSet(true); - } - if (incoming.get(1)) { - struct.password = iprot.readString(); - struct.setPasswordIsSet(true); - } - if (incoming.get(2)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - } - } +public class User implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User"); + + private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)-1); + private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)-2); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)-3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UserStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UserTupleSchemeFactory()); + } + + public String userName; // required + public String password; // required + public String path; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_NAME((short)-1, "userName"), + PASSWORD((short)-2, "password"), + PATH((short)-3, "path"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // USER_NAME + return USER_NAME; + case -2: // PASSWORD + return PASSWORD; + case -3: // PATH + return PATH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap); + } + + public User() { + } + + public User( + String userName, + String password, + String path) + { + this(); + this.userName = userName; + this.password = password; + this.path = path; + } + + /** + * Performs a deep copy on other. + */ + public User(User other) { + if (other.isSetUserName()) { + this.userName = other.userName; + } + if (other.isSetPassword()) { + this.password = other.password; + } + if (other.isSetPath()) { + this.path = other.path; + } + } + + public User deepCopy() { + return new User(this); + } + + @Override + public void clear() { + this.userName = null; + this.password = null; + this.path = null; + } + + public String getUserName() { + return this.userName; + } + + public User setUserName(String userName) { + this.userName = userName; + return this; + } + + public void unsetUserName() { + this.userName = null; + } + + /** Returns true if field userName is set (has been assigned a value) and false otherwise */ + public boolean isSetUserName() { + return this.userName != null; + } + + public void setUserNameIsSet(boolean value) { + if (!value) { + this.userName = null; + } + } + + public String getPassword() { + return this.password; + } + + public User setPassword(String password) { + this.password = password; + return this; + } + + public void unsetPassword() { + this.password = null; + } + + /** Returns true if field password is set (has been assigned a value) and false otherwise */ + public boolean isSetPassword() { + return this.password != null; + } + + public void setPasswordIsSet(boolean value) { + if (!value) { + this.password = null; + } + } + + public String getPath() { + return this.path; + } + + public User setPath(String path) { + this.path = path; + return this; + } + + public void unsetPath() { + this.path = null; + } + + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; + } + + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_NAME: + if (value == null) { + unsetUserName(); + } else { + setUserName((String)value); + } + break; + + case PASSWORD: + if (value == null) { + unsetPassword(); + } else { + setPassword((String)value); + } + break; + + case PATH: + if (value == null) { + unsetPath(); + } else { + setPath((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_NAME: + return getUserName(); + + case PASSWORD: + return getPassword(); + + case PATH: + return getPath(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_NAME: + return isSetUserName(); + case PASSWORD: + return isSetPassword(); + case PATH: + return isSetPath(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof User) + return this.equals((User)that); + return false; + } + + public boolean equals(User that) { + if (that == null) + return false; + + boolean this_present_userName = true && this.isSetUserName(); + boolean that_present_userName = true && that.isSetUserName(); + if (this_present_userName || that_present_userName) { + if (!(this_present_userName && that_present_userName)) + return false; + if (!this.userName.equals(that.userName)) + return false; + } + + boolean this_present_password = true && this.isSetPassword(); + boolean that_present_password = true && that.isSetPassword(); + if (this_present_password || that_present_password) { + if (!(this_present_password && that_present_password)) + return false; + if (!this.password.equals(that.password)) + return false; + } + + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) + return false; + if (!this.path.equals(that.path)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(User other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPassword()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("User("); + boolean first = true; + + sb.append("userName:"); + if (this.userName == null) { + sb.append("null"); + } else { + sb.append(this.userName); + } + first = false; + if (!first) sb.append(", "); + sb.append("password:"); + if (this.password == null) { + sb.append("null"); + } else { + sb.append(this.password); + } + first = false; + if (!first) sb.append(", "); + sb.append("path:"); + if (this.path == null) { + sb.append("null"); + } else { + sb.append(this.path); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class UserStandardSchemeFactory implements SchemeFactory { + public UserStandardScheme getScheme() { + return new UserStandardScheme(); + } + } + + private static class UserStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, User struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case -1: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userName = iprot.readString(); + struct.setUserNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // PASSWORD + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, User struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); + oprot.writeFieldEnd(); + } + if (struct.password != null) { + oprot.writeFieldBegin(PASSWORD_FIELD_DESC); + oprot.writeString(struct.password); + oprot.writeFieldEnd(); + } + if (struct.userName != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.userName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UserTupleSchemeFactory implements SchemeFactory { + public UserTupleScheme getScheme() { + return new UserTupleScheme(); + } + } + + private static class UserTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserName()) { + optionals.set(0); + } + if (struct.isSetPassword()) { + optionals.set(1); + } + if (struct.isSetPath()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUserName()) { + oprot.writeString(struct.userName); + } + if (struct.isSetPassword()) { + oprot.writeString(struct.password); + } + if (struct.isSetPath()) { + oprot.writeString(struct.path); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.userName = iprot.readString(); + struct.setUserNameIsSet(true); + } + if (incoming.get(1)) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } + if (incoming.get(2)) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } + } + } } + diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java index 0a2f5ab2..ec1ea11f 100644 --- a/Dozentenmodulserver/src/sql/SQL.java +++ b/Dozentenmodulserver/src/sql/SQL.java @@ -446,4 +446,56 @@ public class SQL { } return -1; } + + public int updateLectureData(Connection con, int pk_person, int pk_image, + int imageversion, String name, String desc, String shortdesc, + String start, String end, boolean isactive, String id) { + + DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + int active_bol = 0; + + if (isactive == true) { + active_bol = 1; + } + try { + Statement stm = con.createStatement(); + Random random = new Random(); + int uid = random.nextInt(); + stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_lecture`(`lectureID`,`name`,`isActive`,`startTime`,`endTime`,`lastUsed`,`shortDescription`,`description`,`imageID`,`imageVersion`,`admin_createTime`,`admin_changeTime`,`admin_owner`,`admin_change_by`)VALUES('" + + uid + + "','" + + name + + "','" + + active_bol + + "','" + + start + + "','" + + end + + "','" + + formatter.format(new Date()) + + "','" + + shortdesc + + "','" + + desc + + "','" + + pk_image + + "','" + + imageversion + + "','" + + formatter.format(new Date()) + + "','" + + formatter.format(new Date()) + + "','" + + pk_person + + "','" + + pk_person + "');"); + con.commit(); + + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return 0; + + } } diff --git a/Dozentenmodulserver/thrift/server.thrift b/Dozentenmodulserver/thrift/server.thrift index 8f845bff..2bcc9ba1 100644 --- a/Dozentenmodulserver/thrift/server.thrift +++ b/Dozentenmodulserver/thrift/server.thrift @@ -46,4 +46,5 @@ service Server{ map getImageData(string imageid, string imageversion), bool updateImageData(string name, string newName,bool license, bool internet, int ram,int cpu, string id, string version), map getLectureData(string lecturename), + bool updateLecturedata(string name, string newName ,string shortdesc, string desc,string startDate, string endDate, bool isActive, string imagename,string firstname,string lastname, string university, string Mail, string Tel,string Fak, string id), } \ No newline at end of file -- cgit v1.2.3-55-g7522