Package com.biglybt.ui.swt
Class ImageRepository
- java.lang.Object
-
- com.biglybt.ui.swt.ImageRepository
-
public class ImageRepository extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Object
flag_big_key
private static java.util.Map<java.lang.String,org.eclipse.swt.graphics.Image>
flag_cache
private static org.eclipse.swt.graphics.Image
flag_none
private static LocationProvider
flag_provider
private static long
flag_provider_last_check
private static java.lang.Object
flag_small_key
private static boolean
forceNoAWT
private static java.util.Set<java.lang.String>
ignore_icon_exts
Gets an image for a file associated with a given programprivate static java.util.Map<java.lang.String,org.eclipse.swt.graphics.Image>
net_images
private static java.lang.String[]
noCacheExtList
-
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)
publicprivate 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 pathstatic 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)
-
-
-
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
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 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
-
-
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
-
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(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)
-
-