summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java
diff options
context:
space:
mode:
authorunknown2014-02-19 12:41:49 +0100
committerunknown2014-02-19 12:41:49 +0100
commitbe5d86c202129b841ef448f7f02d3661597ecc24 (patch)
treecc1552e4cd02a91e4164144fc2d50ed60e3356bc /Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java
parentSQL für VL funktioniert (diff)
downloadtutor-module-be5d86c202129b841ef448f7f02d3661597ecc24.tar.gz
tutor-module-be5d86c202129b841ef448f7f02d3661597ecc24.tar.xz
tutor-module-be5d86c202129b841ef448f7f02d3661597ecc24.zip
Es ist nun möglich auf der Datenbank basierend VLs sowie Veranstaltungen neu anzulegen
Diffstat (limited to 'Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java')
-rw-r--r--Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java320
1 files changed, 320 insertions, 0 deletions
diff --git a/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java b/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java
new file mode 100644
index 00000000..a8e581a5
--- /dev/null
+++ b/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java
@@ -0,0 +1,320 @@
+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 Models.Image;
+import Models.Lecture;
+
+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 javax.swing.JTextField;
+import java.awt.ScrollPane;
+import com.toedter.calendar.JDateChooser;
+
+@SuppressWarnings("serial")
+public class EingabeVeranstatlungTechnisch_GUI extends JFrame {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ private final ButtonGroup buttonGrouplicense = new ButtonGroup();
+ private final ButtonGroup buttonGroupInternet = new ButtonGroup();
+ private JTextField textFieldLaborname;
+ JRadioButton rdbtnJa;
+ JDateChooser dateChooserend;
+ JDateChooser dateChooserstart;
+ JTextArea textAreashort;
+ JTextArea textArealong;
+ private final ButtonGroup buttonGroup = new ButtonGroup();
+ /**
+ * Launch the application.
+ */
+ public static void main(String[] args) {
+ try {
+ EingabeVeranstatlungTechnisch_GUI dialog = new EingabeVeranstatlungTechnisch_GUI();
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Create the dialog.
+ */
+ public EingabeVeranstatlungTechnisch_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("Dateneingabe f\u00FCr Veranstaltung");
+ lblNewLabel.setBounds(10, 11, 509, 22);
+ panel.add(lblNewLabel);
+ lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
+ }
+
+ JTextPane txtpnBitteWhlenSie = new JTextPane();
+ txtpnBitteWhlenSie.setEditable(false);
+ txtpnBitteWhlenSie.setBackground(SystemColor.menu);
+ txtpnBitteWhlenSie.setText("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, 531);
+ contentPanel.setBackground(SystemColor.menu);
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ getContentPane().add(contentPanel);
+ contentPanel.setLayout(null);
+
+ JLabel lblHauptmen = new JLabel("Hauptmen\u00FC");
+ lblHauptmen.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent arg0) {
+
+ EingabeVeranstatlungTechnisch_GUI.this.setVisible(false);
+ MainMenue_GUI main=new MainMenue_GUI();
+ main.setVisible(true);
+ }
+ });
+ lblHauptmen.setForeground(Color.BLUE);
+ lblHauptmen.setBounds(10, 11, 61, 14);
+ contentPanel.add(lblHauptmen);
+
+ JLabel label_1 = new JLabel(">");
+ label_1.setBounds(69, 11, 13, 14);
+ contentPanel.add(label_1);
+
+ JLabel lblVlimage = new JLabel("Veranstaltung ");
+ lblVlimage.setForeground(Color.BLUE);
+ lblVlimage.setBounds(81, 11, 74, 14);
+ contentPanel.add(lblVlimage);
+
+ JLabel label_2 = new JLabel(">");
+ label_2.setBounds(152, 11, 13, 14);
+ contentPanel.add(label_2);
+
+ JLabel lblNewLabel_1 = new JLabel("Neu");
+ lblNewLabel_1.setBounds(165, 11, 46, 14);
+ contentPanel.add(lblNewLabel_1);
+
+ JLabel lblLabornameanzeigename = new JLabel("Laborname (Anzeigename): *");
+ lblLabornameanzeigename.setBounds(10, 57, 250, 14);
+ contentPanel.add(lblLabornameanzeigename);
+
+ textFieldLaborname = new JTextField();
+ textFieldLaborname.setBounds(270, 54, 307, 20);
+ contentPanel.add(textFieldLaborname);
+ textFieldLaborname.setColumns(10);
+
+ JLabel lblKurzbeschreibung = new JLabel("Kurzbeschreibung: *");
+ lblKurzbeschreibung.setBounds(10, 109, 250, 14);
+ contentPanel.add(lblKurzbeschreibung);
+
+ ScrollPane scrollPane = new ScrollPane();
+ scrollPane.setBounds(270, 109, 307, 137);
+ contentPanel.add(scrollPane);
+
+ textAreashort = new JTextArea();
+ textAreashort.setLineWrap(true);
+ scrollPane.add(textAreashort);
+ textAreashort.setBounds(0, 0, 4, 22);
+
+ ScrollPane scrollPane_1 = new ScrollPane();
+ scrollPane_1.setBounds(270, 249, 307, 137);
+ contentPanel.add(scrollPane_1);
+
+ textArealong = new JTextArea();
+ textArealong.setLineWrap(true);
+ textArealong.setBounds(0, 0, 4, 22);
+ scrollPane_1.add(textArealong);
+
+ JLabel label = new JLabel("Kurzbeschreibung: *");
+ label.setBounds(0, 252, 250, 14);
+ contentPanel.add(label);
+
+ JLabel lblGltigkeitsdatum = new JLabel("G\u00FCltigkeitsdatum: *");
+ lblGltigkeitsdatum.setBounds(0, 397, 250, 14);
+ contentPanel.add(lblGltigkeitsdatum);
+
+ JLabel lblVon = new JLabel("von:");
+ lblVon.setBounds(270, 394, 30, 20);
+ contentPanel.add(lblVon);
+
+ dateChooserstart = new JDateChooser();
+ dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss");
+ dateChooserstart.setBounds(332, 391, 101, 20);
+ contentPanel.add(dateChooserstart);
+
+ JLabel lblBis = new JLabel("bis");
+ lblBis.setBounds(443, 394, 24, 20);
+ contentPanel.add(lblBis);
+
+ dateChooserend = new JDateChooser();
+ dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss");
+ dateChooserend.setBounds(477, 392, 100, 20);
+ contentPanel.add(dateChooserend);
+
+ JLabel lblAktiv = new JLabel("Aktiv:");
+ lblAktiv.setBounds(0, 450, 250, 14);
+ contentPanel.add(lblAktiv);
+
+ JLabel lblimVmchooserSichtbar = new JLabel("(Im VMChooser sichtbar)");
+ lblimVmchooserSichtbar.setBounds(0, 475, 250, 14);
+ contentPanel.add(lblimVmchooserSichtbar);
+
+ rdbtnJa = new JRadioButton("Ja");
+ rdbtnJa.setSelected(true);
+ buttonGroup.add(rdbtnJa);
+ rdbtnJa.setBounds(270, 446, 109, 23);
+ contentPanel.add(rdbtnJa);
+
+ JRadioButton rdbtnNein = new JRadioButton("Nein");
+ buttonGroup.add(rdbtnNein);
+ rdbtnNein.setBounds(381, 446, 109, 23);
+ contentPanel.add(rdbtnNein);
+ //contentPanel.add(textArea);
+ {
+ JPanel buttonPane = new JPanel();
+ buttonPane.setBounds(0, 640, 597, 33);
+ buttonPane.setBackground(SystemColor.menu);
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ getContentPane().add(buttonPane);
+ {
+ JButton okButton = new JButton("Zur\u00FCck");
+ okButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+
+ if(rdbtnJa.isSelected()==true)
+ {
+ Lecture.lecture.setActive(true);
+ }
+ else
+ {
+ Lecture.lecture.setActive(false);
+ }
+
+ Lecture.lecture.setName(textFieldLaborname.getText());
+ Lecture.lecture.setDesc(textArealong.getText());
+ Lecture.lecture.setEnddate(dateChooserend.getDate());
+ Lecture.lecture.setShortDesc(textAreashort.getText());
+ Lecture.lecture.setStartdate(dateChooserstart.getDate());
+
+
+ EingabeVeranstaltungAllgemein_GUI sr=new EingabeVeranstaltungAllgemein_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(rdbtnJa.isSelected()==true)
+ {
+ Lecture.lecture.setActive(true);
+ }
+ else
+ {
+ Lecture.lecture.setActive(false);
+ }
+
+ Lecture.lecture.setName(textFieldLaborname.getText());
+ Lecture.lecture.setDesc(textArealong.getText());
+ Lecture.lecture.setEnddate(dateChooserend.getDate());
+ Lecture.lecture.setShortDesc(textAreashort.getText());
+ Lecture.lecture.setStartdate(dateChooserstart.getDate());
+ LinkImage_GUI ea=new LinkImage_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);
+
+ }
+}