|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.help.HelpUtilities
Provides a number of utility functions: Support for Beans, mapping from a Bean class to its HelpSet and to its ID. Support for finding localized resources. Support for getting the default Query Engine This class has no public constructor.
Constructor Summary | |
HelpUtilities()
|
Method Summary | |
static java.util.Enumeration |
getCandidates(java.util.Locale locale)
This returns an enumeration of String tails. |
static java.lang.String |
getDefaultQueryEngine()
Default for the search engine |
static java.lang.String |
getHelpSetNameFromBean(java.lang.Class beanClass)
Given the class for a bean, get its HelpSet. |
static java.lang.String |
getIDStringFromBean(java.lang.Class beanClass)
Given the class for a bean, get its ID string. |
static java.util.Locale |
getLocale(java.awt.Component c)
Gets the locale of a component. |
static java.net.URL |
getLocalizedResource(java.lang.ClassLoader cl,
java.lang.String front,
java.lang.String back,
java.util.Locale locale)
Locate a resource relative to a given classloader CL. |
static java.net.URL |
getLocalizedResource(java.lang.ClassLoader cl,
java.lang.String front,
java.lang.String back,
java.util.Locale locale,
boolean tryRead)
Locate a resource relative to a given classloader CL. |
static java.lang.String |
getString(java.util.Locale l,
java.lang.String key)
Versions with an explicit locale. |
static java.lang.String |
getString(java.lang.String key)
Get the Text message for the default locale. |
static java.lang.String[] |
getStringArray(java.util.Locale l,
java.lang.String key)
|
static java.lang.String |
getText(java.util.Locale l,
java.lang.String key)
|
static java.lang.String |
getText(java.util.Locale l,
java.lang.String key,
java.lang.String s1)
|
static java.lang.String |
getText(java.util.Locale l,
java.lang.String key,
java.lang.String s1,
java.lang.String s2)
|
static java.lang.String |
getText(java.util.Locale l,
java.lang.String key,
java.lang.String s1,
java.lang.String s2,
java.lang.String s3)
|
static java.lang.String |
getText(java.lang.String key)
|
static java.lang.String |
getText(java.lang.String key,
java.lang.String s1)
|
static java.lang.String |
getText(java.lang.String key,
java.lang.String s1,
java.lang.String s2)
|
static java.lang.String |
getText(java.lang.String key,
java.lang.String s1,
java.lang.String s2,
java.lang.String s3)
|
static boolean |
isStringInString(java.text.RuleBasedCollator rbc,
java.lang.String source,
java.lang.String target)
Returns information about whether a string is contained in another string. |
static java.util.Locale |
localeFromLang(java.lang.String lang)
Convenient method for creating a locale from a lang string. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HelpUtilities()
Method Detail |
public static java.lang.String getHelpSetNameFromBean(java.lang.Class beanClass)
beanClass
- The Class
public static java.lang.String getIDStringFromBean(java.lang.Class beanClass)
beanClass
- the Class
public static java.lang.String getDefaultQueryEngine()
public static java.net.URL getLocalizedResource(java.lang.ClassLoader cl, java.lang.String front, java.lang.String back, java.util.Locale locale)
cl
- The ClassLoader to get the resource from. If cl is null the default
ClassLoader is used.public static java.net.URL getLocalizedResource(java.lang.ClassLoader cl, java.lang.String front, java.lang.String back, java.util.Locale locale, boolean tryRead)
cl
- The ClassLoader to get the resource from. If cl is null the default
ClassLoader is used.public static java.util.Enumeration getCandidates(java.util.Locale locale)
"_" + language1 + "_" + country1 + "_" + variant1
"_" + language1 + "_" + country1
"_" + language1
""
"_" + language2 + "_" + country2 + "_" + variant2
"_" + language2 + "_" + country2
"_" + language2
The enumeration is of StringBuffer.
We pay some attention to efficiency in case a method like this is promoted,
hence we cache per locale.
public static java.util.Locale getLocale(java.awt.Component c)
public static java.lang.String getString(java.lang.String key)
public static java.lang.String getText(java.lang.String key)
public static java.lang.String getText(java.lang.String key, java.lang.String s1)
s1
- The first parameter of a string. A null is valid for s1.public static java.lang.String getText(java.lang.String key, java.lang.String s1, java.lang.String s2)
s1
- The first parameter of a string. A null is valid for s1.s2
- The first parameter of a string. A null is valid for s2.public static java.lang.String getText(java.lang.String key, java.lang.String s1, java.lang.String s2, java.lang.String s3)
s1
- The first parameter of a string. A null is valid for s1.s2
- The first parameter of a string. A null is valid for s2.s3
- The first parameter of a string. A null is valid for s3.public static java.lang.String getString(java.util.Locale l, java.lang.String key)
public static java.lang.String[] getStringArray(java.util.Locale l, java.lang.String key)
public static java.lang.String getText(java.util.Locale l, java.lang.String key)
public static java.lang.String getText(java.util.Locale l, java.lang.String key, java.lang.String s1)
s1
- The first parameter of a string. A null is valid for s1.public static java.lang.String getText(java.util.Locale l, java.lang.String key, java.lang.String s1, java.lang.String s2)
s1
- The first parameter of a string. A null is valid for s1.s2
- The first parameter of a string. A null is valid for s2.public static java.lang.String getText(java.util.Locale l, java.lang.String key, java.lang.String s1, java.lang.String s2, java.lang.String s3)
s1
- The first parameter of a string. A null is valid for s1.s2
- The first parameter of a string. A null is valid for s2.s3
- The first parameter of a string. A null is valid for s3.public static java.util.Locale localeFromLang(java.lang.String lang)
lang
- A String representation of a locale, with the language,
country and variant separated by underbars. Language is always lower
case, and country is always upper case. If the language is missing the
String begins with an underbar. If both language and country fields are
missing, a null Locale is returned. If lang is null a null Locale is
returnedpublic static boolean isStringInString(java.text.RuleBasedCollator rbc, java.lang.String source, java.lang.String target)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |