summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
diff options
context:
space:
mode:
authorJonathan Bauer2015-08-17 13:20:56 +0200
committerJonathan Bauer2015-08-17 13:20:56 +0200
commit24cfe00266a5aea828e3577e05144f2592a44167 (patch)
tree552f49afa7a3fe12d6096e2672fedd184904d077 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
parentMerge branch 'v1.1' of git.openslx.org:openslx-ng/tutor-module into v1.1 (diff)
downloadtutor-module-24cfe00266a5aea828e3577e05144f2592a44167.tar.gz
tutor-module-24cfe00266a5aea828e3577e05144f2592a44167.tar.xz
tutor-module-24cfe00266a5aea828e3577e05144f2592a44167.zip
[client] function for edit button in lecture 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.java77
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();
+ }
+
}