Examples of formatValue()


Examples of net.openhft.jpsg.PrimitiveType.formatValue()

                "int size = size();",
                "if (a.length < size)",
                "    a = new " + elemType.standalone + "[size];",
                "if (size == 0) {",
                "    if (a.length > 0)",
                "        a[0] = " + elemType.formatValue("0") + ";",
                "    return a;",
                "}",
                "int resultIndex = 0;"
        );
    }
View Full Code Here

Examples of net.openhft.jpsg.PrimitiveType.formatValue()

    @Override
    public void end() {
        PrimitiveType elemType = (PrimitiveType) cxt.viewOption();
        gen.lines(
                "if (a.length > resultIndex)",
                "    a[resultIndex] = " + elemType.formatValue("0") + ";"
        );
        gen.ret("a");
    }
}
View Full Code Here

Examples of org.jboss.dashboard.provider.DataPropertyFormatter.formatValue()

            for (int j = 0; j < dataSet.getProperties().length; j++) {
                Object dataSetValue = dataSet.getValueAt(i, j);
                DataProperty prop = dataSet.getPropertyByColumn(j);
                DataPropertyFormatter propFormatter = dataFormatterRegistry.getPropertyFormatter(prop.getPropertyId());
                String displayedValue = propFormatter.formatValue(prop, dataSetValue, Locale.ENGLISH);

                if (j > 0) buf.append(",");
                buf.append("\"" + displayedValue + "\"");
            }
            buf.append("}");
View Full Code Here

Examples of org.jboss.dashboard.provider.DataPropertyFormatter.formatValue()

    // AbstractFilter implementation

    protected String formatForDisplay(String propertyId, Object value) {
        DataPropertyFormatter formatter = DataFormatterRegistry.lookup().getPropertyFormatter(propertyId);
        return formatter.formatValue(propertyId, value, LocaleManager.currentLocale());
    }

    protected String formatForComparison(String propertyId, Object value) {
        // Some types need to be prepared for comparison.
        if (value instanceof Number) return _numberComparisonFormat.format(value);
View Full Code Here

Examples of org.jboss.dashboard.provider.DataPropertyFormatter.formatValue()

        DataPropertyFormatter dpf = DataFormatterRegistry.lookup().getPropertyFormatter(propId);
        Locale locale = LocaleManager.currentLocale();
       
        if (FILTER_MIN_VALUE.equals(commandName)) {
            Comparable min = filterProp.getPropertyMinValue();
            return dpf.formatValue(propId, min, locale);
        }
        if (FILTER_MAX_VALUE.equals(commandName)) {
            Comparable max = filterProp.getPropertyMaxValue();
            return dpf.formatValue(propId, max, locale);
        }
View Full Code Here

Examples of org.jboss.dashboard.provider.DataPropertyFormatter.formatValue()

            Comparable min = filterProp.getPropertyMinValue();
            return dpf.formatValue(propId, min, locale);
        }
        if (FILTER_MAX_VALUE.equals(commandName)) {
            Comparable max = filterProp.getPropertyMaxValue();
            return dpf.formatValue(propId, max, locale);
        }
        if (FILTER_SELECTED.equals(commandName)) {
            List values = filterProp.getPropertySelectedValues();
            if (values.isEmpty()) return null;
View Full Code Here

Examples of org.jboss.dashboard.provider.DataPropertyFormatter.formatValue()

            StringBuffer result = new StringBuffer();
            Iterator it = values.iterator();
            while (it.hasNext()) {
                Object value = it.next();
                if (result.length() > 0) result.append(separator);
                result.append(dpf.formatValue(propId, value, locale));
            }
            return result.toString();
        }
        if (FILTER_ALL.equals(commandName)) {
            List values = filterProp.getPropertyDistinctValues();
View Full Code Here

Examples of org.jboss.dashboard.provider.DataPropertyFormatter.formatValue()

            StringBuffer result = new StringBuffer();
            Iterator it = values.iterator();
            while (it.hasNext()) {
                Object value = it.next();
                if (result.length() > 0) result.append(separator);
                result.append(dpf.formatValue(propId, value, locale));
            }
            return result.toString();
        }
        return "[" + commandName + ", command not supported]";
    }
View Full Code Here

Examples of org.jboss.dashboard.provider.DataPropertyFormatter.formatValue()

    public String formatPropertyValue(Object value, Locale l) {
        DataProperty property = getDataProperty();
        DataPropertyFormatter df = getDataPropertyFormatter();
        if (df == null) return value == null ? "" : value.toString();
        if (property != null) return df.formatValue(property, value, l);
        return df.formatValue(propertyId,value,l);
    }

    public Object parsePropertyValue(String value) throws Exception {
        DataPropertyFormatter df = getDataPropertyFormatter();
View Full Code Here

Examples of org.jboss.dashboard.provider.DataPropertyFormatter.formatValue()

    public String formatPropertyValue(Object value, Locale l) {
        DataProperty property = getDataProperty();
        DataPropertyFormatter df = getDataPropertyFormatter();
        if (df == null) return value == null ? "" : value.toString();
        if (property != null) return df.formatValue(property, value, l);
        return df.formatValue(propertyId,value,l);
    }

    public Object parsePropertyValue(String value) throws Exception {
        DataPropertyFormatter df = getDataPropertyFormatter();
        return isStaticProperty() ? df.parsePropertyValue(getPropertyClass(), value) : df.parsePropertyValue(getDataProperty(),value);
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.