summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java
diff options
context:
space:
mode:
authorJonathan Bauer2016-09-02 17:33:30 +0200
committerJonathan Bauer2016-09-02 17:33:30 +0200
commit2de89cedb456c0491c0573f35521f9a2acdc28b6 (patch)
tree8f561ee24fa9bc70ed8d724136f2babe8b2f4005 /dozentenmodul/src/main/java
parent[client] splitted netrules & runscript tab/panel/w/e (diff)
downloadtutor-module-2de89cedb456c0491c0573f35521f9a2acdc28b6.tar.gz
tutor-module-2de89cedb456c0491c0573f35521f9a2acdc28b6.tar.xz
tutor-module-2de89cedb456c0491c0573f35521f9a2acdc28b6.zip
[client] oops
Diffstat (limited to 'dozentenmodul/src/main/java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureNetrulesWindowLayout.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureNetrulesWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureNetrulesWindowLayout.java
new file mode 100644
index 00000000..31a1a929
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureNetrulesWindowLayout.java
@@ -0,0 +1,56 @@
+package org.openslx.dozmod.gui.window.layout;
+
+import java.awt.BorderLayout;
+import java.awt.Window;
+
+import javax.swing.BorderFactory;
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+
+import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.control.NetrulesConfigurator;
+
+public class LectureNetrulesWindowLayout extends JDialog {
+
+ private static final long serialVersionUID = 5565439063675405598L;
+
+ private final static String txtTitle = "Erweiterte Einstellungen";
+ private final static String txtButtonClose = "Abbrechen";
+ private final static String txtButtonSave = "Übernehmen";
+
+ protected final NetrulesConfigurator ctlNetrulesConfigurator;
+
+ private final JPanel pnlBottomButtons;
+ protected final JButton btnSave;
+ protected final JButton btnClose;
+
+ public LectureNetrulesWindowLayout(Window modalParent) {
+ super(modalParent, txtTitle, modalParent != null ? ModalityType.APPLICATION_MODAL
+ : ModalityType.MODELESS);
+
+ // the main content widget
+ ctlNetrulesConfigurator = new NetrulesConfigurator();
+
+ // init the layout
+ getContentPane().setLayout(new BorderLayout());
+ getContentPane().add(ctlNetrulesConfigurator, BorderLayout.CENTER);
+
+ // bottom panel for controls
+ pnlBottomButtons = new JPanel();
+ pnlBottomButtons.setLayout(new BoxLayout(pnlBottomButtons, BoxLayout.LINE_AXIS));
+ pnlBottomButtons.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+ btnClose = new JButton(txtButtonClose);
+ btnSave = new JButton(txtButtonSave);
+ pnlBottomButtons.add(Box.createHorizontalGlue());
+ pnlBottomButtons.add(btnClose);
+ pnlBottomButtons.add(btnSave);
+ getContentPane().add(pnlBottomButtons, BorderLayout.PAGE_END);
+
+ setPreferredSize(Gui.getScaledDimension(500, 400));
+ pack();
+ Gui.centerShellOverShell(modalParent, this);
+ }
+}