|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.util.AssociationList
org.pf.util.NamedValueList
org.pf.nls.TextContainerList
public class TextContainerList
Can hold many TextContainer objects which can be accessed via a locale name or a Locale object.
| Field Summary |
|---|
| Fields inherited from class org.pf.util.NamedValueList |
|---|
EMPTY_NAMED_VALUE_ARRAY |
| Fields inherited from class org.pf.util.AssociationList |
|---|
EMPTY_ASSOCIATION_ARRAY |
| Constructor Summary | |
|---|---|
TextContainerList()
Initialize the new instance with default values. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.String name,
TextContainer container)
Add the text container to this list. |
boolean |
containsNothing()
Returns true if this text provider holds no text and also its default text provider contains nothing. |
java.util.Locale[] |
getLocales()
Returns the locales for which this list has an associated text container |
java.util.Locale[] |
getLookupOrder()
Returns the current lookup order that will be used within getText(String). |
java.lang.String |
getText(java.lang.String key)
Returns the text associated with the given key or null if the key cannot be found. |
TextContainer |
getTextContainer(java.util.Locale locale)
Returns the text container for the given locale or null if none can be found. |
TextContainer |
getTextContainer(java.lang.String localeName)
Returns the text container for the given locale name or null if none can be found. |
void |
setLookupOrder(java.util.Locale[] newValue)
Set the lookup order that will be used within getText(String). |
TextContainer |
textContainerAt(int index)
Returns the text container at the specified index of null |
| Methods inherited from class org.pf.util.NamedValueList |
|---|
add, add, add, add, addAll, containsName, findNamedValue, nameAt, namedValueArray, namedValueArray, namedValueAt, names, remove, setNamedValueAt, sort, sort, valueAt |
| Methods inherited from class org.pf.util.AssociationList |
|---|
addAll, addAll, addAllToMap, asHashMap, asHashtable, asList, associationArray, associationArray, associationAt, clear, containsKey, findAssociation, indexOf, isEmpty, keyAt, keys, processEach, put, put, putAll, putAll, remove, remove, removeAll, removeKey, setAssociationAt, size, valueAt, valueAt, values |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextContainerList()
| Method Detail |
|---|
public TextContainer getTextContainer(java.lang.String localeName)
public TextContainer getTextContainer(java.util.Locale locale)
public void add(java.lang.String name,
TextContainer container)
public java.util.Locale[] getLocales()
getLocales in interface IExtendedTextProviderpublic java.lang.String getText(java.lang.String key)
Iterates over all containers according to the lookup order or if absent just sequential. Returns the first value found.
getText in interface ITextProviderkey - The identifier for the textsetLookupOrder(Locale[])public boolean containsNothing()
containsNothing in interface IExtendedTextProviderpublic java.util.Locale[] getLookupOrder()
getText(String)public void setLookupOrder(java.util.Locale[] newValue)
getText(String)public TextContainer textContainerAt(int index)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||