summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/gui/image/CreateImageFreigabe_GUI.java
diff options
context:
space:
mode:
authorJonathan Bauer2014-09-11 15:04:50 +0200
committerJonathan Bauer2014-09-11 15:04:50 +0200
commite90286005f1cbedc77bfff91f867cb6aec25a595 (patch)
tree361faf449e987518ffe33757d64af69539f0ef5c /dozentenmodul/src/main/java/gui/image/CreateImageFreigabe_GUI.java
parentlower case names for folder please (diff)
downloadtutor-module-e90286005f1cbedc77bfff91f867cb6aec25a595.tar.gz
tutor-module-e90286005f1cbedc77bfff91f867cb6aec25a595.tar.xz
tutor-module-e90286005f1cbedc77bfff91f867cb6aec25a595.zip
oops
Diffstat (limited to 'dozentenmodul/src/main/java/gui/image/CreateImageFreigabe_GUI.java')
-rw-r--r--dozentenmodul/src/main/java/gui/image/CreateImageFreigabe_GUI.java258
1 files changed, 258 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/gui/image/CreateImageFreigabe_GUI.java b/dozentenmodul/src/main/java/gui/image/CreateImageFreigabe_GUI.java
new file mode 100644
index 00000000..dea785d3
--- /dev/null
+++ b/dozentenmodul/src/main/java/gui/image/CreateImageFreigabe_GUI.java
@@ -0,0 +1,258 @@
+package gui.image;
+
+import gui.intro.About_GUI;
+import gui.intro.MainMenue_GUI;
+
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.SystemColor;
+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.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.swing.ButtonGroup;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+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.JTextPane;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+
+import models.Image;
+import models.Links;
+import util.GuiOrganizer;
+import util.OpenLinks;
+
+@SuppressWarnings("serial")
+public class CreateImageFreigabe_GUI extends JFrame {
+
+ private final JPanel contentPanel = new JPanel();
+ String[] result;
+ private final ButtonGroup buttonGrouplicense = new ButtonGroup();
+ private final ButtonGroup buttonGroupInternet = new ButtonGroup();
+ JComboBox comboBox;
+
+ /**
+ * Create the dialog.
+ */
+ public CreateImageFreigabe_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 - Image erzeugen");
+
+ setBounds(0, 0, 603, 722);
+ GuiOrganizer.centerGUI(this);
+
+ getContentPane().setLayout(null);
+ {
+ JPanel panel = new JPanel();
+ panel.setBackground(SystemColor.menu);
+ panel.setBounds(10, 11, 577, 57);
+ getContentPane().add(panel);
+ panel.setLayout(null);
+ {
+ JLabel lblNewLabel = new JLabel("Image Freigabe");
+ lblNewLabel.setBounds(10, 11, 509, 22);
+ panel.add(lblNewLabel);
+ lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
+ }
+
+ JTextPane txtpnBitteWhlenSie = new JTextPane();
+ txtpnBitteWhlenSie.setEditable(false);
+ txtpnBitteWhlenSie.setBackground(SystemColor.menu);
+ txtpnBitteWhlenSie
+ .setText("W\u00E4hlen Sie bitte hier die von Ihnen gew\u00FCnschte Freigabe f\u00FCr Ihr Image aus.");
+ 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, "Freigabe",
+ TitledBorder.LEADING, TitledBorder.TOP, null, null));
+ panel_1.setBounds(10, 51, 557, 124);
+ contentPanel.add(panel_1);
+ panel_1.setLayout(null);
+
+ JLabel lblNewLabel_2 = new JLabel("Freigabemodus:");
+ lblNewLabel_2.setBounds(10, 55, 250, 20);
+ panel_1.add(lblNewLabel_2);
+
+ comboBox = new JComboBox();
+ comboBox.setModel(new DefaultComboBoxModel(new String[] {
+ "Lokal (Eigene Hochschule)",
+ "\u00D6ffentlich (Alle Hochschulen)" }));
+ comboBox.setSelectedIndex(0);
+ comboBox.setBounds(270, 55, 250, 20);
+ panel_1.add(comboBox);
+
+ JLabel lblHauptmen = new JLabel("Hauptmen\u00FC");
+ lblHauptmen.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent arg0) {
+
+ CreateImageFreigabe_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("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) {
+
+ Image.image.setShareMode(comboBox.getSelectedIndex());
+ CreateImageTechnisch_GUI sr = new CreateImageTechnisch_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) {
+ Image.image.setShareMode(comboBox.getSelectedIndex());
+ PermissionCreateImage_GUI ea = new PermissionCreateImage_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_1 = new JMenu("Hilfe");
+ menuBar.add(mnNewMenu_1);
+
+ JMenuItem mntmFaq = new JMenuItem("FAQ");
+ mntmFaq.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mousePressed(MouseEvent arg0) {
+
+ OpenLinks open = new OpenLinks();
+
+ URI windows;
+ try {
+ windows = new URI(Links.getFAQ());
+
+ open.openWebpage(windows);
+
+ } catch (URISyntaxException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ });
+ mnNewMenu_1.add(mntmFaq);
+
+
+ JMenuItem mntmOtrs = new JMenuItem("OTRS");
+ mntmOtrs.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mousePressed(MouseEvent arg0) {
+
+ OpenLinks open = new OpenLinks();
+
+ URI windows;
+ try {
+ windows = new URI(Links.getOTRS());
+
+ open.openWebpage(windows);
+
+ } catch (URISyntaxException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+ });
+ mnNewMenu_1.add(mntmOtrs);
+ JMenuItem menuItem = new JMenuItem("About");
+ menuItem.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ About_GUI ab = new About_GUI();
+ ab.setVisible(true);
+ }
+ });
+ mnNewMenu_1.add(menuItem);
+
+ }
+}