summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/gui/lecture/PermissionCreateLecture_GUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/gui/lecture/PermissionCreateLecture_GUI.java')
-rw-r--r--dozentenmodul/src/main/java/gui/lecture/PermissionCreateLecture_GUI.java131
1 files changed, 15 insertions, 116 deletions
diff --git a/dozentenmodul/src/main/java/gui/lecture/PermissionCreateLecture_GUI.java b/dozentenmodul/src/main/java/gui/lecture/PermissionCreateLecture_GUI.java
index 3c4e74b1..93006089 100644
--- a/dozentenmodul/src/main/java/gui/lecture/PermissionCreateLecture_GUI.java
+++ b/dozentenmodul/src/main/java/gui/lecture/PermissionCreateLecture_GUI.java
@@ -1,6 +1,5 @@
package gui.lecture;
-import gui.intro.About_GUI;
import gui.intro.MainMenue_GUI;
import java.awt.Color;
@@ -15,10 +14,6 @@ import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -26,12 +21,8 @@ import java.util.List;
import javax.swing.AbstractButton;
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;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
@@ -51,30 +42,24 @@ import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;
-import models.Links;
import models.RightsManagement;
-import models.SessionData;
import models.person;
-
-import org.apache.thrift.TException;
-import org.openslx.sat.thrift.iface.Server.Client;
-
import util.CheckIntegrity;
+import util.GuiManager;
import util.ListAllOtherUsers_GUI;
-import util.OpenLinks;
@SuppressWarnings("serial")
-public class PermissionCreateLecture_GUI extends JFrame {
+public class PermissionCreateLecture_GUI extends JInternalFrame {
private final JPanel contentPanel = new JPanel();
- Client client = models.Client.clientcon.getClient();
+
String[] result;
// private JTable table = null;
private JTable tablePermittedUsers = null;
Object[] titles = { "Name", "Lesen", "Schreiben", "Admin", "userID" };
// Object[] titles = { "Name", "Read", "Write", "Link", "Admin", "userID" };
Component c = null;
- private static final String HELP_MESSAGE = "<html><div align=\"center\">"
+ public static final String HELP_MESSAGE = "<html><div align=\"center\">"
+ "Hier können Sie die Berechtigungen für Ihre Veranstaltung ändern.<br />"
+ "Es wird unterschieden, ob innerhalb der Suite (dieses Programm) Änderungen vorgenommen werden dürfen, <br />"
+ "und/oder ob die Veranstaltung auch im VMChooser angezeigt wird."
@@ -113,21 +98,8 @@ public class PermissionCreateLecture_GUI extends JFrame {
// private JTable tablePermittedUsers;
- public PermissionCreateLecture_GUI(Component formerGUI) {
-
-
- addWindowListener(new WindowAdapter() {
- @Override
- public void windowClosing(WindowEvent arg0) {
- try {
- client.setSessionInvalid(SessionData.session.getAuthToken());
- } catch (TException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- System.exit(0);
- }
- });
+ public PermissionCreateLecture_GUI() {
+
setResizable(false);
try {
@@ -139,7 +111,6 @@ public class PermissionCreateLecture_GUI extends JFrame {
setTitle("bwLehrpool Suite - Berechtigungen - "+person.verantwortlicher.getUserID());
setBounds(0, 0, 603, 722);
- setLocationRelativeTo(formerGUI);
getContentPane().setLayout(null);
{
@@ -266,10 +237,7 @@ public class PermissionCreateLecture_GUI extends JFrame {
lblHauptmen.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
-
- PermissionCreateLecture_GUI.this.setVisible(false);
- MainMenue_GUI main = new MainMenue_GUI(c);
- main.setVisible(true);
+ GuiManager.show(new MainMenue_GUI());
}
});
lblHauptmen.setForeground(Color.BLUE);
@@ -351,12 +319,11 @@ public class PermissionCreateLecture_GUI extends JFrame {
btnAddUser.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// show list of all other relevant users
- ListAllOtherUsers_GUI lu = new ListAllOtherUsers_GUI(c,
- tablePermittedUsers, 4); // give access to the table
- // model and inform that the
- // userID is position 5 in
- // the model
- lu.setVisible(true);
+ GuiManager.openPopup(new ListAllOtherUsers_GUI(tablePermittedUsers, 4));
+ // give access to the table
+ // model and inform that the
+ // userID is position 5 in
+ // the model
}
});
btnAddUser.setBounds(10, 290, 113, 23);
@@ -433,11 +400,7 @@ public class PermissionCreateLecture_GUI extends JFrame {
JButton cancelButton = new JButton("Zurück");
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
-
- CreateLectureAllgemein_GUI sr = new CreateLectureAllgemein_GUI(
- c);
- sr.setVisible(true);
- dispose();
+ GuiManager.show(new CreateLectureAllgemein_GUI());
}
});
cancelButton.setActionCommand("OK");
@@ -458,11 +421,7 @@ public class PermissionCreateLecture_GUI extends JFrame {
}
saveTableToList();
-
- CreateLectureLink_GUI ea = new CreateLectureLink_GUI(c);
- ea.setVisible(true);
- dispose();
-
+ GuiManager.show(new CreateLectureLink_GUI());
}
});
continueButton.setActionCommand("Cancel");
@@ -479,66 +438,6 @@ public class PermissionCreateLecture_GUI extends JFrame {
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) {
-
- URI windows;
- try {
- windows = new URI(Links.getFAQ());
- OpenLinks.openWebpage(windows);
- } catch (URISyntaxException e) {
- 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) {
- e.printStackTrace();
- }
-
- }
- });
- mnNewMenu_1.add(mntmOtrs);
-
- JMenuItem mntmAbout = new JMenuItem("About");
- mntmAbout.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- About_GUI ab = new About_GUI();
- ab.setVisible(true);
- }
- });
- mnNewMenu_1.add(mntmAbout);
-
- JMenu mnNewMenu_Info = new JMenu("Info");
- mnNewMenu_Info.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent arg0) {
- JOptionPane.showMessageDialog(c, HELP_MESSAGE,
- "Hilfe zu dieser Oberfläche",
- JOptionPane.INFORMATION_MESSAGE);
- }
- });
- menuBar.add(mnNewMenu_Info);
-
- c = this;
}// end constructor