1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
package org.openslx.dozmod.gui.window.layout;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JLabel;
import org.openslx.dozmod.Branding;
import org.openslx.dozmod.gui.helper.CompositePage;
import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.util.ResourceLoader;
@SuppressWarnings("serial")
public abstract class MainMenuWindowLayout extends CompositePage {
// text for info for the vms selection
protected String vmInfo = "<html><b>Übersicht Virtueller Maschinen</b><br>"
+ "Zur Übersicht über die verfügbaren Virtuellen Maschinen wechseln.<br>Hier können Sie:<br><br>"
+ "1) Veranstaltungen auf Basis einer Virtuellen Maschine erstellen<br>"
+ "2) Neue Virtuelle Maschinen hochladen<br>"
+ "3) Virtuelle Maschinen herunterladen<br>"
+ "4) Virtuelle Maschinen bearbeiten und löschen</html>";
// text for the info for the lecture selection
protected String lecturesInfo = "<html><b>Übersicht Veranstaltungen</b><br>"
+ "Zur Übersicht über verfügbare Veranstaltungen wechseln.<br>Hier können Sie:<br><br>"
+ "1) Veranstaltungen bearbeiten oder löschen<br>"
+ "2) Zu Veranstaltungen gehörende Virtuelle Maschinen herunterladen<br> </html>";
// buttons
protected final JLabel lblVirtualMachinesLogo;
protected final JLabel lblLectureLogo;
protected final JButton btnShowVirtualMachines;
protected final JButton btnShowLectures;
public MainMenuWindowLayout() {
this.setBorder(BorderFactory.createTitledBorder(Branding.getApplicationName() + " Hauptmenü"));
GridManager grid = new GridManager(this, 2);
lblVirtualMachinesLogo = new JLabel(ResourceLoader.getIcon("/img/virtualization.png", "VM-Übersicht"));
JLabel vmInfoLabel = new JLabel(vmInfo);
vmInfoLabel.setVerticalAlignment(JLabel.TOP);
lblLectureLogo = new JLabel(ResourceLoader.getIcon("/img/lecture.png", "Veranstaltungen"));
JLabel lecturesInfoLabel = new JLabel(lecturesInfo);
lecturesInfoLabel.setVerticalAlignment(JLabel.TOP);
btnShowVirtualMachines = new JButton("Zu den VMs");
btnShowLectures = new JButton("Zu den Veranstaltungen");
grid.add(lblVirtualMachinesLogo).fill(true, false).expand(true, false);
grid.add(lblLectureLogo).fill(true, false).expand(true, false);
grid.nextRow();
grid.add(btnShowVirtualMachines).fill(true, false).expand(true, false);
grid.add(btnShowLectures).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();
grid.finish(true);
}
}
|