summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-10-27 14:41:14 +0100
committerSimon Rettberg2015-10-27 14:41:14 +0100
commit671c63c5a10aa477612765681120a02d5fbd2523 (patch)
treec874595858d9fae708f4f4f0b51d1eb60be6db05 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
parent[client] add missing class (diff)
downloadtutor-module-671c63c5a10aa477612765681120a02d5fbd2523.tar.gz
tutor-module-671c63c5a10aa477612765681120a02d5fbd2523.tar.xz
tutor-module-671c63c5a10aa477612765681120a02d5fbd2523.zip
[client] Refactoring: Use TextChangeListener instead of DocumentListener
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.java18
1 files changed, 3 insertions, 15 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 a1591370..d81ed319 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
@@ -24,8 +24,6 @@ import javax.swing.ListSelectionModel;
import javax.swing.RowFilter;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
@@ -39,6 +37,7 @@ import org.openslx.dozmod.gui.MainWindow;
import org.openslx.dozmod.gui.control.table.ListTable.ListModel;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.PopupMenu;
+import org.openslx.dozmod.gui.helper.TextChangeListener;
import org.openslx.dozmod.gui.window.LectureDetailsWindow.LectureUpdatedCallback;
import org.openslx.dozmod.gui.window.layout.LectureListWindowLayout;
import org.openslx.dozmod.gui.wizard.LectureWizard;
@@ -147,20 +146,9 @@ public class LectureListWindow extends LectureListWindowLayout {
lectureTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
// filter the objects in the table depending on the search field
- searchTextField.getDocument().addDocumentListener(new DocumentListener() {
+ searchTextField.getDocument().addDocumentListener(new TextChangeListener() {
@Override
- public void removeUpdate(DocumentEvent e) {
- changedUpdate(e);
- }
-
- @Override
- public void insertUpdate(DocumentEvent e) {
- changedUpdate(e);
- }
-
- @Override
- public void changedUpdate(DocumentEvent e) {
- // stuff
+ public void changed() {
String str = searchTextField.getText();
if (str == null || str.isEmpty()) {
searchFieldPattern = null;