Class ImageRepository

java.lang.Object
com.biglybt.ui.swt.ImageRepository

public class ImageRepository extends Object
  • Field Details

    • noCacheExtList

      private static final String[] noCacheExtList
    • forceNoAWT

      private static final boolean forceNoAWT
    • ignore_icon_exts

      private static volatile Set<String> ignore_icon_exts
      Gets an image for a file associated with a given program
    • flag_provider

      private static LocationProvider flag_provider
    • flag_provider_last_check

      private static long flag_provider_last_check
    • flag_none

      private static org.eclipse.swt.graphics.Image flag_none
    • flag_small_key

      private static Object flag_small_key
    • flag_big_key

      private static Object flag_big_key
    • flag_cache

      private static Map<String,org.eclipse.swt.graphics.Image> flag_cache
    • net_images

      private static Map<String,org.eclipse.swt.graphics.Image> net_images
  • Constructor Details

    • ImageRepository

      public ImageRepository()
  • Method Details

    • addPath

      static void addPath(String path, String id)
      public
    • getIconFromExtension

      public static org.eclipse.swt.graphics.Image getIconFromExtension(File file, String ext, boolean bBig, boolean minifolder)
    • minifolderize

      private static org.eclipse.swt.graphics.Image minifolderize(String path, org.eclipse.swt.graphics.Image img, boolean big)
    • force16height

      private static org.eclipse.swt.graphics.Image force16height(org.eclipse.swt.graphics.Image image)
    • getPathIcon

      public static org.eclipse.swt.graphics.Image getPathIcon(String path, boolean bBig, boolean minifolder)

      Gets an iconic representation of the file or directory at the path

      For most platforms, the icon is a 16x16 image; weak-referencing caching is used to avoid abundant reallocation.

      Parameters:
      path - Absolute path to the file or directory
      Returns:
      The image
    • getFlagProvider

      private static LocationProvider getFlagProvider()
    • hasCountryFlags

      public static boolean hasCountryFlags(boolean small)
    • getCountryFlag

      public static org.eclipse.swt.graphics.Image getCountryFlag(Peer peer, boolean small)
    • getCountryFlag

      public static org.eclipse.swt.graphics.Image getCountryFlag(PEPeer peer, boolean small)
    • getCountryFlag

      public static org.eclipse.swt.graphics.Image getCountryFlag(InetAddress address, boolean small)
    • getCountryFlag

      public static org.eclipse.swt.graphics.Image getCountryFlag(String cc, boolean small)
    • main

      public static void main(String[] args)