Class JListUtils
java.lang.Object
net.adoptopenjdk.icedteaweb.client.controlpanel.desktopintegrationeditor.JListUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classprivate static classstatic classprivate static classstatic classprivate static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ImageIconcreateImageIcon(File f, String description) Load BufferedImage form file, scale it and converts to icon.private static IconThis method looks to cache whether file F was already read as image.private static StringThis method looks to cache whether file F was already read as text file.private static IconupdateIconCache(File f, Icon i) This method load Icon from file.private static StringupdateTextCache(File f, String s) This method load Text from file.
-
Field Details
-
iconCache
-
textFilesCache
-
stamps
-
-
Constructor Details
-
JListUtils
public JListUtils()
-
-
Method Details
-
processIconCache
-
updateIconCache
This method load Icon from file. Once file is loaded, it is stored also to cache Also the time stamp of last modification is stored to cache to allow reloading when changed.- Parameters:
f- file to load, and to provide timestamp of last modification- Returns:
- loaded icon or null
-
processTextFilesCache
This method looks to cache whether file F was already read as text file. If not, file is loaded, and its content is put to cache and returned as String If so, it also check whether it was modified. If so, it is reloaded, replaced in cache and returned.- Parameters:
f-- Returns:
-
updateTextCache
This method load Text from file. Once file is loaded, it is stored also to cache Also the time stamp of last modification is stored to cache to allow reloading when changed.- Parameters:
f- file to load, and to provide timestamp of last modification- Returns:
- loaded Text, error message or null
-
createImageIcon
-