|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pfsw.util.AssociationList<java.lang.String,V>
org.pfsw.util.NamedValueList<TextContainer>
org.pfsw.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.pfsw.util.NamedValueList |
---|
EMPTY_NAMED_VALUE_ARRAY |
Fields inherited from class org.pfsw.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). |
protected ITextProvider[] |
getOrderedTextProviders()
|
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.pfsw.util.NamedValueList |
---|
add, add, addAll, containsName, elementClass, findNamedValue, getNames, getValue, keyClass, nameAt, namedValueArray, namedValueArray, namedValueAt, names, newElement, remove, setNamedValueAt, sort, sort, valueAt |
Methods inherited from class org.pfsw.util.AssociationList |
---|
addAll, addAll, addAll, addAllToMap, addOrPutAll, asHashMap, asHashtable, asList, associationArray, associationArray, associationAt, basicAdd, clear, collectElements, collUtil, containsKey, findAssociation, findValue, getList, indexOf, isCorrectElementType, isCorrectKeyType, isCorrectValueType, isEmpty, isValidAssociation, keyAt, keys, processEach, put, put, putAll, putAll, remove, remove, removeAll, removeKey, setAssociationAt, setList, size, valueAt, valueClass, values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.pfsw.bif.facet.IReadOnlyNamedValues |
---|
isEmpty |
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)
add
in class org.pfsw.util.NamedValueList<TextContainer>
public java.util.Locale[] getLocales()
getLocales
in interface IExtendedTextProvider
public 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 ITextProvider
key
- The identifier for the textsetLookupOrder(Locale[])
public boolean containsNothing()
containsNothing
in interface IExtendedTextProvider
public java.util.Locale[] getLookupOrder()
getText(String)
public void setLookupOrder(java.util.Locale[] newValue)
getText(String)
public TextContainer textContainerAt(int index)
protected ITextProvider[] getOrderedTextProviders()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |