Package org.springframework.format.number

Examples of org.springframework.format.number.NumberFormatAnnotationFormatterFactory


 
  /**
   * Install formatters and set ISO formatting to true
   */
  protected void installFormatters(FormatterRegistry registry) {
    registry.addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());
    if (jodaTimePresent) {
      JodaTimeFormattingConfigurer configurer = new JodaTimeFormattingConfigurer();
      configurer.setUseIsoFormat(true);
      configurer.installJodaTimeFormatting(registry);     
    }
View Full Code Here


   * Add formatters appropriate for most environments, including number formatters and a Joda-Time
   * date formatter if Joda-Time is present on the classpath.
   * @param formatterRegistry the service to register default formatters against
   */
  public static void addDefaultFormatters(FormatterRegistry formatterRegistry) {
    formatterRegistry.addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());
    if (jodaTimePresent) {
      new JodaTimeFormatterRegistrar().registerFormatters(formatterRegistry);
    } else {
      formatterRegistry.addFormatterForFieldAnnotation(new NoJodaDateTimeFormatAnnotationFormatterFactory());
    }
View Full Code Here

   * Add formatters appropriate for most environments, including number formatters and a Joda-Time
   * date formatter if Joda-Time is present on the classpath.
   * @param formatterRegistry the service to register default formatters against
   */
  public static void addDefaultFormatters(FormatterRegistry formatterRegistry) {
    formatterRegistry.addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());
    if (jodaTimePresent) {
      new JodaTimeFormatterRegistrar().registerFormatters(formatterRegistry);
    }
    else {
      new DateFormatterRegistrar().registerFormatters(formatterRegistry);
View Full Code Here

  /**
   * Install Formatters and Converters into the new FormattingConversionService using the FormatterRegistry SPI.
   * Subclasses may override to customize the set of formatters and/or converters that are installed.
   */
  protected void installFormatters(FormatterRegistry registry) {
    registry.addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());
    if (jodaTimePresent) {
      new JodaTimeFormattingConfigurer().installJodaTimeFormatting(registry);     
    }
    else {
      registry.addFormatterForFieldAnnotation(new NoJodaDateTimeFormatAnnotationFormatterFactory());
View Full Code Here

  /**
   * Install Formatters and Converters into the new FormattingConversionService using the FormatterRegistry SPI.
   * Subclasses may override to customize the set of formatters and/or converters that are installed.
   */
  protected void installFormatters(FormatterRegistry registry) {
    registry.addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());
    if (jodaTimePresent) {
      new JodaTimeFormattingConfigurer().installJodaTimeFormatting(registry);     
    }
    else {
      registry.addFormatterForFieldAnnotation(new NoJodaDateTimeFormatAnnotationFormatterFactory());
View Full Code Here

TOP

Related Classes of org.springframework.format.number.NumberFormatAnnotationFormatterFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.