Package mondrian.spi

Examples of mondrian.spi.CellFormatter


        public synchronized void setProperty(String name, Object value) {
            if (name.equals(Property.CELL_FORMATTER.getName())) {
                String cellFormatterClass = (String) value;
                try {
                    CellFormatter formatter =
                        RolapSchema.getCellFormatter(
                            cellFormatterClass,
                            null);
                    this.cellFormatter =
                        new RolapResult.CellFormatterValueFormatter(formatter);
                } catch (Exception e) {
                    throw MondrianResource.instance().CellFormatterLoadFailed
                        .ex(
                            cellFormatterClass, getUniqueName(), e);
                }
            }
            if (name.equals(Property.CELL_FORMATTER_SCRIPT.name)) {
                String language = (String) getPropertyValue(
                    Property.CELL_FORMATTER_SCRIPT_LANGUAGE.name);
                String scriptText = (String) value;
                try {
                    final Scripts.ScriptDefinition script =
                        new Scripts.ScriptDefinition(
                            scriptText,
                            Scripts.ScriptLanguage.lookup(language));
                    CellFormatter formatter =
                        RolapSchema.getCellFormatter(
                            null,
                            script);
                    this.cellFormatter =
                        new RolapResult.CellFormatterValueFormatter(formatter);
View Full Code Here


            cellFormatterClassName = xmlMeasure.formatter;
            scriptDefinition = null;
        }
        if (cellFormatterClassName != null || scriptDefinition != null) {
            try {
                CellFormatter cellFormatter =
                    RolapSchema.getCellFormatter(
                        cellFormatterClassName,
                        scriptDefinition);
                measure.setFormatter(cellFormatter);
            } catch (Exception e) {
View Full Code Here

TOP

Related Classes of mondrian.spi.CellFormatter

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.