Ontimize 5.2072EN

com.ontimize.util
Class FormatPattern

java.lang.Object
  extended bycom.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
           
 
Fields inherited from interface com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Constructor Summary
FormatPattern(java.lang.String pattern)
           
 
Method Summary
protected  java.lang.Object convertValue(java.lang.Object value)
           
protected  java.lang.Object[] convertValues(java.lang.Object[] params)
           
protected  java.lang.Object[] createValues(int index, java.util.Hashtable values)
           
 java.text.DateFormat getDateFormat()
           
 java.lang.String getMessage()
           
 java.util.List getParams()
           
 java.util.Vector getTextsToTranslate()
          Returns all the texts in the element suitable for being translated.
 boolean isEmpty()
           
 java.lang.String parse(int index, java.util.Hashtable values)
           
 java.lang.String parse(java.lang.Object param)
           
 java.lang.String parse(java.lang.Object[] params)
           
 void setComponentLocale(java.util.Locale l)
           
 void setDateFormat(java.text.DateFormat dateFormat)
           
 void setDateFormat(java.lang.String dateFormat)
           
 void setResourceBundle(java.util.ResourceBundle rb)
          Sets the language resource bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

FormatPattern

public FormatPattern(java.lang.String pattern)
Method Detail

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.

Ontimize