|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.util.swing.action.ResourceLocator
public class ResourceLocator
Constructor Summary | |
---|---|
ResourceLocator()
|
Method Summary | |
---|---|
static void |
addLookupClassLoader(ClassLoader cl)
|
static List<ClassLoader> |
getLookupClassLoaders()
|
static Locale |
getPreferredLocale()
Returns a locale which is used to find preferable locale specific resources. |
static Iterator<URL> |
getResourceURLIterator(String resourceName)
Returns an Iterator providing all resources of the specified
name from the search path used to load classes. |
static Iterator<URL> |
getResourceURLIterator(String resourceName,
Locale preferredLocale)
Returns an Iterator providing all resources of the specified
name from the search path used to load classes. |
static boolean |
removeLookupClassLoader(ClassLoader cl)
Removes the first occurrence of the specified ClassLoader. |
static void |
setPreferredLocale(Locale preferredLocale)
Changes locale which is used to find preferable locale specific resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceLocator()
Method Detail |
---|
public static final boolean removeLookupClassLoader(ClassLoader cl)
cl
- ClassLoader
to be removed, if present.
public static final void addLookupClassLoader(ClassLoader cl)
public static final List<ClassLoader> getLookupClassLoaders()
public static final Locale getPreferredLocale()
public static final void setPreferredLocale(Locale preferredLocale)
preferredLocale
- public static Iterator<URL> getResourceURLIterator(String resourceName)
Iterator
providing all resources of the specified
name from the search path used to load classes. Registered look up class
loader will be considered too. The resources thus found are returned as an
Iterator
of URL
objects. If a global
preferred locale is defined, resource look up prefer resources matching to
this locale.
resourceName
-
getPreferredLocale()
,
setPreferredLocale(Locale)
public static Iterator<URL> getResourceURLIterator(String resourceName, Locale preferredLocale)
Iterator
providing all resources of the specified
name from the search path used to load classes. Registered look up class
loader will be considered too. The resources thus found are returned as an
Iterator
of URL
objects. If the
preferredLocale parameter is not null
, locale specific
resources are the preferred returned URLs. If a global preferred locale is
defined too, resource look up prefer resources matching to the given locale
followed by resources matching the global locale and finally the default resources.
resourceName
- preferredLocale
-
getPreferredLocale()
,
setPreferredLocale(Locale)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |