summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-08-19 14:17:27 +0200
committerSimon Rettberg2015-08-19 14:17:27 +0200
commit4f8125514ab868074eef71a6cf3cb79738667745 (patch)
tree8642e4c42a60696a9a4b7078992b549e355977a4 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
parent[client] Delay refresh of image list only for certain events (diff)
downloadtutor-module-4f8125514ab868074eef71a6cf3cb79738667745.tar.gz
tutor-module-4f8125514ab868074eef71a6cf3cb79738667745.tar.xz
tutor-module-4f8125514ab868074eef71a6cf3cb79738667745.zip
[client] F5 = refresh in lecture and image list
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
index 82f1abd5..6d80aecb 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
@@ -3,6 +3,8 @@ package org.openslx.dozmod.gui.window;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
@@ -25,11 +27,10 @@ import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.window.layout.LectureListWindowLayout;
import org.openslx.dozmod.thrift.Session;
import org.openslx.dozmod.thrift.cache.LectureCache;
-import org.openslx.dozmod.thrift.cache.UserCache;
-import org.openslx.dozmod.util.FormatHelper;
import org.openslx.util.QuickTimer;
import org.openslx.util.QuickTimer.Task;
+@SuppressWarnings("serial")
public class LectureListWindow extends LectureListWindowLayout {
private final static Logger LOGGER = Logger.getLogger(LectureListWindow.class);
@@ -75,6 +76,15 @@ public class LectureListWindow extends LectureListWindowLayout {
}
});
+ lectureTable.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyReleased(KeyEvent e) {
+ if (e.getKeyCode() == KeyEvent.VK_F5) {
+ refreshList(true);
+ }
+ }
+ });
+
newButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -170,11 +180,11 @@ public class LectureListWindow extends LectureListWindowLayout {
}
}
- private void refreshList() {
+ private void refreshList(final boolean force) {
QuickTimer.scheduleOnce(new Task() {
@Override
public void fire() {
- final List<LectureSummary> lectureList = LectureCache.get(false);
+ final List<LectureSummary> lectureList = LectureCache.get(force);
Gui.asyncExec(new Runnable() {
@Override
public void run() {
@@ -192,7 +202,7 @@ public class LectureListWindow extends LectureListWindowLayout {
@Override
public void requestShow() {
- refreshList();
+ refreshList(false);
}
}