diff options
| author | Jonathan Bauer | 2014-09-22 16:55:49 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2014-09-22 16:55:49 +0200 |
| commit | 8379b2e4a5dd76fcbd344b7a152dc14629f64ae9 (patch) | |
| tree | 3b5082edd282f0143b5ea67ebf3f0956b8eed814 /dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java | |
| parent | [client] NEW: Logging mechanisms for the client (diff) | |
| download | tutor-module-8379b2e4a5dd76fcbd344b7a152dc14629f64ae9.tar.gz tutor-module-8379b2e4a5dd76fcbd344b7a152dc14629f64ae9.tar.xz tutor-module-8379b2e4a5dd76fcbd344b7a152dc14629f64ae9.zip | |
[client] do commit the changes :)
Diffstat (limited to 'dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java | 49 |
1 files changed, 16 insertions, 33 deletions
diff --git a/dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java b/dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java index 8abf8080..65335f74 100644 --- a/dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java +++ b/dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java @@ -51,6 +51,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; +import org.apache.log4j.Logger; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -68,6 +69,8 @@ import util.OpenLinks; @SuppressWarnings("serial") public class MainMenue_GUI extends JFrame { + private final static Logger LOGGER = Logger.getLogger(MainMenue_GUI.class); + private final JPanel contentPanel = new JPanel(); String[] result; String descNewImage, descEditImage, descDeleteImage, descSearchImage, @@ -92,10 +95,6 @@ public class MainMenue_GUI extends JFrame { */ public MainMenue_GUI() { - // Leerzeile auf Konsole bei Rueckkehr ins Hauptmenue fuer leichteres - // Lesen - System.out.println("\n"); - addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { @@ -365,7 +364,7 @@ public class MainMenue_GUI extends JFrame { .setText("Um detaillierte Informationen zu erhalten, fahren Sie bitte mit der Maus über die Grafik."); txtpnUmDetaillierteInformationen.setEditable(false); txtpnUmDetaillierteInformationen.setBackground(SystemColor.menu); - txtpnUmDetaillierteInformationen.setBounds(10, 188, 509, 22); + txtpnUmDetaillierteInformationen.setBounds(10, 174, 509, 36); contentPanel.add(txtpnUmDetaillierteInformationen); { JPanel buttonPane = new JPanel(); @@ -534,11 +533,11 @@ public class MainMenue_GUI extends JFrame { }// end processRights() public void setRoleRights() { - // Set rights for user, depending on the role that is returned by the - // masterserver + // Set rights for user, depending on the role + // returned by the masterserver - System.out.println("Ihre Rolle ist nun: " - + person.verantwortlicher.getRole()); + LOGGER.info("Role: " + person.verantwortlicher.getRole()); + // role==Student if (person.verantwortlicher.getRole().equals("Student")) { ImageRights.rights.setRead(1); @@ -546,12 +545,6 @@ public class MainMenue_GUI extends JFrame { ImageRights.rights.setChangePermission(0); ImageRights.rights.setAdmin(0); ImageRights.rights.setLinkAllowed(0); - System.out.println("Rechte (r,w,cp,a,la): " - + ImageRights.rights.getRead() + "," - + ImageRights.rights.getWrite() + "," - + ImageRights.rights.getChangePermission() + "," - + ImageRights.rights.getAdmin() + "," - + ImageRights.rights.getLinkAllowed()); } else if (person.verantwortlicher.getRole().equals("Dozent")) { // role==Dozent ImageRights.rights.setRead(1); @@ -559,37 +552,27 @@ public class MainMenue_GUI extends JFrame { ImageRights.rights.setChangePermission(0); ImageRights.rights.setAdmin(0); ImageRights.rights.setLinkAllowed(1); - System.out.println("Rechte (r,w,cp,a,la): " - + ImageRights.rights.getRead() + "," - + ImageRights.rights.getWrite() + "," - + ImageRights.rights.getChangePermission() + "," - + ImageRights.rights.getAdmin() + "," - + ImageRights.rights.getLinkAllowed()); } else if (person.verantwortlicher.getRole().equals("Admin")) { // role==Admin ImageRights.rights.setRead(1); ImageRights.rights.setWrite(1); ImageRights.rights.setChangePermission(1); ImageRights.rights.setAdmin(1); ImageRights.rights.setLinkAllowed(1); - System.out.println("Rechte (r,w,cp,a,la): " - + ImageRights.rights.getRead() + "," - + ImageRights.rights.getWrite() + "," - + ImageRights.rights.getChangePermission() + "," - + ImageRights.rights.getAdmin() + "," - + ImageRights.rights.getLinkAllowed()); } else { // role==Nothing ImageRights.rights.setRead(0); ImageRights.rights.setWrite(0); ImageRights.rights.setChangePermission(0); ImageRights.rights.setAdmin(0); ImageRights.rights.setLinkAllowed(0); - System.out.println("Rechte (r,w,cp,a,la): " - + ImageRights.rights.getRead() + "," - + ImageRights.rights.getWrite() + "," - + ImageRights.rights.getChangePermission() + "," - + ImageRights.rights.getAdmin() + "," - + ImageRights.rights.getLinkAllowed()); }// end if else + + // always print rights information + LOGGER.info("Rights: (r, w, cp, a, la) = (" + + ImageRights.rights.getRead() + ", " + + ImageRights.rights.getWrite() + ", " + + ImageRights.rights.getChangePermission() + ", " + + ImageRights.rights.getAdmin() + ", " + + ImageRights.rights.getLinkAllowed() + ")"); }// end setRoleRights public void setCorrectRadioButton() { |
