Examples of CellFormatter


Examples of com.smartgwt.client.widgets.grid.CellFormatter

            }
        });
        fields.add(field);

        field = FIELD_STATUS.getListGridField("90");
        field.setCellFormatter(new CellFormatter() {
            public String format(Object value, ListGridRecord listGridRecord, int i, int i1) {
                if (listGridRecord.getAttribute(FIELD_ERROR_MESSAGE.propertyName()) != null
                    || listGridRecord.getAttribute(FIELD_FAILED_OPERATION.propertyName()) != null) {
                    return "<span class='" + DONT_MISS_ME_CLASS + "'>" + value.toString() + "</span>";
                } else
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.CellFormatter

        /**
         * Override if you don't want the detailsLinkColumn to have the default link wrapper.
         * @return the desired CellFormatter.
         */
        protected CellFormatter getDetailsLinkColumnCellFormatter() {
            return new CellFormatter() {
                public String format(Object value, ListGridRecord record, int i, int i1) {
                    Integer recordId = getId(record);
                    String detailsUrl = "#" + getBasePath() + "/" + recordId;
                    return LinkManager.getHref(detailsUrl, value.toString());
                }
View Full Code Here

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

Examples of org.gwt.mosaic.override.client.HTMLTable.CellFormatter

            sortedCellIndex = -1;
            sortedRowIndex = -1;
          } else if (sortedCellIndex >= 0 && sortedRowIndex >= 0
              && headerTable.getRowCount() > sortedRowIndex
              && headerTable.getCellCount(sortedRowIndex) > sortedCellIndex) {
            CellFormatter formatter = headerTable.getCellFormatter();
            Element td = formatter.getElement(sortedRowIndex, sortedCellIndex);
            applySortedColumnIndicator(td, ascending);
          }
        }
      }
    });
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.