summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuersat Akmaz2020-10-19 13:01:19 +0200
committerKuersat Akmaz2020-10-19 13:01:19 +0200
commitc908cdfa615485608596e6e847cb0ffd2e34a148 (patch)
tree70e2d102f95e88c8122b033023bcd93dca95ae72
parent[client] solved CaseSensitivity issue in searchfunktion (diff)
downloadtutor-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
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java3
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java3
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);