package GUI; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.List; 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 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.JMenuItem; import javax.swing.JMenu; import Models.*; import Models.vm; import javax.swing.JTextArea; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import java.awt.Panel; import java.text.SimpleDateFormat; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; @SuppressWarnings("serial") public class Summary extends JFrame { String[] result; /** * Launch the application. */ public static void main(String[] args) { try { Summary dialog = new Summary(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } /** * Create the dialog. */ public Summary() { 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 - 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.setBounds(0, 0, 577, 68); getContentPane().add(panel); panel.setLayout(null); { JLabel lblNewLabel = new JLabel("Fertig stellen (Schritt 7 von 7)"); 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); } { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 627, 577, 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) { Freigabe ea=new Freigabe(); 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, 587, 2); getContentPane().add(separator); JSeparator separator_1 = new JSeparator(); separator_1.setBounds(0, 614, 587, 2); getContentPane().add(separator_1); JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); tabbedPane.setBounds(10, 111, 567, 458); getContentPane().add(tabbedPane); Panel panel = new Panel(); panel.setBackground(Color.WHITE); tabbedPane.addTab("Allgemein", null, panel, null); panel.setLayout(null); JLabel label = new JLabel("Ersteller"); label.setFont(new Font("Tahoma", Font.PLAIN, 14)); label.setBounds(264, 11, 251, 14); panel.add(label); JLabel label_1 = new JLabel("Vorname:"); label_1.setBounds(10, 36, 65, 14); panel.add(label_1); JLabel label_2 = new JLabel("Vorname:"); label_2.setBounds(264, 36, 65, 14); panel.add(label_2); JLabel label_3 = new JLabel("Nachname:"); label_3.setBounds(10, 61, 65, 14); panel.add(label_3); JLabel label_4 = new JLabel("Nachname:"); label_4.setBounds(264, 61, 65, 14); panel.add(label_4); JLabel label_5 = new JLabel("Hochschule:"); label_5.setBounds(10, 86, 65, 14); panel.add(label_5); JLabel label_6 = new JLabel("Hochschule:"); label_6.setBounds(264, 86, 65, 14); panel.add(label_6); JLabel label_Vorname_V = new JLabel((String) null); label_Vorname_V.setText(personData.verantowrtlicher.getVorname()); label_Vorname_V.setBounds(85, 36, 169, 14); panel.add(label_Vorname_V); JLabel label_Vorname_E = new JLabel((String) null); label_Vorname_E.setText(personData.ersteller.getVorname()); label_Vorname_E.setBounds(339, 36, 169, 14); panel.add(label_Vorname_E); JLabel label_Nachname_E = new JLabel((String) null); label_Nachname_E.setText(personData.ersteller.getName()); label_Nachname_E.setBounds(339, 61, 169, 14); panel.add(label_Nachname_E); JLabel label_Nachname_V = new JLabel((String) null); label_Nachname_V.setText(personData.verantowrtlicher.getName()); label_Nachname_V.setBounds(85, 61, 169, 14); panel.add(label_Nachname_V); JLabel label_Hochschule_V = new JLabel((String) null); label_Hochschule_V.setText(personData.verantowrtlicher.getHochschule()); label_Hochschule_V.setBounds(85, 86, 169, 14); panel.add(label_Hochschule_V); JLabel label_Hochschule_E = new JLabel((String) null); label_Hochschule_E.setText(personData.ersteller.getHochschule()); label_Hochschule_E.setBounds(339, 86, 169, 14); panel.add(label_Hochschule_E); JLabel label_Mail_E = new JLabel((String) null); label_Mail_E.setText(personData.ersteller.getEMail()); label_Mail_E.setBounds(339, 111, 169, 14); panel.add(label_Mail_E); JLabel label_14 = new JLabel("E-Mail:"); label_14.setBounds(264, 111, 65, 14); panel.add(label_14); JLabel label_Mail_V = new JLabel((String) null); label_Mail_V.setText(personData.verantowrtlicher.getEMail()); label_Mail_V.setBounds(85, 111, 169, 14); panel.add(label_Mail_V); JLabel label_16 = new JLabel("E-Mail:"); label_16.setBounds(10, 111, 65, 14); panel.add(label_16); JLabel label_17 = new JLabel("Tel.-Nummer:"); label_17.setBounds(10, 136, 65, 14); panel.add(label_17); JLabel label_Tel_V = new JLabel((String) null); label_Tel_V.setText(personData.verantowrtlicher.getTel()); label_Tel_V.setBounds(85, 136, 169, 14); panel.add(label_Tel_V); JLabel label_19 = new JLabel("Tel.-Nummer:"); label_19.setBounds(264, 136, 65, 14); panel.add(label_19); JLabel label_Tel_E = new JLabel((String) null); label_Tel_E.setText(personData.ersteller.getTel()); label_Tel_E.setBounds(339, 136, 169, 14); panel.add(label_Tel_E); JLabel label_Fak_E = new JLabel((String) null); label_Fak_E.setText(personData.ersteller.getFakultät()); label_Fak_E.setBounds(339, 161, 169, 14); panel.add(label_Fak_E); JLabel label_22 = new JLabel("Fakult\u00E4t:"); label_22.setBounds(264, 161, 65, 14); panel.add(label_22); JLabel label_Fak_V = new JLabel((String) null); label_Fak_V.setText(personData.verantowrtlicher.getFakultät()); label_Fak_V.setBounds(85, 161, 169, 14); panel.add(label_Fak_V); JLabel label_24 = new JLabel("Fakult\u00E4t:"); label_24.setBounds(10, 161, 65, 14); panel.add(label_24); JLabel label_25 = new JLabel("Verantwortlicher"); label_25.setFont(new Font("Tahoma", Font.PLAIN, 14)); label_25.setBounds(10, 11, 244, 14); panel.add(label_25); JButton btnZurDateneingabe = new JButton("Daten \u00E4ndern"); btnZurDateneingabe.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { EingabeImageAllgemein_GUI ea=new EingabeImageAllgemein_GUI(); ea.setVisible(true); setVisible(false); } }); btnZurDateneingabe.setBounds(10, 186, 132, 23); panel.add(btnZurDateneingabe); Panel panel_1 = new Panel(); panel_1.setBackground(Color.WHITE); tabbedPane.addTab("Systeminformationen", null, panel_1, null); panel_1.setLayout(null); JLabel label_end = new JLabel((String) null); SimpleDateFormat fmt = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"); String Date_End=fmt.format(vm.vl.getEnd()); label_end.setText(Date_End); label_end.setBounds(318, 310, 197, 14); panel_1.add(label_end); JLabel label_27 = new JLabel("bis"); label_27.setBounds(262, 310, 46, 14); panel_1.add(label_27); JLabel label_begin = new JLabel((String) null); String Date_Begin=fmt.format(vm.vl.getBegin()); label_begin.setText(Date_Begin); label_begin.setBounds(120, 310, 134, 14); panel_1.add(label_begin); JLabel label_29 = new JLabel("G\u00FCltig von"); label_29.setBounds(10, 310, 100, 14); panel_1.add(label_29); JLabel label_30 = new JLabel("Betriebssystem:"); label_30.setBounds(10, 285, 100, 14); panel_1.add(label_30); JLabel label_OS = new JLabel((String) null); label_OS.setText(vm.vl.getOS()); label_OS.setBounds(120, 285, 395, 14); panel_1.add(label_OS); JScrollPane scrollPane_3 = new JScrollPane(); scrollPane_3.setBounds(121, 201, 393, 72); panel_1.add(scrollPane_3); JTextArea textArea_comment = new JTextArea(); textArea_comment.setFont(new Font("Tahoma", Font.PLAIN, 11)); textArea_comment.setText(vm.vl.getComment()); scrollPane_3.setViewportView(textArea_comment); textArea_comment.setEditable(false); JLabel label_32 = new JLabel("Kommentar:"); label_32.setBounds(10, 200, 100, 14); panel_1.add(label_32); JScrollPane scrollPane_2 = new JScrollPane(); scrollPane_2.setBounds(121, 117, 393, 72); panel_1.add(scrollPane_2); JTextArea textArea_long = new JTextArea(); textArea_long.setFont(new Font("Tahoma", Font.PLAIN, 11)); textArea_long.setText(vm.vl.getLongDesc()); scrollPane_2.setViewportView(textArea_long); textArea_long.setEditable(false); JLabel label_33 = new JLabel("Langbeschreibung:"); label_33.setBounds(10, 116, 100, 14); panel_1.add(label_33); JScrollPane scrollPane_1 = new JScrollPane(); scrollPane_1.setBounds(121, 37, 393, 72); panel_1.add(scrollPane_1); JTextArea textArea_short = new JTextArea(); textArea_short.setFont(new Font("Tahoma", Font.PLAIN, 11)); textArea_short.setText(vm.vl.getShortDesc()); scrollPane_1.setViewportView(textArea_short); textArea_short.setEditable(false); JLabel label_34 = new JLabel("Kurzbeschreibung:"); label_34.setBounds(10, 36, 100, 14); panel_1.add(label_34); JLabel label_35 = new JLabel("Laborname:"); label_35.setBounds(10, 11, 100, 14); panel_1.add(label_35); JLabel label_Laborname = new JLabel((String) null); label_Laborname.setText(vm.vl.getLaborname()); label_Laborname.setBounds(120, 11, 395, 14); panel_1.add(label_Laborname); JButton btnDatenndern = new JButton("Daten \u00E4ndern"); btnDatenndern.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { EingabeSystemDaten es=new EingabeSystemDaten(); es.setVisible(true); setVisible(false); } }); btnDatenndern.setBounds(10, 335, 132, 23); panel_1.add(btnDatenndern); Panel panel_2 = new Panel(); panel_2.setBackground(Color.WHITE); tabbedPane.addTab("Software", null, panel_2, null); panel_2.setLayout(null); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(11, 37, 541, 334); panel_2.add(scrollPane); List list_sw = new List(); list_sw.setEnabled(false); List temp=vm.vl.getSoftware(); for(int i=0;i