diff options
author | Simon Rettberg | 2018-06-22 18:58:02 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-06-22 18:58:02 +0200 |
commit | 00195150c868cbe76fcf6e1aee8fdd6f1e60e95b (patch) | |
tree | 60c024e39b62bac02ecad2a87da27660739688f9 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java | |
parent | [client] Sanitize class/var names, split up control package (diff) | |
download | tutor-module-00195150c868cbe76fcf6e1aee8fdd6f1e60e95b.tar.gz tutor-module-00195150c868cbe76fcf6e1aee8fdd6f1e60e95b.tar.xz tutor-module-00195150c868cbe76fcf6e1aee8fdd6f1e60e95b.zip |
[client] Move netrules configurator into tab
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java index 1508d95e..091c1133 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java @@ -30,6 +30,7 @@ import org.openslx.bwlp.thrift.iface.ImageVersionDetails; import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.configurator.LdapFilterConfigurator; import org.openslx.dozmod.gui.configurator.LecturePermissionConfigurator; +import org.openslx.dozmod.gui.configurator.NetrulesConfigurator; import org.openslx.dozmod.gui.configurator.NetshareConfigurator; import org.openslx.dozmod.gui.configurator.RunscriptConfigurator; import org.openslx.dozmod.gui.control.ComboBox; @@ -75,8 +76,6 @@ public abstract class LectureDetailsWindowLayout extends JDialog { protected final JTextField txtId; protected final QLabel lblUseCount; - protected final JButton btnNetrules; - protected final QLabel lblError; protected final JButton btnSaveChanges; protected final JButton btnClose; @@ -87,31 +86,25 @@ public abstract class LectureDetailsWindowLayout extends JDialog { protected final JSpinner spnStartTime; protected final JSpinner spnEndTime; - protected JTabbedPane pnlTabs; + protected final JTabbedPane pnlTabs; protected final LecturePermissionConfigurator ctlPermissionManager; protected final LocationSelector ctlLocationSelector; protected final RunscriptConfigurator ctlRunscriptConfigurator; protected final NetshareConfigurator ctlNetshareConfigurator; protected final LdapFilterConfigurator ctlLdapFilterConfigurator; - - private static final Properties pickerStrings = new Properties(); - - protected JCheckBox chkCustomPermEdit; - protected JCheckBox chkCustomPermAdmin; - protected JPanel pnlTabGeneral; - protected JPanel pnlTabInfo; - protected JPanel pnlTabRestrictions; - protected JPanel pnlTabPermissions; - protected JPanel pnlTabLocations; - protected JPanel pnlTabRunscript; - protected JPanel pnlTabNetshare; - protected JPanel pnlTabLdapFilter; - - static { - pickerStrings.put("text.today", "Heute"); - pickerStrings.put("text.month", "Monat"); - pickerStrings.put("text.year", "Jahr"); - } + protected final NetrulesConfigurator ctlNetrulesConfigurator; + + protected final JCheckBox chkCustomPermEdit; + protected final JCheckBox chkCustomPermAdmin; + protected final JPanel pnlTabGeneral; + protected final JPanel pnlTabInfo; + protected final JPanel pnlTabNetrules; + protected final JPanel pnlTabRestrictions; + protected final JPanel pnlTabPermissions; + protected final JPanel pnlTabLocations; + protected final JPanel pnlTabRunscript; + protected final JPanel pnlTabNetshare; + protected final JPanel pnlTabLdapFilter; public LectureDetailsWindowLayout(Frame modalParent) { super(modalParent, "Veranstaltungsdetails", ModalityType.APPLICATION_MODAL); @@ -171,6 +164,7 @@ public abstract class LectureDetailsWindowLayout extends JDialog { grdInfo.add(lblUseCount, 2); grdInfo.finish(true); + // Make general tab pnlTabGeneral = new JPanel(); pnlTabGeneral.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); GridManager grdGeneral = new GridManager(pnlTabGeneral, 5, true, new Insets(3, 3, 3, 3)); @@ -278,28 +272,35 @@ public abstract class LectureDetailsWindowLayout extends JDialog { grdGeneral.add(chkIsActive, 4); grdGeneral.nextRow(); grdGeneral.finish(true); - - pnlTabRestrictions = new JPanel(); - GridManager grdRestrictions = new GridManager(pnlTabRestrictions, 2, true, new Insets(9, 4, 2, 4)); + Insets descriptionInset = new Insets(2, 4, 2, 4); Insets firstInset = new Insets(12, 4, 2, 4); - + + // Network rules + pnlTabNetrules = new JPanel(); + GridManager grdNetrules = new GridManager(pnlTabNetrules, 1, true, new Insets(9, 4, 2, 4)); // "restrictions": internet access / usb access / exam chkHasInternetAccess = new JCheckBox("Netzwerk-/Internetzugriff zulassen"); - btnNetrules = new JButton("Ausnahmen..."); - grdRestrictions.add(chkHasInternetAccess).fill(true, false).expand(true, false).insets(firstInset); - grdRestrictions.add(btnNetrules).fill(true, false).expand(true, false).insets(firstInset); - grdRestrictions.nextRow(); - grdRestrictions.add( + grdNetrules.add(chkHasInternetAccess).expand(true, false).insets(firstInset); + grdNetrules.nextRow(); + grdNetrules.add( new WordWrapLabel( "Legen Sie hier fest, ob die Veranstaltung Zugriff zum Internet haben soll." - + " Unter 'Ausnahmen' können Sie bestimmte Adressen und Services" - + " ein- oder ausschließen.", false, true), 2) + + " In der Liste können Sie bestimmte Adressen und Services" + + " ein- oder ausschließen.", false, true)) .fill(true, false) .expand(true, false) .insets(descriptionInset); - grdRestrictions.nextRow(); - + grdNetrules.nextRow(); + ctlNetrulesConfigurator = new NetrulesConfigurator(); + grdNetrules.add(ctlNetrulesConfigurator).fill(true, true).expand(true, true); + grdNetrules.nextRow(); + grdNetrules.finish(false); + + // Tab restrictions + pnlTabRestrictions = new JPanel(); + GridManager grdRestrictions = new GridManager(pnlTabRestrictions, 2, true, new Insets(9, 4, 2, 4)); + chkHasUsbAccess = new JCheckBox("Externe Speichermedien zulassen"); grdRestrictions.add(chkHasUsbAccess, 2); grdRestrictions.nextRow(); @@ -399,6 +400,7 @@ public abstract class LectureDetailsWindowLayout extends JDialog { pnlTabs.addTab("Allgemein", pnlTabGeneral); if (Session.isLectureRestrictionsSupported()) { pnlTabs.addTab("Beschränkungen", pnlTabRestrictions); + pnlTabs.addTab("Firewall", pnlTabNetrules); } if (MetaDataCache.getLocations() != null && !MetaDataCache.getLocations().isEmpty()) { pnlTabs.addTab("Raumauswahl", pnlTabLocations); |