Examples of DoubleFormatter


Examples of ariba.util.formatter.DoubleFormatter

        }

        Object bigDecimal = new AWVBigDecimalFormatter("#,###.##", 2, locale);
        formatters.put(BigDecimalFormatterKey, bigDecimal);
        xml.put(BigDecimalFormatterKey, new PipedFormatter(CanonicalNumberFormatter, bigDecimal));
        Object dbl = new DoubleFormatter() {
            protected String formatObject (Object object, Locale locale)
            {
                Assert.that(object instanceof Double, "invalid type");
                return getStringValue((Double)object, 3, 3, "#,###.000", locale);
            }
View Full Code Here

Examples of smilehouse.gui.html.fieldbased.formatter.DoubleFormatter

                    public void setModelValue(Object model, Object value) throws Exception {
                        ((OrderSource) model).setSumGreaterThan((Double) value);
                    }
                };
                DoubleFormatter formatter = new DoubleFormatter();
                formatter.setAcceptEmptyValues(true);
                TextEditor editor = new TextEditor();
                editor.setSize(10);
                editor.setFormatter(formatter);

                FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);
                context.addFieldInfo(fieldInfo);
            }
            {
                // -------------
                // Sum less than
                // -------------
                String id = OrderSource.SUM_LESS_THAN_ATTR;
                ModelModifier modifier = new DefaultModelModifier() {
                    public Object getModelValue(Object model) throws Exception {
                        return ((OrderSource) model).getSumLessThan();
                    }

                    public void setModelValue(Object model, Object value) throws Exception {
                        ((OrderSource) model).setSumLessThan((Double) value);
                    }
                };
                DoubleFormatter formatter = new DoubleFormatter();
                formatter.setAcceptEmptyValues(true);
                TextEditor editor = new TextEditor();
                editor.setSize(10);
                editor.setFormatter(formatter);

                FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);
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.