Class ImageRepository


  • public class ImageRepository
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageRepository()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void addPath​(java.lang.String path, java.lang.String id)
      public
      private static org.eclipse.swt.graphics.Image force16height​(org.eclipse.swt.graphics.Image image)  
      static org.eclipse.swt.graphics.Image getCountryFlag​(PEPeer peer, boolean small)  
      static org.eclipse.swt.graphics.Image getCountryFlag​(Peer peer, boolean small)  
      static org.eclipse.swt.graphics.Image getCountryFlag​(java.lang.String cc, boolean small)  
      static org.eclipse.swt.graphics.Image getCountryFlag​(java.net.InetAddress address, boolean small)  
      private static LocationProvider getFlagProvider()  
      static org.eclipse.swt.graphics.Image getIconFromExtension​(java.io.File file, java.lang.String ext, boolean bBig, boolean minifolder)  
      static org.eclipse.swt.graphics.Image getPathIcon​(java.lang.String path, boolean bBig, boolean minifolder)
      Gets an iconic representation of the file or directory at the path
      static boolean hasCountryFlags​(boolean small)  
      static void main​(java.lang.String[] args)  
      private static org.eclipse.swt.graphics.Image minifolderize​(java.lang.String path, org.eclipse.swt.graphics.Image img, boolean big)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • noCacheExtList

        private static final java.lang.String[] noCacheExtList
      • forceNoAWT

        private static final boolean forceNoAWT
      • ignore_icon_exts

        private static volatile java.util.Set<java.lang.String> ignore_icon_exts
        Gets an image for a file associated with a given program
      • 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 java.lang.Object flag_small_key
      • flag_big_key

        private static java.lang.Object flag_big_key
      • flag_cache

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

        private static java.util.Map<java.lang.String,​org.eclipse.swt.graphics.Image> net_images
    • Constructor Detail

      • ImageRepository

        public ImageRepository()
    • Method Detail

      • addPath

        static void addPath​(java.lang.String path,
                            java.lang.String id)
        public
      • getIconFromExtension

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

        private static org.eclipse.swt.graphics.Image minifolderize​(java.lang.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​(java.lang.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
      • 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​(java.net.InetAddress address,
                                                                    boolean small)
      • getCountryFlag

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

        public static void main​(java.lang.String[] args)