summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/GUI
diff options
context:
space:
mode:
Diffstat (limited to 'Dozentenmodul/src/GUI')
-rw-r--r--Dozentenmodul/src/GUI/BillOfRights_GUI.java192
-rw-r--r--Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java350
-rw-r--r--Dozentenmodul/src/GUI/EditImageTechnisch_GUI.java366
-rw-r--r--Dozentenmodul/src/GUI/EingabeImageAllgemein_GUI.java302
-rw-r--r--Dozentenmodul/src/GUI/EingabeImageTechnisch_GUI.java364
-rw-r--r--Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java504
-rw-r--r--Dozentenmodul/src/GUI/ExtendedSearch_GUI.java234
-rw-r--r--Dozentenmodul/src/GUI/FTPDownloader_GUI.java370
-rw-r--r--Dozentenmodul/src/GUI/FTPUploader_GUI.java500
-rw-r--r--Dozentenmodul/src/GUI/LinkImage_GUI.java471
-rw-r--r--Dozentenmodul/src/GUI/Login_GUI.java260
-rw-r--r--Dozentenmodul/src/GUI/MainMenue_GUI.java443
-rw-r--r--Dozentenmodul/src/GUI/SearchImage_GUI.java459
-rw-r--r--Dozentenmodul/src/GUI/SearchMethod_GUI.java243
-rw-r--r--Dozentenmodul/src/GUI/VmWareLink_GUI.java215
15 files changed, 0 insertions, 5273 deletions
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<String,String> 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<String> comboBox = new JComboBox<String>();
- 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 eaaf9544..00000000
--- a/Dozentenmodul/src/GUI/FTPUploader_GUI.java
+++ /dev/null
@@ -1,500 +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");
-
- /**
- * 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.setHorizontalAlignment(SwingConstants.LEFT);
- lblNewLabel.setBounds(285, 124, 302, 23);
- contentPanel.add(lblNewLabel);
-
- JButton btnUploadStarten = new JButton("Upload auf Server starten");
- 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.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);
- }
-
- }
- });
-
- // 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();
- EingabeImageTechnisch_GUI m = new EingabeImageTechnisch_GUI();
- m.setVisible(true);
- }
- });
- btnZurck.setActionCommand("Cancel");
- buttonPane.add(btnZurck);
-
- cancelButton.setActionCommand("Cancel");
- buttonPane.add(cancelButton);
- 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);
- } 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) {
- int 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 ("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<String> 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(
- "<html><u>Erweiterte Suche</u></html>");
- lblErweiterteSuche.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent arg0) {
- ExtendedSearch_GUI es = new ExtendedSearch_GUI();
- es.setVisible(true);
- }
- });
- lblErweiterteSuche.setForeground(Color.BLUE);
-
- lblErweiterteSuche.setBounds(431, 106, 89, 14);
- panel_1.add(lblErweiterteSuche);
-
- comboBox = new JComboBox<String>();
- try {
- List<String> list = client.getAllOS();
- comboBox.addItem("");
- for (int i = 0; i < list.size(); i++) {
- comboBox.addItem(list.get(i));
- }
- } catch (TException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- }
- comboBox.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- modelAll.setRowCount(0);
- initTableModel(modelAll);
- String selItem = comboBox.getSelectedItem().toString();
- if (selItem != "") {
- for (int i = 0; i < modelAll.getRowCount(); i++) {
-
- if (modelAll.getValueAt(i, 2).equals(selItem)) {
-
- } else {
- modelAll.removeRow(i);
- }
- }
-
- }
- }
- });
- comboBox.setBounds(270, 58, 250, 20);
- panel_1.add(comboBox);
-
- JLabel lblHauptmen = new JLabel("Hauptmen\u00FC");
- lblHauptmen.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent arg0) {
-
- 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<server.Image> images;
- try {
- images = client.getImageList();
- Iterator<server.Image> i = images.iterator();
- List<Object[]> ListObj = new ArrayList<Object[]>();
- int x = 0;
-
- while (i.hasNext()) {
-
- i.next();
- Object[] obj = { images.get(x).getImageName(),
- images.get(x).getLicenseRestriction(),
- images.get(x).getOsName(),
- images.get(x).getLectureName(),
- images.get(x).getUpdateTime(),
- images.get(x).getUserData() };
- ListObj.add(obj);
- model.addRow(ListObj.get(x));
- x++;
-
- }
-
- return model;
- } catch (TException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- return model;
- }
-
-}
diff --git a/Dozentenmodul/src/GUI/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 f1e79b82..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(true);
- 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("<html>"
- + "Ein virtuelles Labor besteht immer aus den beiden Komponenten <br>"
- + "Image und Veranstaltung. Ein Image ist dabei die Grundlage f\u00FCr <br>"
- + "mehrere Veranstaltungen. Somit kann eine neue Veranstaltung <br>"
- + "erstellt werden, ohne ein neues Image hochladen zu m\u00FCssen. <br> <br> <br>"
- + "<b>Image:</b> Das Image enth\u00E4lt die ben\u00F6tigte Software, die im <br>"
- + "virtuellen Labor ben\u00F6tigt wird. Es wird von genau einem Dozenten <br>"
- + "angelegt und besitzt einen allgemeinen Namen, z.B. \"Programmieren\". <br>"
- + "Bei einem Image handelt es sich um eine Datei vom Typ VMDK. <br> <br> <br>"
- + "<b>Veranstaltung:</b> Es k\u00F6nnen nun, basierend auf einem Image,<br>"
- + " beliebig viele Veranstaltungen von unterschiedlichen Dozenten erstellt <br>"
- + "werden. Diese k\u00F6nnten z.B. konkret \"Web-Entwicklung\" oder \"K\u00FCnstliche <br>"
- + "Intelligenz\" lauten und referenzieren dabei auf das allgemeine Image <br>"
- + "\"Programmieren\".</html>");
- 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<String> 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<TableModel> rowSorterAll = new TableRowSorter<TableModel>(
- modelAll);
- final TableRowSorter<TableModel> rowSorterMyImages = new TableRowSorter<TableModel>(
- 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(
- "<html><u>Erweiterte Suche</u></html>");
- 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<String>();
- try {
- // Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server
- List<String> 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<server.Image> images;
- try {
- // Hole eine Liste der Images
-
- images = client.getImageList();
- Iterator<server.Image> 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("<html><b>Windows: </b></html>");
- 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("<html><b>Linux: </b></html>");
- lbllinuxvmwarePlayer.setBounds(10, 178, 499, 14);
- contentPanel.add(lbllinuxvmwarePlayer);
-
- JLabel lblvmwarePlayerDownload = new JLabel("<html><a href=\"https:////my.vmware.com//web//vmware//free#desktop_end_user_computing//vmware_player//6_0\" >vmWare Player Download</a></html>");
- lblvmwarePlayerDownload.setBounds(10, 118, 499, 14);
- contentPanel.add(lblvmwarePlayerDownload);
-
- JLabel lblvmwarePlayerDownload_1 = new JLabel("<html><a href=\"https:////my.vmware.com//web//vmware//free#desktop_end_user_computing//vmware_player//6_0\" >vmWare Player Download</a></html>");
- 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);
- }
- }
- }
-
-
-
- }
-}