diff options
author | Simon Rettberg | 2015-08-12 17:27:10 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-08-12 17:27:10 +0200 |
commit | fc7121a63378d811c04abcb28cf55e5cf02f28b8 (patch) | |
tree | 45d2e6c9ddea005cad8d6f45826701aa7ea4da14 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java | |
parent | [client] splitted lecture creation page into 2 creation- and options page (diff) | |
download | tutor-module-fc7121a63378d811c04abcb28cf55e5cf02f28b8.tar.gz tutor-module-fc7121a63378d811c04abcb28cf55e5cf02f28b8.tar.xz tutor-module-fc7121a63378d811c04abcb28cf55e5cf02f28b8.zip |
[client] New main menu design :)
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java index 2cd76be7..c1e57e8b 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java @@ -1,14 +1,12 @@ package org.openslx.dozmod.gui.window.layout; -import java.awt.GridLayout; - -import javax.swing.BoxLayout; +import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.border.TitledBorder; import org.openslx.dozmod.gui.helper.CompositePage; +import org.openslx.dozmod.gui.helper.GridManager; +import org.openslx.dozmod.util.ResourceLoader; /* * Structure/workflow should be: @@ -36,9 +34,10 @@ import org.openslx.dozmod.gui.helper.CompositePage; * will skip the login screen */ +@SuppressWarnings("serial") public abstract class MainMenuWindowLayout extends CompositePage { // text for info for the vms selection - protected String vmInfo = "Infotext VMs."; + protected String vmInfo = "... Infotext VMs..."; // text for the info for the lecture selection protected String lecturesInfo = "Infotext Veranstaltungen."; @@ -48,30 +47,22 @@ public abstract class MainMenuWindowLayout extends CompositePage { protected JButton lecturesButton; public MainMenuWindowLayout() { - super(new GridLayout(1, 2)); - - // group for the vm selection - JPanel vmGroup = new JPanel(); - vmGroup.setLayout(new BoxLayout(vmGroup, BoxLayout.PAGE_AXIS)); - vmGroup.setBorder(new TitledBorder("VM")); + this.setBorder(BorderFactory.createTitledBorder("bwLehrstuhl Hauptmenü")); + GridManager grid = new GridManager(this, 2); - vmButton = new JButton("VM-Übersicht"); + vmButton = new JButton(ResourceLoader.getIcon("/img/virtualization.png", "VM-Übersicht")); JLabel vmInfoLabel = new JLabel(vmInfo); + lecturesButton = new JButton(ResourceLoader.getIcon("/img/lecture.png", "Veranstaltungen")); + JLabel lecturesInfoLabel = new JLabel(lecturesInfo); - // group for the lecture selection - JPanel lecturesGroup = new JPanel(); - lecturesGroup.setLayout(new BoxLayout(lecturesGroup, BoxLayout.PAGE_AXIS)); - lecturesGroup.setBorder(new TitledBorder("Veranstaltungen")); + grid.add(vmButton).fill(true, false).expand(true, false); + grid.add(lecturesButton).fill(true, false).expand(true, false); + grid.nextRow(); + grid.add(vmInfoLabel).fill(true, true).expand(true, true); + grid.add(lecturesInfoLabel).fill(true, true).expand(true, true); + grid.nextRow(); - lecturesButton = new JButton("Veranstaltungen"); - JLabel lecturesInfoLabel = new JLabel(lecturesInfo); - - vmGroup.add(vmButton); - vmGroup.add(vmInfoLabel); - lecturesGroup.add(lecturesButton); - lecturesGroup.add(lecturesInfoLabel); - add(vmGroup); - add(lecturesGroup); + grid.finish(true); } } |