Package com.cfinkel.reports

Examples of com.cfinkel.reports.Format


        int i = 1;

        // formats:
        try {
            for (FormatElement formatElement : outputElement.getFormat()) {
                Format format = new Format(formatElement.getValue());
                formats.addByColName(format,formatElement.getColumn());
            }
        } catch (Exception e) {
            log.error("exception adding formats",e);
            throw new BadReportSyntaxException("Exception adding formats");
View Full Code Here


    }

    public String getFormatAttributeForColumn(int column, String columnName) {
        //   <%--                format="<%=output.getFormats().get(column,columnName)%>" --%>
        // should look like format="{0,number,0,000.00} $" or something --
        Format format = this.getFormats().get(column,columnName);
        if (format == null) return "";

        StringBuilder sb = new StringBuilder("{0,number,");
        sb.append(format.getDecimalFormatString());
        sb.append("}");

        return sb.toString();
    }
View Full Code Here

        Object valueObject = currentRowObject.get(columnName);
        // should not happen:
        if (valueObject == null) return "";

        Format format = formats.get(columnName);
        String value;
        if (format != null) {
            value = format.getDecimalFormat().format(valueObject);
        } else {
            value = valueObject.toString();
        }

        DrillDownElement drillDownElement = drillDowns.get(columnName);
View Full Code Here

TOP

Related Classes of com.cfinkel.reports.Format

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.