Package smilehouse.gui.html.fieldbased.formatter

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

Related Classes of smilehouse.gui.html.fieldbased.formatter.DoubleFormatter

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.