Package org.springframework.format.annotation.NumberFormat

Examples of org.springframework.format.annotation.NumberFormat.Style


  private Formatter<Number> configureFormatterFrom(NumberFormat annotation) {
    if (StringUtils.hasLength(annotation.pattern())) {
      return new NumberFormatter(resolveEmbeddedValue(annotation.pattern()));
    }
    else {
      Style style = annotation.style();
      if (style == Style.PERCENT) {
        return new PercentFormatter();
      }
      else if (style == Style.CURRENCY) {
        return new CurrencyFormatter();
View Full Code Here


  private Formatter<Number> configureFormatterFrom(NumberFormat annotation) {
    if (StringUtils.hasLength(annotation.pattern())) {
      return new NumberFormatter(resolveEmbeddedValue(annotation.pattern()));
    }
    else {
      Style style = annotation.style();
      if (style == Style.PERCENT) {
        return new PercentFormatter();
      }
      else if (style == Style.CURRENCY) {
        return new CurrencyFormatter();
View Full Code Here

  private Formatter<Number> configureFormatterFrom(NumberFormat annotation, Class<?> fieldType) {
    if (StringUtils.hasLength(annotation.pattern())) {
      return new NumberFormatter(annotation.pattern());
    }
    else {
      Style style = annotation.style();
      if (style == Style.PERCENT) {
        return new PercentFormatter();
      }
      else if (style == Style.CURRENCY) {
        return new CurrencyFormatter();
View Full Code Here

TOP

Related Classes of org.springframework.format.annotation.NumberFormat.Style

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.