planetj.formatters
Interface IFormatter

All Known Subinterfaces:
IInputFormatter, IStyleAwareFormatter
All Known Implementing Classes:
AbstractFormatter

public interface IFormatter

Formats a value for display


Method Summary
 java.lang.String formatValue(java.lang.Object value, Field field)
          Formats a value for display.
 boolean isPrepareFieldValue(Field field, ExecutingContext ec)
          Checks whether or not this fields value should be prepared.
 

Method Detail

formatValue

public java.lang.String formatValue(java.lang.Object value,
                                    Field field)
Formats a value for display. This method is only used when formating a read-only display value

Parameters:
value - The value to format
field - The field whose value is being formatted
Returns:
The formatted display value of the value

isPrepareFieldValue

public boolean isPrepareFieldValue(Field field,
                                   ExecutingContext ec)
Checks whether or not this fields value should be prepared. For example, there could be an HTML formatter that generates HTML and it's resulting value should not be altered.