diff options
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.java | 77 |
1 files changed, 32 insertions, 45 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 cabcc4f1..7656f8bf 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 @@ -70,27 +70,7 @@ public class LectureListWindow extends LectureListWindowLayout { @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { - LectureSummary lecture = lectureTable.getSelectedItem(); - if (lecture == null) - return; - LectureDetailsWindow.open((JFrame)SwingUtilities.getWindowAncestor(me), lecture.getLectureId()); - } - } - }); - - - lectureTable.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - if (e.getClickCount() == 2) { - final LectureSummary lecture = lectureTable.getSelectedItem(); - if (lecture == null) - return; - /* TODO for lecture - ImageDetailsWindow popup = new ImageDetailsWindow(SwingUtilities.windowForComponent(me)); - if (popup != null) - popup.setImage(image.getImageBaseId()); - */ + openSelectedLectureDetails(); } } }); @@ -108,7 +88,7 @@ public class LectureListWindow extends LectureListWindowLayout { editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - // TODO Auto-generated method stub + openSelectedLectureDetails(); } }); @@ -129,29 +109,11 @@ public class LectureListWindow extends LectureListWindowLayout { }); } - private void refreshList() { - QuickTimer.scheduleOnce(new Task() { - @Override - public void fire() { - final List<LectureSummary> lectureList = LectureCache.get(false); - Gui.asyncExec(new Runnable() { - @Override - public void run() { - lectureTable.setData(lectureList, true); - } - }); - } - }); - } - - @Override - public boolean requestHide() { - return true; - } - - @Override - public void requestShow() { - refreshList(); + private void openSelectedLectureDetails() { + LectureSummary lecture = lectureTable.getSelectedItem(); + if (lecture == null) + return; + LectureDetailsWindow.open((JFrame)SwingUtilities.getWindowAncestor(me), lecture.getLectureId()); } private void applyFilterOnTable() { @@ -208,4 +170,29 @@ public class LectureListWindow extends LectureListWindowLayout { } } + private void refreshList() { + QuickTimer.scheduleOnce(new Task() { + @Override + public void fire() { + final List<LectureSummary> lectureList = LectureCache.get(false); + Gui.asyncExec(new Runnable() { + @Override + public void run() { + lectureTable.setData(lectureList, true); + } + }); + } + }); + } + + @Override + public boolean requestHide() { + return true; + } + + @Override + public void requestShow() { + refreshList(); + } + } |