From 0447841f3a08890bf746625d0f17976adada6ac8 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 3 Mar 2015 19:02:48 +0100 Subject: bwIDM - Shibboleth login working for Freiburg's SP - more to come rework GUI classes to work with GuiManager: use GuiManager.show() and GuiManager.openPopup() only! static openlinks class (models/links.java deleted). There are keywords to open links, e.g. OpenLinks.openWebpage("faq"). Please see the class. --- .../src/main/java/gui/intro/BillOfRights_GUI.java | 68 ++-------------------- 1 file changed, 4 insertions(+), 64 deletions(-) (limited to 'dozentenmodul/src/main/java/gui/intro/BillOfRights_GUI.java') diff --git a/dozentenmodul/src/main/java/gui/intro/BillOfRights_GUI.java b/dozentenmodul/src/main/java/gui/intro/BillOfRights_GUI.java index 71e31d52..c136e743 100644 --- a/dozentenmodul/src/main/java/gui/intro/BillOfRights_GUI.java +++ b/dozentenmodul/src/main/java/gui/intro/BillOfRights_GUI.java @@ -8,14 +8,10 @@ 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.net.URI; -import java.net.URISyntaxException; import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JFrame; +import javax.swing.JInternalFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; @@ -32,15 +28,14 @@ import javax.swing.border.EmptyBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import models.Links; -import util.GuiOrganizer; +import util.GuiManager; import util.OpenLinks; import config.Config; @SuppressWarnings("serial") -public class BillOfRights_GUI extends JFrame { +public class BillOfRights_GUI extends JInternalFrame { private final JPanel contentPanel = new JPanel(); String[] result; @@ -53,13 +48,6 @@ public class BillOfRights_GUI extends JFrame { public BillOfRights_GUI() { setResizable(false); - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet das Programm beim Klick auf das X - System.exit(0); - } - }); try { //Setzt das Look & Feel auf das System UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); @@ -73,7 +61,6 @@ public class BillOfRights_GUI extends JFrame { //Zentiert das Fenster in der Bildschirmmitte setBounds(0, 0, 603, 722); - GuiOrganizer.centerGUI(this); getContentPane().setLayout(null); { @@ -124,9 +111,7 @@ public class BillOfRights_GUI extends JFrame { public void actionPerformed(ActionEvent e) { Config.setBillOfRights(true); Config.store(); - VmWareLink_GUI ac=new VmWareLink_GUI(); - ac.setVisible(true); - dispose(); + GuiManager.show(new VmWareLink_GUI()); } }); fwdButton.setEnabled(false); @@ -162,51 +147,6 @@ public class BillOfRights_GUI extends JFrame { chckbxAkzeptieren.setBackground(SystemColor.menu); chckbxAkzeptieren.setBounds(10, 587, 567, 23); getContentPane().add(chckbxAkzeptieren); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - mnNewMenu_1.setHorizontalAlignment(SwingConstants.CENTER); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mntmFaq.addMouseListener(new MouseAdapter() { - @Override - public void mousePressed(MouseEvent arg0) { - URI windows; - try { - windows = new URI(Links.getFAQ()); - - OpenLinks.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) { - URI windows; - try { - windows = new URI(Links.getOTRS()); - - OpenLinks.openWebpage(windows); - - } catch (URISyntaxException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - }); - mnNewMenu_1.add(mntmOtrs); } } -- cgit v1.2.3-55-g7522