summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
diff options
context:
space:
mode:
authorJonathan Bauer2015-08-17 16:32:52 +0200
committerJonathan Bauer2015-08-17 16:32:52 +0200
commit0e76d87b960b1e88f858ab214bfd084a5763763e (patch)
treee63833eabce090f0789a3b3fbcb3114cb84a6bcc /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
parentMerge branch 'v1.1' of git.openslx.org:openslx-ng/tutor-module into v1.1 (diff)
downloadtutor-module-0e76d87b960b1e88f858ab214bfd084a5763763e.tar.gz
tutor-module-0e76d87b960b1e88f858ab214bfd084a5763763e.tar.xz
tutor-module-0e76d87b960b1e88f858ab214bfd084a5763763e.zip
[client] callback to imageListWindow if image details was updated to force refresh of the list
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
index a3de81a9..4e2abfe5 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
@@ -51,14 +51,19 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
private final ImageDetailsWindow me = this;
+ public interface ImageUpdatedCallback {
+ public void updated();
+ }
+ private ImageUpdatedCallback callback = null;
private ImageDetailsRead image = null;
private JMenuItem popupItemNew = new JMenuItem("Neue Veranstaltung");
private JMenuItem popupItemDownload = new JMenuItem("Download");
private JMenuItem popupItemDelete = new JMenuItem("Löschen");
- public ImageDetailsWindow(Frame modalParent) {
+ public ImageDetailsWindow(Frame modalParent, ImageUpdatedCallback callback) {
super(modalParent);
+ this.callback = callback;
setFocusable(true);
btnSaveChanges.setEnabled(false);
txtVersion.setEditable(false);
@@ -220,8 +225,9 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
ThriftError.showMessage(me, LOGGER, e, "Fail to update image details to satellite");
return;
}
- Gui.showMessageBox(me, "Erfolgreich gespeichert.", MessageType.INFO, null, null);
+ // no success message I'd say...
btnSaveChanges.setEnabled(false);
+ callback.updated();
}
});
}
@@ -371,8 +377,8 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
* @param modalParent parent of this window
* @param imageBaseId id of the image to set the details of
*/
- public static void open(Frame modalParent, String imageBaseId) {
- ImageDetailsWindow win = new ImageDetailsWindow(modalParent);
+ public static void open(Frame modalParent, String imageBaseId, ImageUpdatedCallback callback) {
+ ImageDetailsWindow win = new ImageDetailsWindow(modalParent, callback);
win.setImage(imageBaseId);
}