Package com.google.gwt.visualization.client.formatters.NumberFormat

Examples of com.google.gwt.visualization.client.formatters.NumberFormat.Options


        DataTable dataTable = DataTable.create();
        dataTable.addColumn(ColumnType.NUMBER);
        dataTable.addRows(1);
        dataTable.setValue(0, 0, -3.14159265);

        Options options = Options.create();
        options.setDecimalSymbol("_");
        options.setFractionDigits(3);
        options.setNegativeColor("red");
        options.setNegativeParens(false);
        options.setPrefix("$");
        options.setSuffix("%");

        NumberFormat formatter = NumberFormat.create(options);
        formatter.format(dataTable, 0);
        assertEquals("$-3_142%", dataTable.getFormattedValue(0, 0));
        // TODO(zundel): Unit tests are curently broken with this assertion.
View Full Code Here

TOP

Related Classes of com.google.gwt.visualization.client.formatters.NumberFormat.Options

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.