Class JListUtils

java.lang.Object
net.adoptopenjdk.icedteaweb.client.controlpanel.desktopintegrationeditor.JListUtils

public class JListUtils extends Object
  • Field Details

  • Constructor Details

    • JListUtils

      public JListUtils()
  • Method Details

    • processIconCache

      private static Icon processIconCache(File f)
      This method looks to cache whether file F was already read as image. If not, file is loaded, put to cache and returned If so, it also check whether it was modified. If so, it is reloaded, replaced in cache and returned.
      Parameters:
      f -
      Returns:
    • updateIconCache

      private static Icon updateIconCache(File f, Icon i)
      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

      private static String processTextFilesCache(File f)
      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

      private static String updateTextCache(File f, String s)
      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

      private static ImageIcon createImageIcon(File f, String description)
      Load BufferedImage form file, scale it and converts to icon.
      Parameters:
      f - file to be loaded
      description - description to be provided
      Returns:
      icon from file or null if something went wrong