diff options
author | Kuersat Akmaz | 2020-10-19 13:01:19 +0200 |
---|---|---|
committer | Kuersat Akmaz | 2020-10-19 13:01:19 +0200 |
commit | c908cdfa615485608596e6e847cb0ffd2e34a148 (patch) | |
tree | 70e2d102f95e88c8122b033023bcd93dca95ae72 /dozentenmodul/src/main/java/org/openslx/dozmod/gui | |
parent | [client] solved CaseSensitivity issue in searchfunktion (diff) | |
download | tutor-module-c908cdfa615485608596e6e847cb0ffd2e34a148.tar.gz tutor-module-c908cdfa615485608596e6e847cb0ffd2e34a148.tar.xz tutor-module-c908cdfa615485608596e6e847cb0ffd2e34a148.zip |
[client] fixed search funktion
the search is now Pattern.Case_insensitive and Pattern.UNICODE_CASE
which was necessary to fix error
Issue : #3783
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java | 3 | ||||
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java index 6c2daea5..302332a5 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java @@ -155,12 +155,11 @@ public class ImageListViewer extends QLabel { @Override public void changed() { String str = txtSearch.getText(); - str = str.toLowerCase(); if (str == null || str.isEmpty()) { searchFieldPattern = null; } else { try { - searchFieldPattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE); + searchFieldPattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE); txtSearch.setForeground(UIManager.getColor("TextField.foreground")); } catch (PatternSyntaxException ex) { txtSearch.setForeground(Color.RED); 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 d223386d..54d0fee2 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 @@ -151,12 +151,11 @@ public class LectureListWindow extends LectureListWindowLayout { @Override public void changed() { String str = txtSearch.getText(); - str = str.toLowerCase(); if (str == null || str.isEmpty()) { searchFieldPattern = null; } else { try { - searchFieldPattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE); + searchFieldPattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE); txtSearch.setForeground(UIManager.getColor("TextField.foreground")); } catch (PatternSyntaxException ex) { txtSearch.setForeground(Color.RED); |