Package org.jbpm.ui.validation.ValidatorDefinition

Examples of org.jbpm.ui.validation.ValidatorDefinition.Param


                        }
                    }

                    IConfigurationElement[] paramElements = configElement.getChildren();
                    for (IConfigurationElement paramElement : paramElements) {
                        Param param = new Param(
                                paramElement.getAttribute("name"),
                                paramElement.getAttribute("displayName"),
                                paramElement.getAttribute("type"));
                        definition.addParam(param);
                    }
                    definitions.put(definition.getName(), definition);
                } catch (Exception e) {
                    DesignerLogger.logError("Error processing org.jbpm.ui.validators element", e);
                }
            }
        }
       
        ValidatorDefinition global = new ValidatorDefinition(
                ValidatorDefinition.GLOBAL_VALIDATOR_NAME,
                "BSH",
                ValidatorDefinition.GLOBAL_TYPE,
                "BSH code");
        global.addParam(new Param(ValidatorDefinition.EXPRESSION_PARAM_NAME, "", Param.BSH_TYPE));
        definitions.put(ValidatorDefinition.GLOBAL_VALIDATOR_NAME, global);
    }
View Full Code Here


        }

        @Override
        protected void build(Map<String, Param> defParams, Map<String, String> configParams) {
            for (String name : defParams.keySet()) {
                Param param = defParams.get(name);

                Label label = new Label(this, SWT.NONE);
                label.setText(param.getDisplayName());
                label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

                Combo combo = new Combo(this, SWT.READ_ONLY);
                combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

                combo.addSelectionListener(this);

                String textData = configParams.get(name);
                if (Param.BOOLEAN_TYPE.equals(param.getType())) {
                    combo.add(""); // default
                    combo.add("true");
                    combo.add("false");
                } else {
                    if (textData != null) {
                        combo.add(textData);
                        combo.setData(DATA_KEY, textData);
                    }
                    combo.add(""); // default
                    combo.add(INPUT_VALUE);
                }
                if (textData != null) {
                    combo.setText(textData);
                }
                combo.setData(TYPE_KEY, param.getType());

                inputCombos.put(name, combo);
            }
            this.pack(true);
        }
View Full Code Here

TOP

Related Classes of org.jbpm.ui.validation.ValidatorDefinition.Param

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.