Package java.text

Examples of java.text.DecimalFormat$FastPathData


        }
        else
        {
          if (getLineTicksLabelFormat() != null)
          {
            final DecimalFormat formatter = new DecimalFormat
                (getLineTicksLabelFormat(), new DecimalFormatSymbols(getResourceBundleFactory().getLocale()));
            numberAxis.setNumberFormatOverride(formatter);
          }
        }
      }
View Full Code Here


    this.buffer = new StringBuffer(100);

    if ("true".equals(ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.table.html.SafariLengthHack")))
    {
      pointConverter = new DecimalFormat("0", new DecimalFormatSymbols(Locale.US));
      safariLengthFix = true;
    }
    else
    {
      safariLengthFix = false;
      pointConverter = new DecimalFormat("0.####", new DecimalFormatSymbols(Locale.US));
    }
  }
View Full Code Here

      if (Boolean.TRUE.equals(currency))
      {
        final NumberFormat format = NumberFormat.getCurrencyInstance(context.getLocale());
        if (format instanceof DecimalFormat)
        {
          final DecimalFormat decimalFormat = (DecimalFormat) format;
          return decimalFormat.toPattern();
        }
      }

      final DecimalFormat format = new DecimalFormat();
      if (scale != null && precision != null)
      {
        format.setMaximumFractionDigits(scale.intValue());
        format.setMinimumFractionDigits(scale.intValue());
        format.setMaximumIntegerDigits(precision.intValue() - scale.intValue());
        format.setMinimumIntegerDigits(1);
      }
      return format.toPattern();
    }
    return null;
  }
View Full Code Here

   */
  public String getFormatString()
  {
    if (getFormat() instanceof DecimalFormat)
    {
      final DecimalFormat decFormat = (DecimalFormat) getFormat();
      return decFormat.toPattern();
    }
    return null;
  }
View Full Code Here

    else
    {
      if (formatString.length() == 0)
      {
        // this is a workaround for a bug in JDK 1.5
        setFormat(new DecimalFormat(NumberFieldElementFactory.DECIMALFORMAT_DEFAULT_PATTERN));
      }
      else
      {
        setFormat(new DecimalFormat(formatString));
      }
    }
  }
View Full Code Here

        formulaExpression.setFormula(getFormula());
        element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
      }
      if (format != null)
      {
        final DecimalFormat decimalFormat = (DecimalFormat) format;
        final String formatString = decimalFormat.toPattern();
        element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FORMAT_STRING, formatString);
      }
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NULL_VALUE, getNullString());
    }
    else
View Full Code Here

  /**
   * DefaultConstructor, this object is initialized using a DecimalFormat with the default pattern for this locale.
   */
  public DecimalFormatParser()
  {
    setFormatter(new DecimalFormat());
  }
View Full Code Here

  /**
   * DefaultConstructor, this object is initialized using a DecimalFormat with the default pattern for this locale.
   */
  public DecimalFormatFilter()
  {
    setFormatter(new DecimalFormat());
  }
View Full Code Here

   * @throws NullPointerException if the given format is null
   * @throws ClassCastException   if the format is no decimal format
   */
  public void setFormatter(final Format format)
  {
    final DecimalFormat dfmt = (DecimalFormat) format;
    super.setFormatter(dfmt);
  }
View Full Code Here

  public XmlDocumentWriter(final OutputProcessorMetaData metaData, final OutputStream outputStream)
  {
    this.colorValueConverter = new ColorValueConverter();
    this.outputStream = outputStream;
    this.pointConverter = new DecimalFormat("0.####", new DecimalFormatSymbols(Locale.US));
    this.pointIntConverter = new DecimalFormat("0", new DecimalFormatSymbols(Locale.US));
    this.cellBackgroundProducer = new CellBackgroundProducer(true, true);
  }
View Full Code Here

TOP

Related Classes of java.text.DecimalFormat$FastPathData

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.