summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/GUI
diff options
context:
space:
mode:
authortspitzer2013-09-17 15:38:08 +0200
committertspitzer2013-09-17 15:38:08 +0200
commit205f059ec5df1a24daa87f8563d2bbb99344ecf9 (patch)
tree4f37a93f4224a5f37adb6e6477e65ce9e983febe /Dozentenmodul/src/GUI
parentneue Version (diff)
downloadtutor-module-205f059ec5df1a24daa87f8563d2bbb99344ecf9.tar.gz
tutor-module-205f059ec5df1a24daa87f8563d2bbb99344ecf9.tar.xz
tutor-module-205f059ec5df1a24daa87f8563d2bbb99344ecf9.zip
g
Diffstat (limited to 'Dozentenmodul/src/GUI')
-rw-r--r--Dozentenmodul/src/GUI/AddOS.java145
-rw-r--r--Dozentenmodul/src/GUI/AddSoftware.java145
-rw-r--r--Dozentenmodul/src/GUI/EingabeAllgemein.java345
-rw-r--r--Dozentenmodul/src/GUI/EingabeSoftwareDaten.java298
-rw-r--r--Dozentenmodul/src/GUI/EingabeSystemDaten.java280
-rw-r--r--Dozentenmodul/src/GUI/FTPDownloader.java161
-rw-r--r--Dozentenmodul/src/GUI/FTPUploader.java180
-rw-r--r--Dozentenmodul/src/GUI/FertigStellen.java154
-rw-r--r--Dozentenmodul/src/GUI/LoginWindow.java3
-rw-r--r--Dozentenmodul/src/GUI/getVMwarePlayer.java156
-rw-r--r--Dozentenmodul/src/GUI/searchRohling.java201
11 files changed, 2067 insertions, 1 deletions
diff --git a/Dozentenmodul/src/GUI/AddOS.java b/Dozentenmodul/src/GUI/AddOS.java
new file mode 100644
index 00000000..5039a4e1
--- /dev/null
+++ b/Dozentenmodul/src/GUI/AddOS.java
@@ -0,0 +1,145 @@
+package GUI;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import sql.sql;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.border.EmptyBorder;
+import javax.swing.JLabel;
+import java.awt.Font;
+import javax.swing.JTextField;
+import javax.swing.JComboBox;
+import javax.swing.JCheckBox;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import java.sql.Connection;
+import javax.swing.DefaultComboBoxModel;
+
+@SuppressWarnings("serial")
+public class AddOS extends JDialog {
+
+ private final JPanel contentPanel = new JPanel();
+ private JTextField textField;
+ private JTextField textField_1;
+ private JTextField textField_2;
+ @SuppressWarnings("rawtypes")
+ JComboBox comboBox;
+ JCheckBox checkBox;
+ sql sql=new sql();
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ AddOS dialog = new AddOS();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public AddOS() {
+ setTitle("Dozentenmodul");
+ setBounds(100, 100, 288, 300);
+ getContentPane().setLayout(new BorderLayout());
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel, BorderLayout.CENTER);
+ contentPanel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Betriebssystem hinzuf\u00FCgen");
+ lblNewLabel.setFont(new Font("Dialog", Font.PLAIN, 14));
+ lblNewLabel.setBounds(10, 11, 194, 25);
+ contentPanel.add(lblNewLabel);
+ }
+ {
+ JLabel lblHersteller = new JLabel("Hersteller:");
+ lblHersteller.setBounds(10, 47, 100, 20);
+ contentPanel.add(lblHersteller);
+ }
+ {
+ textField = new JTextField();
+ textField.setBounds(120, 47, 125, 20);
+ contentPanel.add(textField);
+ textField.setColumns(10);
+ }
+ {
+ JLabel lblNewLabel_1 = new JLabel("Name:");
+ lblNewLabel_1.setBounds(10, 78, 100, 20);
+ contentPanel.add(lblNewLabel_1);
+ }
+ {
+ textField_1 = new JTextField();
+ textField_1.setColumns(10);
+ textField_1.setBounds(120, 78, 125, 20);
+ contentPanel.add(textField_1);
+ }
+ {
+ JLabel lblVersion = new JLabel("Version:");
+ lblVersion.setBounds(10, 109, 100, 20);
+ contentPanel.add(lblVersion);
+ }
+ {
+ textField_2 = new JTextField();
+ textField_2.setColumns(10);
+ textField_2.setBounds(120, 109, 125, 20);
+ contentPanel.add(textField_2);
+ }
+ {
+ JLabel lblArchitektur = new JLabel("Architektur:");
+ lblArchitektur.setBounds(10, 140, 100, 20);
+ contentPanel.add(lblArchitektur);
+ }
+
+ comboBox = new JComboBox();
+ comboBox.setModel(new DefaultComboBoxModel(new String[] {"32-bit", "64-bit"}));
+ comboBox.setBounds(120, 140, 125, 20);
+ contentPanel.add(comboBox);
+
+ JLabel lblLizenzpflichtig = new JLabel("Lizenzpflichtig:");
+ lblLizenzpflichtig.setBounds(10, 171, 100, 20);
+ contentPanel.add(lblLizenzpflichtig);
+
+ checkBox = new JCheckBox("");
+ checkBox.setBounds(120, 167, 97, 23);
+ contentPanel.add(checkBox);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ getContentPane().add(buttonPane, BorderLayout.SOUTH);
+ {
+ JButton okButton = new JButton("OK");
+ okButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ int Kosten=0;
+ if(checkBox.isSelected()==true)
+ {
+ Kosten=1;
+ }
+ Connection con=sql.getConnection();
+ sql.AddOS(con, textField_1.getText().toString(), textField_2.getText().toString(), comboBox.getSelectedItem().toString(), Kosten, textField.getText().toString());
+ }
+ });
+ okButton.setActionCommand("OK");
+ buttonPane.add(okButton);
+ getRootPane().setDefaultButton(okButton);
+ }
+ {
+ JButton cancelButton = new JButton("Zur\u00FCck");
+ cancelButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ dispose();
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+ }
+}
diff --git a/Dozentenmodul/src/GUI/AddSoftware.java b/Dozentenmodul/src/GUI/AddSoftware.java
new file mode 100644
index 00000000..c3a41227
--- /dev/null
+++ b/Dozentenmodul/src/GUI/AddSoftware.java
@@ -0,0 +1,145 @@
+package GUI;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import sql.sql;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.border.EmptyBorder;
+import javax.swing.JLabel;
+import java.awt.Font;
+import javax.swing.JTextField;
+import javax.swing.JComboBox;
+import javax.swing.JCheckBox;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import java.sql.Connection;
+import javax.swing.DefaultComboBoxModel;
+
+@SuppressWarnings("serial")
+public class AddSoftware extends JDialog {
+
+ private final JPanel contentPanel = new JPanel();
+ private JTextField textField;
+ private JTextField textField_1;
+ private JTextField textField_2;
+ @SuppressWarnings("rawtypes")
+ JComboBox comboBox;
+ JCheckBox checkBox;
+ sql sql=new sql();
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ AddSoftware dialog = new AddSoftware();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public AddSoftware() {
+ setTitle("Dozentenmodul");
+ setBounds(100, 100, 288, 300);
+ getContentPane().setLayout(new BorderLayout());
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel, BorderLayout.CENTER);
+ contentPanel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Software hinzuf\u00FCgen");
+ lblNewLabel.setFont(new Font("Dialog", Font.PLAIN, 14));
+ lblNewLabel.setBounds(10, 11, 194, 25);
+ contentPanel.add(lblNewLabel);
+ }
+ {
+ JLabel lblHersteller = new JLabel("Hersteller:");
+ lblHersteller.setBounds(10, 47, 100, 20);
+ contentPanel.add(lblHersteller);
+ }
+ {
+ textField = new JTextField();
+ textField.setBounds(120, 47, 125, 20);
+ contentPanel.add(textField);
+ textField.setColumns(10);
+ }
+ {
+ JLabel lblNewLabel_1 = new JLabel("Name:");
+ lblNewLabel_1.setBounds(10, 78, 100, 20);
+ contentPanel.add(lblNewLabel_1);
+ }
+ {
+ textField_1 = new JTextField();
+ textField_1.setColumns(10);
+ textField_1.setBounds(120, 78, 125, 20);
+ contentPanel.add(textField_1);
+ }
+ {
+ JLabel lblVersion = new JLabel("Version:");
+ lblVersion.setBounds(10, 109, 100, 20);
+ contentPanel.add(lblVersion);
+ }
+ {
+ textField_2 = new JTextField();
+ textField_2.setColumns(10);
+ textField_2.setBounds(120, 109, 125, 20);
+ contentPanel.add(textField_2);
+ }
+ {
+ JLabel lblArchitektur = new JLabel("Architektur:");
+ lblArchitektur.setBounds(10, 140, 100, 20);
+ contentPanel.add(lblArchitektur);
+ }
+
+ comboBox = new JComboBox();
+ comboBox.setModel(new DefaultComboBoxModel(new String[] {"32-bit", "64-bit"}));
+ comboBox.setBounds(120, 140, 125, 20);
+ contentPanel.add(comboBox);
+
+ JLabel lblLizenzpflichtig = new JLabel("Lizenzpflichtig:");
+ lblLizenzpflichtig.setBounds(10, 171, 100, 20);
+ contentPanel.add(lblLizenzpflichtig);
+
+ checkBox = new JCheckBox("");
+ checkBox.setBounds(120, 167, 97, 23);
+ contentPanel.add(checkBox);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ getContentPane().add(buttonPane, BorderLayout.SOUTH);
+ {
+ JButton okButton = new JButton("OK");
+ okButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ int Kosten=0;
+ if(checkBox.isSelected()==true)
+ {
+ Kosten=1;
+ }
+ Connection con=sql.getConnection();
+ sql.AddSoftware(con, textField_1.getText().toString(), textField_2.getText().toString(), comboBox.getSelectedItem().toString(), Kosten, textField.getText().toString());
+ }
+ });
+ okButton.setActionCommand("OK");
+ buttonPane.add(okButton);
+ getRootPane().setDefaultButton(okButton);
+ }
+ {
+ JButton cancelButton = new JButton("Zur\u00FCck");
+ cancelButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ dispose();
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+ }
+}
diff --git a/Dozentenmodul/src/GUI/EingabeAllgemein.java b/Dozentenmodul/src/GUI/EingabeAllgemein.java
new file mode 100644
index 00000000..b28147b7
--- /dev/null
+++ b/Dozentenmodul/src/GUI/EingabeAllgemein.java
@@ -0,0 +1,345 @@
+package GUI;
+
+
+import java.awt.FlowLayout;
+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 javax.swing.JTextField;
+
+import ftp.ftp;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import javax.swing.JCheckBox;
+import javax.swing.JSeparator;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.ChangeEvent;
+import javax.swing.JMenuBar;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+
+import Models.person;
+
+@SuppressWarnings("serial")
+public class EingabeAllgemein extends JDialog {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ ftp f=new ftp();
+ private JTextField Vorname_V;
+ private JTextField Nachname_V;
+ private JTextField Hochschule_V;
+ private JTextField EMail_V;
+ private JTextField Tel_V;
+ private JTextField Fak_V;
+ private JTextField Vorname_E;
+ private JTextField Nachname_E;
+ private JTextField Hochschule_E;
+ private JTextField EMail_E;
+ private JTextField Tel_E;
+ private JTextField Fak_E;
+ JCheckBox chckbxDerVerantwortlicheEntspricht;
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ EingabeAllgemein dialog = new EingabeAllgemein();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public EingabeAllgemein() {
+
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setTitle("Dozentenmodul");
+ setBounds(100, 100, 545, 689);
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBounds(0, 0, 529, 68);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Eingabe der allgemeinen Daten (Schritt 3 von 6)");
+ 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("Geben Sie hier bitte die Kontaktdaten des Vernatwortlichen und des Erstellers der VMDK ein");
+ txtpnBitteWhlenSie.setBounds(10, 36, 509, 42);
+ panel.add(txtpnBitteWhlenSie);
+ }
+ contentPanel.setBounds(10, 91, 509, 483);
+ contentPanel.setBackground(Color.WHITE);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ JLabel lblNewLabel_1 = new JLabel("Allgemeine Informationen zum Verantwortlichen");
+ lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 14));
+ lblNewLabel_1.setBounds(10, 0, 338, 25);
+ contentPanel.add(lblNewLabel_1);
+
+ JLabel lblNewLabel_2 = new JLabel("Vorname: *");
+ lblNewLabel_2.setBounds(10, 36, 125, 20);
+ contentPanel.add(lblNewLabel_2);
+
+ Vorname_V = new JTextField();
+ Vorname_V.setBounds(145, 36, 125, 20);
+ Vorname_V.setText(person.verantowrtlicher.getVorname());
+ contentPanel.add(Vorname_V);
+ Vorname_V.setColumns(10);
+
+ JLabel lblNachname = new JLabel("Nachname: *");
+ lblNachname.setBounds(10, 67, 125, 20);
+ contentPanel.add(lblNachname);
+
+ Nachname_V = new JTextField();
+ Nachname_V.setBounds(145, 67, 125, 20);
+ Nachname_V.setText(person.verantowrtlicher.getName());
+ contentPanel.add(Nachname_V);
+ Nachname_V.setColumns(10);
+
+ JLabel lblHochschule = new JLabel("Hochschule: *");
+ lblHochschule.setBounds(10, 98, 125, 20);
+ contentPanel.add(lblHochschule);
+
+ Hochschule_V = new JTextField();
+ Hochschule_V.setColumns(10);
+ Hochschule_V.setBounds(145, 98, 125, 20);
+ Hochschule_V.setText(person.verantowrtlicher.getHochschule());
+ contentPanel.add(Hochschule_V);
+
+ JLabel lblEmail = new JLabel("E-Mail: *");
+ lblEmail.setBounds(10, 129, 125, 20);
+ contentPanel.add(lblEmail);
+
+ EMail_V = new JTextField();
+ EMail_V.setColumns(10);
+ EMail_V.setBounds(145, 129, 125, 20);
+ EMail_V.setText(person.verantowrtlicher.getEMail());
+ contentPanel.add(EMail_V);
+
+ JLabel lblTelnummer = new JLabel("Tel.-Nummer:");
+ lblTelnummer.setBounds(10, 160, 125, 20);
+ contentPanel.add(lblTelnummer);
+
+ Tel_V = new JTextField();
+ Tel_V.setColumns(10);
+ Tel_V.setBounds(145, 160, 125, 20);
+ Tel_V.setText(person.verantowrtlicher.getTel());
+ contentPanel.add(Tel_V);
+
+ JLabel lblFakultt = new JLabel("Fakult\u00E4t:");
+ lblFakultt.setBounds(10, 191, 125, 20);
+ contentPanel.add(lblFakultt);
+
+ Fak_V = new JTextField();
+ Fak_V.setColumns(10);
+ Fak_V.setBounds(145, 191, 125, 20);
+ Fak_V.setText(person.verantowrtlicher.getFakultät());
+ contentPanel.add(Fak_V);
+
+ chckbxDerVerantwortlicheEntspricht = new JCheckBox("Der Verantwortliche entspricht dem Ersteller");
+ chckbxDerVerantwortlicheEntspricht.setSelected(person.verantowrtlicher.isIschecked());
+ chckbxDerVerantwortlicheEntspricht.addChangeListener(new ChangeListener() {
+ public void stateChanged(ChangeEvent arg0) {
+ if(chckbxDerVerantwortlicheEntspricht.isSelected()==true){
+ Nachname_E.setText(Nachname_V.getText());
+ Vorname_E.setText(Vorname_V.getText());
+ Hochschule_E.setText(Hochschule_V.getText());
+ EMail_E.setText(EMail_V.getText());
+ Tel_E.setText(Tel_V.getText());
+ Fak_E.setText(Fak_V.getText());
+ }else{
+ Nachname_E.setText("");
+ Vorname_E.setText("");
+ Hochschule_E.setText("");
+ EMail_E.setText("");
+ Tel_E.setText("");
+ Fak_E.setText("");
+ }
+ }
+ });
+ chckbxDerVerantwortlicheEntspricht.setBackground(Color.WHITE);
+ chckbxDerVerantwortlicheEntspricht.setBounds(6, 228, 264, 23);
+ contentPanel.add(chckbxDerVerantwortlicheEntspricht);
+
+ JLabel lblAllgemeineInformationenZum = new JLabel("Allgemeine Informationen zum Ersteller");
+ lblAllgemeineInformationenZum.setFont(new Font("Tahoma", Font.PLAIN, 14));
+ lblAllgemeineInformationenZum.setBounds(10, 258, 338, 25);
+ contentPanel.add(lblAllgemeineInformationenZum);
+
+ JLabel label_1 = new JLabel("Vorname: *");
+ label_1.setBounds(10, 294, 125, 20);
+ contentPanel.add(label_1);
+
+ Vorname_E = new JTextField();
+ Vorname_E.setColumns(10);
+ Vorname_E.setBounds(145, 294, 125, 20);
+ Vorname_E.setText(person.ersteller.getVorname());
+ contentPanel.add(Vorname_E);
+
+ JLabel label_2 = new JLabel("Nachname: *");
+ label_2.setBounds(10, 325, 125, 20);
+ contentPanel.add(label_2);
+
+ Nachname_E = new JTextField();
+ Nachname_E.setColumns(10);
+ Nachname_E.setBounds(145, 325, 125, 20);
+ Nachname_E.setText(person.ersteller.getName());
+ contentPanel.add(Nachname_E);
+
+ Hochschule_E = new JTextField();
+ Hochschule_E.setColumns(10);
+ Hochschule_E.setBounds(145, 356, 125, 20);
+ Hochschule_E.setText(person.ersteller.getHochschule());
+ contentPanel.add(Hochschule_E);
+
+ JLabel label_3 = new JLabel("Hochschule: *");
+ label_3.setBounds(10, 356, 125, 20);
+ contentPanel.add(label_3);
+
+ JLabel label_4 = new JLabel("E-Mail: *");
+ label_4.setBounds(10, 387, 125, 20);
+ contentPanel.add(label_4);
+
+ EMail_E = new JTextField();
+ EMail_E.setColumns(10);
+ EMail_E.setBounds(145, 387, 125, 20);
+ EMail_E.setText(person.ersteller.getEMail());
+ contentPanel.add(EMail_E);
+
+ Tel_E = new JTextField();
+ Tel_E.setColumns(10);
+ Tel_E.setBounds(145, 418, 125, 20);
+ Tel_E.setText(person.ersteller.getTel());
+ contentPanel.add(Tel_E);
+
+ JLabel label_5 = new JLabel("Tel.-Nummer:");
+ label_5.setBounds(10, 418, 125, 20);
+ contentPanel.add(label_5);
+
+ JLabel label_6 = new JLabel("Fakult\u00E4t:");
+ label_6.setBounds(10, 449, 125, 20);
+ contentPanel.add(label_6);
+
+ Fak_E = new JTextField();
+ Fak_E.setColumns(10);
+ Fak_E.setText(person.ersteller.getFakultät());
+ Fak_E.setBounds(145, 449, 125, 20);
+ contentPanel.add(Fak_E);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 597, 529, 33);
+ buttonPane.setBackground(SystemColor.menu);
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ getContentPane().add(buttonPane);
+ {
+ JButton okButton = new JButton("Zur\u00FCck");
+ okButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ person.verantowrtlicher.setVorname(Vorname_V.getText());
+ person.verantowrtlicher.setName(Nachname_V.getText());
+ person.verantowrtlicher.setEMail(EMail_V.getText());
+ person.verantowrtlicher.setFakultät(Fak_V.getText());
+ person.verantowrtlicher.setHochschule(Hochschule_V.getText());
+ person.verantowrtlicher.setTel(Tel_V.getText());
+ person.verantowrtlicher.setIschecked(chckbxDerVerantwortlicheEntspricht.isSelected());
+ person.ersteller.setEMail(EMail_E.getText());
+ person.ersteller.setFakultät(Fak_E.getText());
+ person.ersteller.setHochschule(Hochschule_E.getText());
+ person.ersteller.setName(Nachname_E.getText());
+ person.ersteller.setVorname(Vorname_V.getText());
+ person.ersteller.setTel(Tel_E.getText());
+ getVMwarePlayer sr=new getVMwarePlayer();
+ 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) {
+ person.verantowrtlicher.setVorname(Vorname_V.getText());
+ person.verantowrtlicher.setName(Nachname_V.getText());
+ person.verantowrtlicher.setEMail(EMail_V.getText());
+ person.verantowrtlicher.setFakultät(Fak_V.getText());
+ person.verantowrtlicher.setHochschule(Hochschule_V.getText());
+ person.verantowrtlicher.setTel(Tel_V.getText());
+ person.verantowrtlicher.setIschecked(chckbxDerVerantwortlicheEntspricht.isSelected());
+ person.ersteller.setEMail(EMail_E.getText());
+ person.ersteller.setFakultät(Fak_E.getText());
+ person.ersteller.setHochschule(Hochschule_E.getText());
+ person.ersteller.setName(Nachname_E.getText());
+ person.ersteller.setVorname(Vorname_V.getText());
+ person.ersteller.setTel(Tel_E.getText());
+ EingabeSystemDaten ea=new EingabeSystemDaten();
+ ea.setVisible(true);
+ dispose();
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 79, 529, 2);
+ getContentPane().add(separator);
+
+ JSeparator separator_1 = new JSeparator();
+ separator_1.setBounds(0, 585, 529, 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/EingabeSoftwareDaten.java b/Dozentenmodul/src/GUI/EingabeSoftwareDaten.java
new file mode 100644
index 00000000..f99fd88e
--- /dev/null
+++ b/Dozentenmodul/src/GUI/EingabeSoftwareDaten.java
@@ -0,0 +1,298 @@
+package GUI;
+
+import java.awt.FlowLayout;
+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 javax.swing.JTextField;
+import sql.sql;
+import ftp.ftp;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Arrays;
+import javax.swing.JSeparator;
+import java.awt.List;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import javax.swing.plaf.basic.BasicArrowButton;
+import javax.swing.JMenuBar;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import Models.vm;
+
+
+@SuppressWarnings("serial")
+public class EingabeSoftwareDaten extends JDialog {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ ftp f=new ftp();
+ sql sql=new sql();
+ private JTextField textField;
+ List listavailable;
+ List listchoosed;
+
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ EingabeSoftwareDaten dialog = new EingabeSoftwareDaten();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ @SuppressWarnings({ })
+ public EingabeSoftwareDaten() {
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setTitle("Dozentenmodul");
+ setBounds(100, 100, 603, 722);
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBounds(0, 0, 529, 71);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Eingabe der installierten Software (Schritt 5 von 6)");
+ 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 geben Sie nun die in Ihrem System installierte Software an.");
+ txtpnBitteWhlenSie.setBounds(10, 36, 509, 42);
+ panel.add(txtpnBitteWhlenSie);
+ }
+ contentPanel.setBounds(10, 95, 567, 512);
+ contentPanel.setBackground(Color.WHITE);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ JLabel lblSysteminformationen = new JLabel("Verf\u00FCgbare Software");
+ lblSysteminformationen.setFont(new Font("Tahoma", Font.PLAIN, 14));
+ lblSysteminformationen.setBounds(10, 11, 162, 14);
+ contentPanel.add(lblSysteminformationen);
+
+
+ JLabel lblAusgewhlteSoftware = new JLabel("Ausgew\u00E4hlte Software");
+ lblAusgewhlteSoftware.setFont(new Font("Tahoma", Font.PLAIN, 14));
+ lblAusgewhlteSoftware.setBounds(306, 11, 162, 14);
+ contentPanel.add(lblAusgewhlteSoftware);
+
+
+
+ textField = new JTextField();
+ textField.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyReleased(KeyEvent e) {
+
+
+ Connection con=sql.getConnection();
+ ResultSet rs=sql.getSoftwareByName(con, textField.getText().toString());
+ listavailable.removeAll();
+ try {
+ while(rs.next())
+ {
+ listavailable.add(rs.getString("SW"));
+ }
+ } catch (SQLException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+
+ }
+ });
+
+ textField.setBounds(10, 36, 244, 20);
+ contentPanel.add(textField);
+ textField.setColumns(10);
+
+ JButton btnSoftwareHinzufgen = new JButton("Software hinzuf\u00FCgen");
+ btnSoftwareHinzufgen.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ AddSoftware as=new AddSoftware();
+ as.setVisible(true);
+ }
+ });
+ btnSoftwareHinzufgen.setBounds(10, 483, 162, 23);
+ contentPanel.add(btnSoftwareHinzufgen);
+
+ listavailable = new List();
+ Connection con=sql.getConnection();
+ ResultSet he=sql.getAllHersteller(con);
+
+ try {
+ while(he.next())
+ {
+
+ ResultSet sw=sql.getAllSoftware(con, he.getString("Name"));
+
+ while(sw.next())
+ {
+
+ listavailable.add(he.getString("Name")+" "+sw.getString("Produktname")+" "+sw.getString("Version")+" "+sw.getString("Architektur"));
+ }
+ }
+ } catch (SQLException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ listavailable.setMultipleMode(true);
+ listavailable.setBounds(10, 62, 244, 415);
+ contentPanel.add(listavailable);
+
+ listchoosed = new List();
+ if(vm.vl.getSoftware()!=null)
+ {
+ for(int i=0;i<vm.vl.getSoftware().getItemCount();i++){
+ listchoosed.add(vm.vl.getSoftware().getItem(i));
+ listavailable.remove(vm.vl.getSoftware().getItem(i));
+ }
+ }
+
+ listchoosed.setMultipleMode(true);
+ listchoosed.setBounds(306, 62, 244, 415);
+ contentPanel.add(listchoosed);
+
+ JButton btnNewButton = new BasicArrowButton(BasicArrowButton.EAST);
+ btnNewButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ String[] items=new String[listavailable.getItemCount()];
+ items=listavailable.getSelectedItems();
+ for(int i=0;i<items.length;i++)
+ {
+ listchoosed.add(items[i]);
+
+ listavailable.remove(items[i]);
+ }
+
+ String[] sort=listchoosed.getItems();
+ Arrays.sort(sort);
+ listchoosed.removeAll();
+
+ for(int i=0;i<sort.length;i++)
+ {
+ listchoosed.add(sort[i]);
+ }
+
+
+ }
+ });
+ btnNewButton.setBounds(260, 223, 40, 40);
+ contentPanel.add(btnNewButton);
+
+ JButton btnNewButton_1 = new BasicArrowButton(BasicArrowButton.WEST);
+ btnNewButton_1.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ String[] items=new String[listchoosed.getItemCount()];
+ items=listchoosed.getSelectedItems();
+ for(int i=0;i<items.length;i++)
+ {
+ listavailable.add(items[i]);
+ listchoosed.remove(items[i]);
+ }
+ String[] sort=listavailable.getItems();
+ Arrays.sort(sort);
+ listavailable.removeAll();
+
+ for(int i=0;i<sort.length;i++)
+ {
+ listavailable.add(sort[i]);
+ }
+ }
+ });
+ btnNewButton_1.setBounds(260, 274, 40, 40);
+ contentPanel.add(btnNewButton_1);
+
+
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 631, 587, 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) {
+ vm.vl.setSoftware(listchoosed);
+ EingabeSystemDaten eas=new EingabeSystemDaten();
+ eas.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 arg0) {
+ vm.vl.setSoftware(listchoosed);
+ FertigStellen fs=new FertigStellen();
+ fs.setVisible(true);
+ dispose();
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 618, 616, 2);
+ getContentPane().add(separator);
+
+ JSeparator separator_1 = new JSeparator();
+ separator_1.setBounds(0, 82, 529, 2);
+ getContentPane().add(separator_1);
+
+ JMenuBar menuBar = new JMenuBar();
+ setJMenuBar(menuBar);
+
+ JMenu mnSuchen = new JMenu("Suchen");
+ menuBar.add(mnSuchen);
+
+ JMenuItem mntmVlSuche = new JMenuItem("VL Suche");
+ mnSuchen.add(mntmVlSuche);
+
+ JMenu mnHilfe = new JMenu("Hilfe");
+ menuBar.add(mnHilfe);
+
+ JMenuItem mntmFaq = new JMenuItem("FAQ");
+ mnHilfe.add(mntmFaq);
+
+ JMenuItem mntmOtrs = new JMenuItem("OTRS");
+ mnHilfe.add(mntmOtrs);
+
+ }
+}
diff --git a/Dozentenmodul/src/GUI/EingabeSystemDaten.java b/Dozentenmodul/src/GUI/EingabeSystemDaten.java
new file mode 100644
index 00000000..bbbfa98a
--- /dev/null
+++ b/Dozentenmodul/src/GUI/EingabeSystemDaten.java
@@ -0,0 +1,280 @@
+package GUI;
+
+import java.awt.FlowLayout;
+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 javax.swing.JTextField;
+import sql.sql;
+import ftp.ftp;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import javax.swing.JSeparator;
+import javax.swing.JTextArea;
+import java.awt.Choice;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import Models.vm;
+
+import com.toedter.calendar.JDateChooser;
+import javax.swing.JMenuBar;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+
+@SuppressWarnings("serial")
+public class EingabeSystemDaten extends JDialog {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ ftp f=new ftp();
+ sql sql=new sql();
+ private JTextField Laborname;
+ JDateChooser dateChooser;
+ JTextArea textArea_2;
+ JDateChooser dateChooser_1;
+ JTextArea textArea_1;
+ Choice choiceOS;
+ JTextArea textArea;
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ EingabeSystemDaten dialog = new EingabeSystemDaten();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public EingabeSystemDaten() {
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setTitle("Dozentenmodul");
+ setBounds(100, 100, 583, 648);
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBounds(0, 0, 567, 71);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Eingabe der systembezogenen Daten (Schritt 4 von 5)");
+ 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 geben Sie nun die notwendigen Daten Ihres Systems ein.");
+ txtpnBitteWhlenSie.setBounds(10, 36, 509, 42);
+ panel.add(txtpnBitteWhlenSie);
+ }
+ contentPanel.setBounds(10, 95, 547, 441);
+ contentPanel.setBackground(Color.WHITE);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ JLabel lblSysteminformationen = new JLabel("Systeminformationen");
+ lblSysteminformationen.setFont(new Font("Tahoma", Font.PLAIN, 14));
+ lblSysteminformationen.setBounds(10, 11, 162, 14);
+ contentPanel.add(lblSysteminformationen);
+
+ JLabel lblLabornameanzeigename = new JLabel("Laborname (Anzeigename): *");
+ lblLabornameanzeigename.setBounds(10, 36, 150, 20);
+ contentPanel.add(lblLabornameanzeigename);
+
+ Laborname = new JTextField();
+ Laborname.setText(vm.vl.getLaborname());
+ Laborname.setBounds(170, 36, 150, 20);
+ contentPanel.add(Laborname);
+ Laborname.setColumns(10);
+
+ JLabel lblKurzbeschreibung = new JLabel("Kurzbeschreibung: *");
+ lblKurzbeschreibung.setBounds(10, 67, 150, 20);
+ contentPanel.add(lblKurzbeschreibung);
+
+ textArea = new JTextArea();
+ textArea.setBorder(UIManager.getBorder("TextField.border"));
+ textArea.setText(vm.vl.getShortDesc());
+ textArea.setBounds(170, 67, 274, 63);
+ contentPanel.add(textArea);
+
+ JLabel lblLangbeschreibung = new JLabel("Langbeschreibung: *");
+ lblLangbeschreibung.setBounds(10, 139, 150, 20);
+ contentPanel.add(lblLangbeschreibung);
+
+ textArea_1 = new JTextArea();
+ textArea_1.setBorder(UIManager.getBorder("TextField.border"));
+ textArea_1.setText(vm.vl.getLongDesc());
+ textArea_1.setBounds(170, 141, 274, 152);
+ contentPanel.add(textArea_1);
+
+ JLabel lblKommentar = new JLabel("Kommentar:");
+ lblKommentar.setBounds(10, 308, 150, 20);
+ contentPanel.add(lblKommentar);
+
+ textArea_2 = new JTextArea();
+ textArea_2.setBorder(UIManager.getBorder("TextField.border"));
+ textArea_2.setText(vm.vl.getComment());
+ textArea_2.setBounds(170, 304, 274, 63);
+ contentPanel.add(textArea_2);
+
+ JLabel lblBetriebssystem = new JLabel("Betriebssystem: *");
+ lblBetriebssystem.setBounds(10, 373, 150, 20);
+ contentPanel.add(lblBetriebssystem);
+
+ choiceOS = new Choice();
+
+ choiceOS.setBounds(170, 373, 150, 20);
+
+ Connection con=sql.getConnection();
+ ResultSet rs=sql.getAllOS(con);
+
+ try {
+ while(rs.next())
+ {
+ choiceOS.addItem(rs.getString("Produktname")+" "+rs.getString("Version")+" "+rs.getString("Architektur"));
+ }
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ choiceOS.select(vm.vl.getOS());
+
+ contentPanel.add(choiceOS);
+
+ JLabel lblGltigkeitsdatumVon = new JLabel("G\u00FCltigkeitsdatum: *");
+ lblGltigkeitsdatumVon.setBounds(10, 404, 150, 20);
+ contentPanel.add(lblGltigkeitsdatumVon);
+
+ JLabel lblVon = new JLabel("von");
+ lblVon.setBounds(170, 407, 24, 14);
+ contentPanel.add(lblVon);
+
+ dateChooser = new JDateChooser();
+ dateChooser.setDateFormatString("dd.MM.yyyy hh:mm:ss");
+ dateChooser.setDate(vm.vl.getBegin());
+ dateChooser.setBounds(204, 404, 140, 20);
+ contentPanel.add(dateChooser);
+
+ JLabel lblNewLabel_1 = new JLabel("bis");
+ lblNewLabel_1.setBounds(354, 407, 24, 14);
+ contentPanel.add(lblNewLabel_1);
+
+ dateChooser_1 = new JDateChooser();
+ dateChooser_1.setDateFormatString("dd.MM.yyyy hh:mm:ss");
+ dateChooser_1.setDate(vm.vl.getEnd());
+ dateChooser_1.setBounds(388, 404, 140, 20);
+ contentPanel.add(dateChooser_1);
+
+ JButton btnHinzufgen = new JButton("Hinzuf\u00FCgen");
+ btnHinzufgen.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ AddOS os=new AddOS();
+ os.setVisible(true);
+ }
+ });
+ btnHinzufgen.setBounds(326, 372, 118, 23);
+ contentPanel.add(btnHinzufgen);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 554, 567, 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 arg0) {
+ vm.vl.setBegin(dateChooser.getDate());
+ vm.vl.setComment(textArea_2.getText());
+ vm.vl.setEnd(dateChooser_1.getDate());
+ vm.vl.setLaborname(Laborname.getText());
+ vm.vl.setLongDesc(textArea_1.getText());
+ vm.vl.setOS(choiceOS.getSelectedItem());
+ vm.vl.setShortDesc(textArea.getText());
+ EingabeAllgemein ea= new EingabeAllgemein();
+ ea.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 arg0) {
+ vm.vl.setBegin(dateChooser.getDate());
+ vm.vl.setComment(textArea_2.getText());
+ vm.vl.setEnd(dateChooser_1.getDate());
+ vm.vl.setLaborname(Laborname.getText());
+ vm.vl.setLongDesc(textArea_1.getText());
+ vm.vl.setOS(choiceOS.getSelectedItem());
+ vm.vl.setShortDesc(textArea.getText());
+
+ EingabeSoftwareDaten ea=new EingabeSoftwareDaten();
+ ea.setVisible(true);
+ dispose();
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 547, 567, 2);
+ getContentPane().add(separator);
+
+ JSeparator separator_1 = new JSeparator();
+ separator_1.setBounds(0, 82, 529, 2);
+ getContentPane().add(separator_1);
+
+ JMenuBar menuBar = new JMenuBar();
+ setJMenuBar(menuBar);
+
+ JMenu mnSuchen = new JMenu("Suchen");
+ menuBar.add(mnSuchen);
+
+ JMenuItem mntmVlSuche = new JMenuItem("VL Suche");
+ mnSuchen.add(mntmVlSuche);
+
+ JMenu mnHilfe = new JMenu("Hilfe");
+ menuBar.add(mnHilfe);
+
+ JMenuItem mntmFaq = new JMenuItem("FAQ");
+ mnHilfe.add(mntmFaq);
+
+ JMenuItem mntmOtrs = new JMenuItem("OTRS");
+ mnHilfe.add(mntmOtrs);
+
+
+
+
+ }
+}
diff --git a/Dozentenmodul/src/GUI/FTPDownloader.java b/Dozentenmodul/src/GUI/FTPDownloader.java
new file mode 100644
index 00000000..b936a966
--- /dev/null
+++ b/Dozentenmodul/src/GUI/FTPDownloader.java
@@ -0,0 +1,161 @@
+package GUI;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.FlowLayout;
+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 downloader.DownloadTask;
+
+import ftp.ftp;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+@SuppressWarnings("serial")
+public class FTPDownloader extends JFrame implements PropertyChangeListener {
+
+ @SuppressWarnings("unused")
+ private JPanel contentPane;
+ private final JPanel contentPanel = new JPanel();
+ JLabel lblNewLabel;
+ JProgressBar progressBar;
+ ftp f=new ftp();
+ String host="openslx-nfs.rz.hs-offenburg.de";
+ int port=21;
+ String username="tspitzer";
+ String password="21071989";
+ String downloadPath="_vorlagen/";
+ String filename="";
+ static String arg="";
+ /**
+ * 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(String name) {
+ //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+
+ filename=name;
+
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ //filename=name;
+ setBackground(Color.WHITE);
+ setTitle("Downloader");
+ setBounds(100, 100, 450, 218);
+ getContentPane().setLayout(new BorderLayout());
+ contentPanel.setBackground(Color.WHITE);
+ 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(10, 11, 141, 23);
+ btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP);
+ btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT);
+ contentPanel.add(btnSpeicherortAuswhlen);
+ }
+
+ lblNewLabel = new JLabel("C:\\");
+ lblNewLabel.setBounds(169, 11, 255, 23);
+ contentPanel.add(lblNewLabel);
+
+ JButton btnDownloadStarten = new JButton("Download starten");
+ btnDownloadStarten.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ buttonDownloadActionPerformed(arg0);
+ }
+ });
+
+ btnDownloadStarten.setBounds(10, 106, 141, 23);
+ contentPanel.add(btnDownloadStarten);
+
+ progressBar = new JProgressBar(0,100);
+ progressBar.setStringPainted(true);
+
+
+ progressBar.setBounds(10, 45, 414, 30);
+ contentPanel.add(progressBar);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBackground(Color.WHITE);
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ getContentPane().add(buttonPane, BorderLayout.SOUTH);
+ {
+ JButton okButton = new JButton("OK");
+ okButton.setActionCommand("OK");
+ buttonPane.add(okButton);
+ getRootPane().setDefaultButton(okButton);
+ }
+ {
+ JButton cancelButton = new JButton("Zur\u00FCck");
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+ setVisible(true);
+
+ }
+
+ private void buttonDownloadActionPerformed(ActionEvent event) {
+
+ progressBar.setValue(0);
+ DownloadTask task = new DownloadTask(host, port, username, password,downloadPath+filename, lblNewLabel.getText(), this);
+ task.addPropertyChangeListener(this);
+ task.execute();
+ }
+
+ public void propertyChange(PropertyChangeEvent arg0) {
+ if ("progress" == arg0.getPropertyName()) {
+ int progress = (Integer) arg0.getNewValue();
+ progressBar.setValue(progress);
+ }
+
+ }
+
+
+
+} \ No newline at end of file
diff --git a/Dozentenmodul/src/GUI/FTPUploader.java b/Dozentenmodul/src/GUI/FTPUploader.java
new file mode 100644
index 00000000..88526d04
--- /dev/null
+++ b/Dozentenmodul/src/GUI/FTPUploader.java
@@ -0,0 +1,180 @@
+package GUI;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.EventQueue;
+import java.awt.FlowLayout;
+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 downloader.UploadTask;
+import ftp.ftp;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+@SuppressWarnings("serial")
+public class FTPUploader extends JFrame implements PropertyChangeListener {
+
+ @SuppressWarnings("unused")
+ private JPanel contentPane;
+ private final JPanel contentPanel = new JPanel();
+ JLabel lblNewLabel;
+ JLabel UpSpeed;
+ JProgressBar progressBar;
+ ftp f=new ftp();
+ String host="141.79.128.103";
+ int port=21;
+ String username="sysadmin4openslx";
+ String password="!N4ye,04u.";
+ String uploadPath="/";
+ String filename="";
+ File uploadFile;
+ static String arg="";
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ EventQueue.invokeLater(new Runnable() {
+ public void run() {
+ try {
+ FTPUploader frame = new FTPUploader();
+ frame.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ });
+ }
+
+ /**
+ * Create the frame.
+ */
+ public FTPUploader() {
+ //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("Uploader");
+ setBounds(100, 100, 450, 218);
+ getContentPane().setLayout(new BorderLayout());
+ contentPanel.setBackground(Color.WHITE);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel, BorderLayout.CENTER);
+ contentPanel.setLayout(null);
+ {
+ JButton btnSpeicherortAuswhlen = new JButton("VMDK ausw\u00E4hlen");
+ btnSpeicherortAuswhlen.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ JFileChooser fc=new JFileChooser();
+ fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
+
+ fc.showOpenDialog(getParent());
+ File dir=fc.getSelectedFile();
+ uploadFile=dir;
+ lblNewLabel.setText(dir.getAbsolutePath());
+ }
+ });
+
+ btnSpeicherortAuswhlen.setBounds(10, 11, 141, 23);
+ btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP);
+ btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT);
+ contentPanel.add(btnSpeicherortAuswhlen);
+ }
+
+ lblNewLabel = new JLabel("");
+ lblNewLabel.setBounds(169, 11, 255, 23);
+ contentPanel.add(lblNewLabel);
+
+ JButton btnDownloadStarten = new JButton("Upload starten");
+ btnDownloadStarten.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ buttonUploadActionPerformed(arg0);
+ }
+ });
+
+ btnDownloadStarten.setBounds(10, 106, 141, 23);
+ contentPanel.add(btnDownloadStarten);
+
+ progressBar = new JProgressBar(0,100);
+ progressBar.setStringPainted(true);
+
+
+ progressBar.setBounds(10, 45, 414, 30);
+ contentPanel.add(progressBar);
+
+ JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:");
+ lblUploadgeschwindigkeit.setBounds(10, 75, 150, 14);
+ contentPanel.add(lblUploadgeschwindigkeit);
+
+ UpSpeed = new JLabel("");
+ UpSpeed.setBounds(169, 75, 170, 14);
+ UpSpeed.setText(String.valueOf(0));
+ contentPanel.add(UpSpeed);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBackground(Color.WHITE);
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ getContentPane().add(buttonPane, BorderLayout.SOUTH);
+ {
+ JButton okButton = new JButton("OK");
+ okButton.setActionCommand("OK");
+ buttonPane.add(okButton);
+ getRootPane().setDefaultButton(okButton);
+ }
+ {
+ JButton cancelButton = new JButton("Zur\u00FCck");
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+ setVisible(true);
+
+ }
+
+ private void buttonUploadActionPerformed(ActionEvent event) {
+
+ progressBar.setValue(0);
+ UploadTask task=new UploadTask(host,port,username,password,uploadPath, uploadFile);
+ task.addPropertyChangeListener(this);
+ task.execute();
+ }
+
+ public void propertyChange(PropertyChangeEvent arg0) {
+ if ("progress" == arg0.getPropertyName()) {
+ int progress = (Integer) arg0.getNewValue();
+ progressBar.setValue(progress);
+ }
+ if("speed"==arg0.getPropertyName()){
+ double speed=(double)arg0.getNewValue();
+ if(speed<=1){
+ UpSpeed.setText(String.valueOf(speed));
+ }else
+ {
+ double MBSpeed=speed/1024;
+ UpSpeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf(".")));
+ }
+
+ }
+
+ }
+} \ No newline at end of file
diff --git a/Dozentenmodul/src/GUI/FertigStellen.java b/Dozentenmodul/src/GUI/FertigStellen.java
new file mode 100644
index 00000000..e9beb598
--- /dev/null
+++ b/Dozentenmodul/src/GUI/FertigStellen.java
@@ -0,0 +1,154 @@
+package GUI;
+import java.awt.FlowLayout;
+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 ftp.ftp;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import javax.swing.JSeparator;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JMenu;
+
+
+@SuppressWarnings("serial")
+public class FertigStellen extends JDialog {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ ftp f=new ftp();
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ FertigStellen dialog = new FertigStellen();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public FertigStellen() {
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setTitle("Dozentenmodul");
+ setBounds(100, 100, 417, 307);
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBounds(0, 0, 529, 68);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Fertig stellen (Schritt 6 von 6)");
+ lblNewLabel.setBounds(10, 11, 391, 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 laden Sie nun ihre fertige VL mithilfe des Uploaders auf den Server.");
+ txtpnBitteWhlenSie.setBounds(10, 36, 391, 42);
+ panel.add(txtpnBitteWhlenSie);
+ }
+ contentPanel.setBounds(10, 91, 381, 97);
+ contentPanel.setBackground(Color.WHITE);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ JButton btnUploaderStarten = new JButton("Uploader starten");
+ btnUploaderStarten.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ FTPUploader ftp=new FTPUploader();
+ ftp.setVisible(true);
+ }
+ });
+ btnUploaderStarten.setBounds(10, 11, 203, 23);
+ contentPanel.add(btnUploaderStarten);
+
+ JButton btnSofortigeSyncronisation = new JButton("Sofortige Syncronisation");
+ btnSofortigeSyncronisation.setBounds(10, 63, 203, 23);
+ contentPanel.add(btnSofortigeSyncronisation);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 212, 401, 36);
+ 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) {
+ EingabeSoftwareDaten ea=new EingabeSoftwareDaten();
+ ea.setVisible(true);
+ dispose();
+ }
+ });
+ okButton.setActionCommand("OK");
+ buttonPane.add(okButton);
+ getRootPane().setDefaultButton(okButton);
+ }
+ {
+ JButton cancelButton = new JButton("Fertig");
+ cancelButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ System.exit(0);
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 79, 529, 2);
+ getContentPane().add(separator);
+
+ JSeparator separator_1 = new JSeparator();
+ separator_1.setBounds(0, 199, 401, 2);
+ getContentPane().add(separator_1);
+
+ JMenuBar menuBar = new JMenuBar();
+ setJMenuBar(menuBar);
+
+ JMenu mnSuchen = new JMenu("Suchen");
+ menuBar.add(mnSuchen);
+
+ JMenuItem mntmVlSuche = new JMenuItem("VL Suche");
+ mnSuchen.add(mntmVlSuche);
+
+ JMenu mnHilfe = new JMenu("Hilfe");
+ menuBar.add(mnHilfe);
+
+ JMenuItem mntmFaq = new JMenuItem("FAQ");
+ mnHilfe.add(mntmFaq);
+
+ JMenuItem mntmOtrs = new JMenuItem("OTRS");
+ mnHilfe.add(mntmOtrs);
+
+
+
+ }
+}
diff --git a/Dozentenmodul/src/GUI/LoginWindow.java b/Dozentenmodul/src/GUI/LoginWindow.java
index 3063bb81..4f9268ef 100644
--- a/Dozentenmodul/src/GUI/LoginWindow.java
+++ b/Dozentenmodul/src/GUI/LoginWindow.java
@@ -78,7 +78,8 @@ public class LoginWindow extends JFrame {
//Größe und Position des Logos festelegen
imgLabel.setBounds(10, 11, 270, 64);
//Pfadangabe des Logos
- ImageIcon icon = new ImageIcon("img/Logo_bwLehrpool.png","Logo");
+
+ 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));
diff --git a/Dozentenmodul/src/GUI/getVMwarePlayer.java b/Dozentenmodul/src/GUI/getVMwarePlayer.java
new file mode 100644
index 00000000..47a09de5
--- /dev/null
+++ b/Dozentenmodul/src/GUI/getVMwarePlayer.java
@@ -0,0 +1,156 @@
+package GUI;
+
+import java.awt.FlowLayout;
+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 ftp.ftp;
+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;
+
+@SuppressWarnings("serial")
+public class getVMwarePlayer extends JDialog {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ ftp f=new ftp();
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ getVMwarePlayer dialog = new getVMwarePlayer();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public getVMwarePlayer() {
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setTitle("Dozentenmodul");
+ setBounds(100, 100, 545, 517);
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBounds(0, 0, 529, 80);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Bearbeiten der VMDK (Schritt 2 von 6)");
+ 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 bearbeiten Sie nun die heruntergeladene VMDK");
+ txtpnBitteWhlenSie.setBounds(10, 36, 509, 42);
+ panel.add(txtpnBitteWhlenSie);
+ }
+ contentPanel.setBounds(10, 113, 509, 252);
+ contentPanel.setBackground(Color.WHITE);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ JTextPane txtpnUmIhreVmdk = new JTextPane();
+ txtpnUmIhreVmdk.setEditable(false);
+ txtpnUmIhreVmdk.setText("Um Ihre VMDK zu bearbeiten bzw. die notwendigen Programme zu installieren, ben\u00F6tigen sie den VMware Player. Den VMware Player k\u00F6nnen Sie unter folgendem Link downloaden.");
+ txtpnUmIhreVmdk.setBounds(0, 0, 499, 154);
+ contentPanel.add(txtpnUmIhreVmdk);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 423, 529, 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) {
+ searchRohling sr=new searchRohling();
+ 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) {
+ EingabeAllgemein ea=new EingabeAllgemein();
+ ea.setVisible(true);
+ dispose();
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+ {
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 402, 519, 2);
+ getContentPane().add(separator);
+ }
+ {
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 91, 519, 2);
+ getContentPane().add(separator);
+ }
+ {
+ JMenuBar menuBar = new JMenuBar();
+ setJMenuBar(menuBar);
+ {
+ JMenu mnSuchen = new JMenu("Suchen");
+ menuBar.add(mnSuchen);
+ {
+ JMenuItem mntmVlSuche = new JMenuItem("VL Suche");
+ mnSuchen.add(mntmVlSuche);
+ }
+ }
+ {
+ JMenu mnHilfe = new JMenu("Hilfe");
+ menuBar.add(mnHilfe);
+ {
+ JMenuItem mntmFaq = new JMenuItem("FAQ");
+ mnHilfe.add(mntmFaq);
+ }
+ {
+ JMenuItem mntmHilfe = new JMenuItem("Hilfe");
+ mnHilfe.add(mntmHilfe);
+ }
+ }
+ }
+
+
+
+ }
+}
diff --git a/Dozentenmodul/src/GUI/searchRohling.java b/Dozentenmodul/src/GUI/searchRohling.java
new file mode 100644
index 00000000..4b2ef1b0
--- /dev/null
+++ b/Dozentenmodul/src/GUI/searchRohling.java
@@ -0,0 +1,201 @@
+package GUI;
+
+import java.awt.FlowLayout;
+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 javax.swing.JTextField;
+import ftp.ftp;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.net.SocketException;
+import java.awt.List;
+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;
+
+@SuppressWarnings("serial")
+public class searchRohling extends JDialog {
+
+ private final JPanel contentPanel = new JPanel();
+ private JTextField textFieldsearch;
+ List list;
+ String[] result;
+ ftp f=new ftp();
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ searchRohling dialog = new searchRohling();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public searchRohling() {
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setTitle("Dozentenmodul");
+ setBounds(100, 100, 545, 516);
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBounds(0, 0, 529, 71);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Rohling ausw\u00E4hlen (Schritt 1 von 6)");
+ 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 w\u00E4hlen Sie nun Ihr gew\u00FCnschtes Rohling aus und klicken Sie auf Download. Sollten Sie schon im Besitz Ihres gew\u00FCnschten Rohlings sein klicken Sie auf weiter.");
+ txtpnBitteWhlenSie.setBounds(10, 36, 509, 42);
+ panel.add(txtpnBitteWhlenSie);
+ }
+ contentPanel.setBounds(10, 113, 509, 252);
+ contentPanel.setBackground(Color.WHITE);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ list = new List();
+ list.setBounds(0, 0, 509, 252);
+ contentPanel.add(list);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 423, 529, 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 arg0) {
+ ActionChooser ac=new ActionChooser();
+ ac.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 arg0) {
+ getVMwarePlayer vp=new getVMwarePlayer();
+ vp.setVisible(true);
+ dispose();
+ }
+ });
+ cancelButton.setActionCommand("Cancel");
+ buttonPane.add(cancelButton);
+ }
+ }
+
+ JButton btnDownload = new JButton("Download");
+ btnDownload.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ FTPDownloader ftp=new FTPDownloader(list.getItem(list.getSelectedIndex()).toString());
+ ftp.setVisible(true);
+ }
+ });
+ btnDownload.setBounds(430, 376, 89, 23);
+ getContentPane().add(btnDownload);
+
+ textFieldsearch = new JTextField();
+ textFieldsearch.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyReleased(KeyEvent arg0) {
+ System.out.println(textFieldsearch.getText().toString());
+
+ try {
+ result=f.getAllRohling(textFieldsearch.getText().toString());
+ } catch (SocketException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ list.removeAll();
+ for(int i=0;i<result.length;i++)
+ {
+ if(result[i]!=null)
+ list.add(result[i]);
+
+ }
+ }
+ });
+ textFieldsearch.setBounds(10, 92, 166, 20);
+ getContentPane().add(textFieldsearch);
+ textFieldsearch.setColumns(10);
+
+ JSeparator separator = new JSeparator();
+ separator.setBounds(0, 410, 529, 2);
+ getContentPane().add(separator);
+
+ JSeparator separator_1 = new JSeparator();
+ separator_1.setBounds(0, 82, 529, 2);
+ getContentPane().add(separator_1);
+
+ JMenuBar menuBar = new JMenuBar();
+ setJMenuBar(menuBar);
+
+ JMenu mnNewMenu = new JMenu("Suche");
+ 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);
+
+try {
+
+ result=f.getAllRohling(textFieldsearch.getText().toString());
+ list.removeAll();
+ for(int i=0;i<result.length;i++)
+ {
+
+ list.add(result[i]);
+ }
+ } catch (SocketException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+
+ }
+}