From 0bb2132bf9b51c50bd892ba6de6d89e95c7a36eb Mon Sep 17 00:00:00 2001
From: ulrich
Date: Wed, 13 Nov 2024 17:58:49 +0000
Subject: [PATCH] Dokumentation in Arbeit

---
 src/de/uhilger/fm/ImageFileFilter.java |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/de/uhilger/fm/ImageFileFilter.java b/src/de/uhilger/fm/ImageFileFilter.java
index 4fbdc24..fc222f7 100644
--- a/src/de/uhilger/fm/ImageFileFilter.java
+++ b/src/de/uhilger/fm/ImageFileFilter.java
@@ -1,5 +1,5 @@
 /*
-  neon-fm - File management extensions to Neon
+  fm - File management class library
   Copyright (C) 2024  Ulrich Hilger
 
   This program is free software: you can redistribute it and/or modify
@@ -27,15 +27,28 @@
  * @version 1, 12. Mai 2021
  */
 public class ImageFileFilter implements FileFilter {
+  
+  public static final String JPG = ".jpg";
+  public static final String JPEG = ".jpeg";
+  public static final String PNG = ".png";
+  
+  public static final String B64 = "_b64"; // Base64-Encoded
+  
+  public static final String TN = "_tn"; // 120
+  public static final String KL = "_kl"; // 240
+  public static final String SM = "_sm"; // 500
+  public static final String MT = "_mt"; // 700
+  public static final String GR = "_gr"; // 1200  
+  
     @Override
     public boolean accept(File pathname) {
       boolean pass = true;
       String fname = pathname.getName().toLowerCase();
-      if(fname.endsWith(Const.JPEG) || 
-              fname.endsWith(Const.JPG) || fname.endsWith(Const.PNG)) {
-        if(fname.contains(Const.GR) || fname.contains(Const.KL) || 
-                fname.contains(Const.MT) || fname.contains(Const.SM) || 
-                fname.contains(Const.TN) || fname.contains(Const.B64)) {
+      if(fname.endsWith(JPEG) || 
+              fname.endsWith(JPG) || fname.endsWith(PNG)) {
+        if(fname.contains(GR) || fname.contains(KL) || 
+                fname.contains(MT) || fname.contains(SM) || 
+                fname.contains(TN) || fname.contains(B64)) {
           pass = false;
         }
       }

--
Gitblit v1.9.3