Package com.onwbp.base.text
Class NomenclatureItemValue<T>
- java.lang.Object
- com.onwbp.base.text.NomenclatureItem<T>
- com.onwbp.base.text.NomenclatureItemValue<T>
public class NomenclatureItemValue<T> extends NomenclatureItem<T>
ANomenclatureItemValueis a label value in a containingNomenclature. The value should correspond to the associated type.The code that implements the layout must decide how to display an instance of this class.
- See Also:
Nomenclature
-
Field Summary
-
Fields inherited from class com.onwbp.base.text.NomenclatureItem
_defaultLabel, _value
-
-
Constructor Summary
Constructors Constructor Description NomenclatureItemValue()NomenclatureItemValue (T newValue, String newLabel)NomenclatureItemValue (T newValue, String[] newLabels)NomenclatureItemValue (T newValue, String[] newLabels, Locale[] locales)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals (Object x)StringgetDefaultLabel()Returns first label.StringgetLabel (int index)Returns the label at the specified position (from 0 to the number of labels - 1).StringgetLabel (Locale aLocale)Returns the label defined for the specified locale.inthashCode()booleanisLocalized()voidsetDefaultLabel (String aString)Sets first label.voidsetLabel (int index, String aString)Replaces the label at the specified position in all labels with the specified string.-
Methods inherited from class com.onwbp.base.text.NomenclatureItem
getValue, isDefaultItem, isValueItem, setDefaultItem, setValue, toString
-
-
-
Method Detail
isLocalized
public boolean isLocalized()
- Specified by:
isLocalizedin classNomenclatureItem<T>
getLabel
public String getLabel(Locale aLocale)
Returns the label defined for the specified locale.- Specified by:
getLabelin classNomenclatureItem<T>- Parameters:
aLocale- the locale to search for. Can benull.- Returns:
nullif specified locale does not exist or anulllabel is defined for the locale.
setLabel
public void setLabel(int index, String aString)Replaces the label at the specified position in all labels with the specified string.- Specified by:
setLabelin classNomenclatureItem<T>
getDefaultLabel
public String getDefaultLabel()
Returns first label.- Specified by:
getDefaultLabelin classNomenclatureItem<T>
getLabel
public String getLabel(int index)
Returns the label at the specified position (from 0 to the number of labels - 1).- Specified by:
getLabelin classNomenclatureItem<T>
setDefaultLabel
public void setDefaultLabel(String aString)
Sets first label.- Specified by:
setDefaultLabelin classNomenclatureItem<T>
-