Package org.pentaho.reporting.libraries.formatting

Examples of org.pentaho.reporting.libraries.formatting.FastDecimalFormat.format()


    }

    final FastDecimalFormat decimalFormat =
        new FastDecimalFormat("######################0.0########", Locale.US);
    final StringBuffer b = new StringBuffer(coordinates.length * 10);
    b.append(decimalFormat.format(coordinates[0] * scale));
    for (int i = 1; i < coordinates.length; i++)
    {
      final float coordinate = coordinates[i];
      b.append(',');
      b.append(decimalFormat.format(coordinate * scale));
 
View Full Code Here


    b.append(decimalFormat.format(coordinates[0] * scale));
    for (int i = 1; i < coordinates.length; i++)
    {
      final float coordinate = coordinates[i];
      b.append(',');
      b.append(decimalFormat.format(coordinate * scale));
    }
    return b.toString();
  }
}
View Full Code Here

  }

  public String toString()
  {
    final FastDecimalFormat numberInstance = new FastDecimalFormat("#0.####", Locale.US);
    return numberInstance.format(new BigDecimal(value)) + unit.getName();
  }
}
View Full Code Here

      {
        final Locale locale = runtime.getResourceBundleFactory().getLocale();
        final FastDecimalFormat decimalFormat = new FastDecimalFormat
            (String.valueOf(formatStringRaw), locale);

        return decimalFormat.format(staticValue);
      }
      catch (Exception e)
      {
        // ignore .. fallback to show the fieldname
      }
View Full Code Here

      {
        final Locale locale = runtime.getResourceBundleFactory().getLocale();
        final FastDecimalFormat decimalFormat = new FastDecimalFormat
            (String.valueOf(formatStringRaw), locale);

        return decimalFormat.format(staticValue);
      }
      catch (Exception e)
      {
        // ignore .. fallback to show the fieldname
      }
View Full Code Here

            value));
      }
      if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_WIDTH))
      {
        final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_WIDTH, 0);
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-right-width", absoluteLengthFormat.format(
            value));
      }
    }

    if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_HEIGHT) &&
View Full Code Here

      final double topRight = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_HEIGHT, 0);
      if (bottomLeft == bottomRight &&
          bottomLeft == topRight &&
          bottomLeft == topLeft)
      {
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-radius-height", absoluteLengthFormat.format(
            bottomLeft));
      }
      else
      {
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-left-radius-height", absoluteLengthFormat.format(
View Full Code Here

        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-radius-height", absoluteLengthFormat.format(
            bottomLeft));
      }
      else
      {
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-left-radius-height", absoluteLengthFormat.format(
            topLeft));
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-right-radius-height",
            absoluteLengthFormat.format(topRight));
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-left-radius-height",
            absoluteLengthFormat.format(bottomLeft));
View Full Code Here

      else
      {
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-left-radius-height", absoluteLengthFormat.format(
            topLeft));
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-right-radius-height",
            absoluteLengthFormat.format(topRight));
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-left-radius-height",
            absoluteLengthFormat.format(bottomLeft));
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-right-radius-height",
            absoluteLengthFormat.format(bottomRight));
      }
View Full Code Here

        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-left-radius-height", absoluteLengthFormat.format(
            topLeft));
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-right-radius-height",
            absoluteLengthFormat.format(topRight));
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-left-radius-height",
            absoluteLengthFormat.format(bottomLeft));
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-right-radius-height",
            absoluteLengthFormat.format(bottomRight));
      }
    }
    else
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.