summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java
diff options
context:
space:
mode:
authorStephan Schwaer2015-10-07 15:30:03 +0200
committerStephan Schwaer2015-10-07 15:30:03 +0200
commit38a7f0754e8763333ebb1b78702d90aec037b451 (patch)
treedfd17dae582ae31ab4e80c210f3f610420c413e3 /dozentenmodul/src/main/java
parent[client] Calculate and show the days between the selected dates in lecture cr... (diff)
downloadtutor-module-38a7f0754e8763333ebb1b78702d90aec037b451.tar.gz
tutor-module-38a7f0754e8763333ebb1b78702d90aec037b451.tar.xz
tutor-module-38a7f0754e8763333ebb1b78702d90aec037b451.zip
[client] Made dedicated buttons in the mainWindow. Changed string in lecture wizard.
Diffstat (limited to 'dozentenmodul/src/main/java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java2
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java17
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java6
3 files changed, 16 insertions, 9 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java
index ba6db888..0fbd5c0a 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java
@@ -21,7 +21,7 @@ public class MainMenuWindow extends MainMenuWindowLayout {
});
// function for lecturesButton
- lecturesButton.addActionListener(new ActionListener() {
+ lectureButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
MainWindow.showPage(LectureListWindow.class);
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 ce93057f..eb52ffb2 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
@@ -51,21 +51,28 @@ public abstract class MainMenuWindowLayout extends CompositePage {
+ "2) Zu Veranstaltungen gehörende Virtuelle Maschinen herunterladen<br>&nbsp;</html>";
// buttons
+ protected JLabel vmImage;
+ protected JLabel lectureImage;
protected JButton vmButton;
- protected JButton lecturesButton;
+ protected JButton lectureButton;
public MainMenuWindowLayout() {
this.setBorder(BorderFactory.createTitledBorder("bwSuite-Hauptmenü"));
GridManager grid = new GridManager(this, 2);
-
- vmButton = new JButton(ResourceLoader.getIcon("/img/virtualization.png", "VM-Übersicht"));
+
+ vmImage = new JLabel(ResourceLoader.getIcon("/img/virtualization.png", "VM-Übersicht"));
JLabel vmInfoLabel = new JLabel(vmInfo);
vmInfoLabel.setVerticalAlignment(JLabel.TOP);
- lecturesButton = new JButton(ResourceLoader.getIcon("/img/lecture.png", "Veranstaltungen"));
+ lectureImage = new JLabel(ResourceLoader.getIcon("/img/lecture.png", "Veranstaltungen"));
JLabel lecturesInfoLabel = new JLabel(lecturesInfo);
lecturesInfoLabel.setVerticalAlignment(JLabel.TOP);
+ vmButton = new JButton("Zu den Images");
+ lectureButton = new JButton("Zu den Veranstaltungen");
+ grid.add(vmImage).fill(true, false).expand(true, false);
+ grid.add(lectureImage).fill(true, false).expand(true, false);
+ grid.nextRow();
grid.add(vmButton).fill(true, false).expand(true, false);
- grid.add(lecturesButton).fill(true, false).expand(true, false);
+ grid.add(lectureButton).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);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java
index cd229635..3e603935 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java
@@ -95,7 +95,8 @@ public class LectureCreationPage extends LectureCreationPageLayout {
}
/**
- * Calculate the days between the selected dates and update the corresponding label.
+ * Calculate the days between the selected dates and update the
+ * corresponding label.
*/
private void calculateDatePeriod() {
Date start = DateTimeHelper.getDateFrom(startDate, startTime);
@@ -104,8 +105,7 @@ public class LectureCreationPage extends LectureCreationPageLayout {
lblCalcPeriod.setText("Endzeitpunkt ist vor Startzeitpunkt!");
} else {
int numberOfDays = DateTimeHelper.calculatePeriodInDays(start, end);
- String dayString = numberOfDays == 1 ? " Tag" : " Tage";
- lblCalcPeriod.setText(numberOfDays + dayString);
+ lblCalcPeriod.setText(numberOfDays + "Tag(e)");
}
}