com.ontimize.util
Class FormatPattern
java.lang.Object
com.ontimize.util.FormatPattern
- All Implemented Interfaces:
- Internationalization
- public class FormatPattern
- extends java.lang.Object
- implements Internationalization
Utility class to create a pattern String with a translation key and the
given values.
- Since:
- Ontimize 5.2059EN
- Author:
- Imatia Innovation S.L.
|
Field Summary |
protected java.text.DateFormat |
dateFormat
|
protected java.lang.String |
message
|
protected java.util.List |
params
|
protected static java.lang.String |
SEPARATOR
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEPARATOR
protected static final java.lang.String SEPARATOR
- See Also:
- Constant Field Values
message
protected java.lang.String message
params
protected java.util.List params
dateFormat
protected java.text.DateFormat dateFormat
FormatPattern
public FormatPattern(java.lang.String pattern)
isEmpty
public boolean isEmpty()
getMessage
public java.lang.String getMessage()
getParams
public java.util.List getParams()
getDateFormat
public java.text.DateFormat getDateFormat()
setDateFormat
public void setDateFormat(java.lang.String dateFormat)
setDateFormat
public void setDateFormat(java.text.DateFormat dateFormat)
parse
public java.lang.String parse(int index,
java.util.Hashtable values)
createValues
protected java.lang.Object[] createValues(int index,
java.util.Hashtable values)
parse
public java.lang.String parse(java.lang.Object param)
parse
public java.lang.String parse(java.lang.Object[] params)
convertValues
protected java.lang.Object[] convertValues(java.lang.Object[] params)
convertValue
protected java.lang.Object convertValue(java.lang.Object value)
getTextsToTranslate
public java.util.Vector getTextsToTranslate()
- Description copied from interface:
Internationalization
- Returns all the texts in the element suitable for being translated.
- Specified by:
getTextsToTranslate in interface Internationalization
- Returns:
- all the texts in the element suitable for being translated.
setComponentLocale
public void setComponentLocale(java.util.Locale l)
- Specified by:
setComponentLocale in interface Internationalization
setResourceBundle
public void setResourceBundle(java.util.ResourceBundle rb)
- Description copied from interface:
Internationalization
- Sets the language resource bundle. When the application changes the
configured language, for all the objects that implement this interface
this method must be called with the new file.
The method must translate all the elements that have texts in the GUI
- Specified by:
setResourceBundle in interface Internationalization
- Parameters:
rb - the new language bundle.