From fc7121a63378d811c04abcb28cf55e5cf02f28b8 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 12 Aug 2015 17:27:10 +0200 Subject: [client] New main menu design :) --- .../openslx/dozmod/gui/helper/CompositePage.java | 5 +++ .../gui/window/layout/MainMenuWindowLayout.java | 43 ++++++++------------- .../resources/img/Image_zu_Veranstaltung_HDD.png | Bin 34300 -> 0 bytes .../main/resources/img/e4_n_imgs2_bwl_vmc_v2.png | Bin 39124 -> 0 bytes dozentenmodul/src/main/resources/img/lecture.png | Bin 0 -> 120415 bytes .../src/main/resources/img/virtualization.png | Bin 0 -> 74228 bytes 6 files changed, 22 insertions(+), 26 deletions(-) delete mode 100644 dozentenmodul/src/main/resources/img/Image_zu_Veranstaltung_HDD.png delete mode 100644 dozentenmodul/src/main/resources/img/e4_n_imgs2_bwl_vmc_v2.png create mode 100644 dozentenmodul/src/main/resources/img/lecture.png create mode 100644 dozentenmodul/src/main/resources/img/virtualization.png diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/CompositePage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/CompositePage.java index 74d6fa96..3a80d2cd 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/CompositePage.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/CompositePage.java @@ -4,8 +4,13 @@ import java.awt.LayoutManager; import javax.swing.JPanel; +@SuppressWarnings("serial") public abstract class CompositePage extends JPanel { + public CompositePage() { + super(); + } + public CompositePage(LayoutManager layout) { super(layout); } 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); } } diff --git a/dozentenmodul/src/main/resources/img/Image_zu_Veranstaltung_HDD.png b/dozentenmodul/src/main/resources/img/Image_zu_Veranstaltung_HDD.png deleted file mode 100644 index 39b3bac6..00000000 Binary files a/dozentenmodul/src/main/resources/img/Image_zu_Veranstaltung_HDD.png and /dev/null differ diff --git a/dozentenmodul/src/main/resources/img/e4_n_imgs2_bwl_vmc_v2.png b/dozentenmodul/src/main/resources/img/e4_n_imgs2_bwl_vmc_v2.png deleted file mode 100644 index 95e8a293..00000000 Binary files a/dozentenmodul/src/main/resources/img/e4_n_imgs2_bwl_vmc_v2.png and /dev/null differ diff --git a/dozentenmodul/src/main/resources/img/lecture.png b/dozentenmodul/src/main/resources/img/lecture.png new file mode 100644 index 00000000..614c471b Binary files /dev/null and b/dozentenmodul/src/main/resources/img/lecture.png differ diff --git a/dozentenmodul/src/main/resources/img/virtualization.png b/dozentenmodul/src/main/resources/img/virtualization.png new file mode 100644 index 00000000..68af7625 Binary files /dev/null and b/dozentenmodul/src/main/resources/img/virtualization.png differ -- cgit v1.2.3-55-g7522