LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.app.adapter
Class LyFormatterAdapter

java.lang.Object
  extended by leon.app.adapter.LyFormatterAdapter
All Implemented Interfaces:
LyFormatterInterface

public abstract class LyFormatterAdapter
extends java.lang.Object
implements LyFormatterInterface

Interface implemented by classes that format field values.


Field Summary
static java.lang.String __VERSION
          File version
 
Constructor Summary
LyFormatterAdapter()
           
 
Method Summary
abstract  java.lang.Object parse(LyFieldInfo fieldInfo, java.lang.String value, LyUnit unit)
          Method to parse a string value with a given unit.
 java.lang.String toName(LyFieldInfo fieldInfo, java.lang.Object value, LyUnit unit)
          Method to format a value to a displayable string with the given unit.
 java.lang.String toShortName(LyFieldInfo fieldInfo, java.lang.Object value, LyUnit unit)
          Method to format a value to a displayable short string with the given unit.
abstract  java.lang.String toString(LyFieldInfo fieldInfo, java.lang.Object value, LyUnit unit)
          Method to format a value to an edition string with the given unit.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LyFormatterAdapter

public LyFormatterAdapter()
Method Detail

toString

public abstract java.lang.String toString(LyFieldInfo fieldInfo,
                                          java.lang.Object value,
                                          LyUnit unit)
Method to format a value to an edition string with the given unit.

Specified by:
toString in interface LyFormatterInterface
Parameters:
fieldInfo - the fieldInfo for which a value is formatted
value - the value to format
unit - the destination unit of the string value
Returns:
The edition string corresponding to the given value and unit.

toName

public java.lang.String toName(LyFieldInfo fieldInfo,
                               java.lang.Object value,
                               LyUnit unit)
Method to format a value to a displayable string with the given unit.

Specified by:
toName in interface LyFormatterInterface
Parameters:
fieldInfo - the fieldInfo for which a value is formatted
value - the value to format
unit - the destination unit of the string value
Returns:
The displayable string corresponding to the given value and unit.

toShortName

public java.lang.String toShortName(LyFieldInfo fieldInfo,
                                    java.lang.Object value,
                                    LyUnit unit)
Method to format a value to a displayable short string with the given unit.

Specified by:
toShortName in interface LyFormatterInterface
Parameters:
fieldInfo - the fieldInfo for which a value is formatted
value - the value to format
unit - the destination unit of the string value
Returns:
The short displayable string corresponding to the given value and unit.

parse

public abstract java.lang.Object parse(LyFieldInfo fieldInfo,
                                       java.lang.String value,
                                       LyUnit unit)
Method to parse a string value with a given unit.

Specified by:
parse in interface LyFormatterInterface
Parameters:
fieldInfo - the fieldInfo for which the string value is parsed.
value - the string value to parse
unit - the destination unit of the string value
Returns:
The value corresponding to the given string and unit.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com