summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java
diff options
context:
space:
mode:
authorJonathan Bauer2015-08-17 17:04:38 +0200
committerJonathan Bauer2015-08-17 17:04:38 +0200
commit921fafabba0ddf433c5bfb08ad1f3e2a519542ca (patch)
treec5a8a2c460850849fec4fe896484231e93e7aaba /dozentenmodul/src/main/java
parent[client] cleanup the messy image list code... (diff)
downloadtutor-module-921fafabba0ddf433c5bfb08ad1f3e2a519542ca.tar.gz
tutor-module-921fafabba0ddf433c5bfb08ad1f3e2a519542ca.tar.xz
tutor-module-921fafabba0ddf433c5bfb08ad1f3e2a519542ca.zip
[client] more cleanup
Diffstat (limited to 'dozentenmodul/src/main/java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java60
1 files changed, 38 insertions, 22 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java
index 8f338e5f..98586c4c 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java
@@ -43,7 +43,8 @@ import org.openslx.util.QuickTimer;
import org.openslx.util.QuickTimer.Task;
/**
- * @author joe
+ *
+ * @author Jonathan Bauer
*
*/
@SuppressWarnings("serial")
@@ -51,18 +52,29 @@ public class ImageListWindow extends ImageListWindowLayout {
private final static Logger LOGGER = Logger.getLogger(ImageListWindow.class);
+ /**
+ * Self-reference
+ */
public final ImageListWindow me = this;
+ /**
+ * Popup menu items
+ */
private final JMenuItem popupItemNewLecture = new JMenuItem("Neue Veranstaltung");
private final JMenuItem popupItemDelete = new JMenuItem("Löschen");
private final JMenuItem popupItemDownload = new JMenuItem("Download");
+ /**
+ * Constructor
+ */
public ImageListWindow() {
super();
+ /**
+ * Filter field and combobox listeners
+ */
// filter the objects in the table depending on the search field
searchTextField.getDocument().addDocumentListener(new DocumentListener() {
-
@Override
public void removeUpdate(DocumentEvent e) {
changedUpdate(e);
@@ -80,7 +92,16 @@ public class ImageListWindow extends ImageListWindowLayout {
}
});
- // Setup popup menu for the right panel
+ filterCbo.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ applyFilterOnTable();
+ }
+ });
+
+ /**
+ * Popup menu for the version table on the right side
+ */
final PopupMenu pop = new PopupMenu(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (e.getSource().equals(popupItemNewLecture)) {
@@ -102,13 +123,9 @@ public class ImageListWindow extends ImageListWindowLayout {
pop.addSeparator();
pop.addMenuItem(popupItemDelete);
- filterCbo.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- applyFilterOnTable();
- }
- });
-
+ /**
+ * Table listeners
+ */
imageTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
@@ -157,6 +174,10 @@ public class ImageListWindow extends ImageListWindowLayout {
}
}
});
+
+ /**
+ * Bottom button panel listeners
+ */
newButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -164,30 +185,25 @@ public class ImageListWindow extends ImageListWindowLayout {
refreshList(true);
}
});
+ newLectureButton.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ startLectureWizard(imageTable.getSelectedItem());
+ }
+ });
downloadButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
performImageDownload(imageTable.getSelectedItem());
}
});
-
- // delete lecture
deleteButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
deleteLatestVersion(getSelectedImage());
}
});
-
- newLectureButton.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- startLectureWizard(imageTable.getSelectedItem());
-
- }
- });
- // return to mainMenu
backButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -325,7 +341,7 @@ public class ImageListWindow extends ImageListWindowLayout {
}
/********************************************************************************
*
- * Helpers triggering the remote thrift calls
+ * Helpers triggering the actual actions
*
********************************************************************************/