diff options
author | Stephan Schwaer | 2015-09-30 17:13:11 +0200 |
---|---|---|
committer | Stephan Schwaer | 2015-09-30 17:13:11 +0200 |
commit | 9076efbce0615190e8e2b6fb1539da627da17fcd (patch) | |
tree | d9af1434c87235a3e353bfc546fcc5841201d4aa /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java | |
parent | [client] Added linkedLectureCound in imageDetailsWindow. (diff) | |
download | tutor-module-9076efbce0615190e8e2b6fb1539da627da17fcd.tar.gz tutor-module-9076efbce0615190e8e2b6fb1539da627da17fcd.tar.xz tutor-module-9076efbce0615190e8e2b6fb1539da627da17fcd.zip |
[client] Changed keylisteners in loginWindow to keyBindings. Added some Keybindings to lecture- and image tables.
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java index 5bce19b4..071697cd 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java @@ -155,11 +155,7 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements btnClose.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - if (metadataChanged && !Gui.showMessageBox(me, - "Änderungen werden verworfen, wollen Sie wirklich abbrechen?", - MessageType.QUESTION_YESNO, LOGGER, null)) - return; - dispose(); + safeClose(); } }); btnDownloadImage.addActionListener(new ActionListener() { @@ -181,10 +177,9 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements @Override public void userAdded(UserInfo user, UserListWindow window) { window.dispose(); - if (Gui.showMessageBox(me, - "Sind Sie sicher, dass sie die Besitzerrechte an " - + "einen anderen Account übertragen wollen?", - MessageType.QUESTION_YESNO, LOGGER, null)) + if (Gui.showMessageBox(me, "Sind Sie sicher, dass sie die Besitzerrechte an " + + "einen anderen Account übertragen wollen?", MessageType.QUESTION_YESNO, + LOGGER, null)) setLectureOwner(user); } }, "Besitzer festlegen", lecture.ownerId); @@ -274,7 +269,7 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements * 'image' * members to its metadata. This method will fetch the information from the * sat - * + * * @param lectureId the id of the lecture to be displayed */ public void setLecture(final String lectureId) { @@ -390,8 +385,8 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements cboVersions.setModel(new DefaultComboBoxModel<ImageVersionDetails>( versions.toArray(new ImageVersionDetails[versions.size()]))); - cboVersions.setSelectedItem( - new ImageVersionDetails(lecture.getImageVersionId(), 0, 0, 0, null, true, true, true, null)); + cboVersions.setSelectedItem(new ImageVersionDetails(lecture.getImageVersionId(), 0, 0, 0, null, true, + true, true, null)); } /** @@ -598,8 +593,7 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements changed = !txtTitle.getText().equals(lecture.getLectureName()) || !txtDescription.getText().equals(lecture.getDescription()) || !currentVersion.getVersionId().equals(lecture.getImageVersionId()) - || (DateTimeHelper.getDateFrom(startDate, startTime).getTime() / 1000L) != lecture - .getStartTime() + || (DateTimeHelper.getDateFrom(startDate, startTime).getTime() / 1000L) != lecture.getStartTime() || (DateTimeHelper.getDateFrom(endDate, endTime).getTime() / 1000L) != lecture.getEndTime() || chkAutoUpdate.isSelected() != lecture.autoUpdate || chkIsExam.isSelected() != lecture.isExam @@ -679,7 +673,7 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements */ private void safeClose() { if ((metadataChanged || permissionsChanged) - && !Gui.showMessageBox(me, "Änderungen werden verworfen, wollen Sie wirklich abbrechen?", + && !Gui.showMessageBox(me, "Änderungen werden verworfen, wollen Sie wirklich schließen?", MessageType.QUESTION_YESNO, null, null)) return; dispose(); |