Examples of ParamField


Examples of org.geotools.swing.wizard.ParamField

                txt +="*";
            }
            JLabel label = new JLabel(txt);
            page.add(label);

            ParamField field = ParamField.create(param);
            JComponent component = field.doLayout();
            page.add(component, "span, wrap");

            fields.put(param, field);

            if (param.description != null) {
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField

    @Override
    public void preDisplayPanel() {
        // populate panel from params map
        for (Entry<Parameter<?>, ParamField> entry : fields.entrySet()) {
            Parameter<?> param = entry.getKey();
            ParamField field = entry.getValue();
            Object value = null;
            Object object = connectionParameters.get( param.key);
            value = Converters.convert( object, param.type );
            if( value == null ) {
                value = object;
            }               
            if( value == null && param.required ){
                value = param.sample;
            }
            field.setValue(value);
        }
        for (Entry<Parameter<?>, ParamField> entry : fields.entrySet()) {
            ParamField field = entry.getValue();
            field.addListener(getJWizard().getController());
        }
    }
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField

    @Override
    public void preClosePanel() {
        for (Entry<Parameter<?>, ParamField> entry : fields.entrySet()) {
            Parameter<?> param = entry.getKey();
            ParamField field = entry.getValue();

            Object value = field.getValue();
            connectionParameters.put(param.key, value);
            //field.setValue(value);
        }
        for (Entry<Parameter<?>, ParamField> entry : fields.entrySet()) {
            ParamField field = entry.getValue();
            field.removeListener(getJWizard().getController());
        }
    }
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField

    @Override
    public boolean isValid() {
        // populate panel
        for (Entry<Parameter<?>, ParamField> entry : fields.entrySet()) {
            Parameter<?> param = entry.getKey();
            ParamField field = entry.getValue();

            if (!field.validate()) {               
                return false; // not validate
            }
            if (param.required && field.getValue() == null) {
                return false; // a value is required here
            }
        }
        return true;
    }
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField

                txt +="*";
            }
            JLabel label = new JLabel(txt);
            page.add(label);

            ParamField field = ParamField.create(param);
            JComponent component = field.doLayout();
            page.add(component, "span, wrap");

            fields.put(param, field);

            if (param.description != null) {
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField

    @Override
    public void preDisplayPanel() {
        // populate panel from params map
        for (Entry<Param, ParamField> entry : fields.entrySet()) {
            Param param = entry.getKey();
            ParamField field = entry.getValue();
            Object value = null;
            try {
                value = param.lookUp(connectionParameters);
            } catch (IOException e) {
            }
            if( value == null && param.required ){
                value = param.sample;
            }
            field.setValue(value);
        }
        for (Entry<Param, ParamField> entry : fields.entrySet()) {
            ParamField field = entry.getValue();
            field.addListener(getJWizard().getController());
        }
    }
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField

    @Override
    public void preClosePanel() {
        for (Entry<Param, ParamField> entry : fields.entrySet()) {
            Param param = entry.getKey();
            ParamField field = entry.getValue();

            Object value = field.getValue();
            connectionParameters.put(param.key, (Serializable) value);
            field.setValue(value);
        }
        for (Entry<Param, ParamField> entry : fields.entrySet()) {
            ParamField field = entry.getValue();
            field.removeListener(getJWizard().getController());
        }
    }
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField

                        values.add(pw.getValue());
                    }
                }
                paramMap.put(key, values);
            } else { // only a single value/widget
                ParamField ParamField = pws.get(0);
                if (ParamField.getValue() != null) {
                    paramMap.put(key, ParamField.getValue());
                }
            }

        }
    }
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField

            // one widget)
            List<ParamField> widgets = new ArrayList<ParamField>();

            // loop through and create the min number of widgets for this param
            for (int i = 0; i < min; i++) {
                ParamField newWidget = createNewField(parameter, true);
                widgets.add(newWidget);
            }
            // add the widget(s) to the fields map
            fields.put(parameter.key, widgets);
        }
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField

       
        JLabel label;
        label = new JLabel(parameter.title.toString());
        page.add(label);

        ParamField widget;
        if (Double.class.isAssignableFrom(parameter.type)) {
            widget = new JDoubleField(parameter);
        } else if (Geometry.class.isAssignableFrom(parameter.type)) {
            widget = new JGeometryField(parameter);
        } else {
            // We got nothing special, let's hope the converter api can deal
            widget = new JField(parameter);
        }
        JComponent field = widget.doLayout();
        page.add(field);
        page.validate();

        // resize the wizard to fit new component
        if (resize) {
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.