Class FormattedTimeConverter

  • All Implemented Interfaces:
    java.io.Serializable, Converter

    public class FormattedTimeConverter
    extends java.lang.Object
    implements Converter, java.io.Serializable
    Converter to convert String to Time (Date Object).
    Since:
    8.0.0
    Author:
    JamesChu
    See Also:
    Serialized Form
    • Constructor Detail

      • FormattedTimeConverter

        public FormattedTimeConverter()
    • Method Detail

      • coerceToUi

        public java.lang.Object coerceToUi​(java.lang.Object val,
                                           Component comp,
                                           BindContext ctx)
        Convert Date to String.
        Specified by:
        coerceToUi in interface Converter
        Parameters:
        val - date to be converted
        comp - associated component
        ctx - bind context for associate Binding and extra parameter (e.g. format)
        Returns:
        the converted String
      • coerceToBean

        public java.lang.Object coerceToBean​(java.lang.Object val,
                                             Component comp,
                                             BindContext ctx)
        Convert String to Date.
        Specified by:
        coerceToBean in interface Converter
        Parameters:
        val - date in string form
        comp - associated component
        ctx - bind context for associate Binding and extra parameter (e.g. format)
        Returns:
        the converted Date