java.lang.Object
de.grogra.pf.ui.ThumbnailCache
Flat-file cache for project scene thumbnails.
Cache directory: ~/.grogra.de-platform/thumbnails/
Cache key: <stem>_<crc32hex(absolutePath)>.png
Only exists(java.io.File) is called at startup (O(1) File.exists() check).
JEditorPane loads PNG bytes lazily via file:// URIs — zero startup overhead.
- Author:
- MH at YNL 2026
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturnstrueif a cached thumbnail exists for the given project file.static byte[]Returns cached PNG bytes, ornullif absent.static FilegetCacheFile(File gszPath) Returns the cache file path for the given .gsz file.static voidWrites PNG bytes to the cache, creating the cache directory if needed.
-
Constructor Details
-
ThumbnailCache
public ThumbnailCache()
-
-
Method Details
-
getCacheFile
Returns the cache file path for the given .gsz file. The file may not exist yet. -
put
Writes PNG bytes to the cache, creating the cache directory if needed.- Throws:
IOException
-
get
Returns cached PNG bytes, ornullif absent.- Throws:
IOException
-
exists
Returnstrueif a cached thumbnail exists for the given project file.
-