Package org.drools.ide.common.client.modeldriven

Examples of org.drools.ide.common.client.modeldriven.DropDownData


        } else {
            Map<String, String> mFactTypes = scenario.getVariableTypes();
            type = mFactTypes.get( this.mCall.getVariable() );
        }

        DropDownData enums = suggestionCompletionEngine.getEnums( type,
                val.field, this.mCall.getCallFieldValues()
        );
        return new MethodParameterCallValueEditor( val,
                                                   enums,
                                                   executionTrace,
View Full Code Here


            panel.add( datePicker );

        } else {
            Map<String, String> currentValueMap = new HashMap<String, String>();
            // TODO fill currentValueMap with values of other VerifyFields (if any)
            DropDownData dropDownData = sce.getEnums( factType,
                                                      field.getFieldName(),
                                                      currentValueMap );
            if ( dropDownData != null ) {
                //GUVNOR-1324: Java enums are of type TYPE_COMPARABLE whereas Guvnor enums are not.
                //The distinction here controls whether the EXPECTED value is handled as a true
View Full Code Here

                        dropDownFields.setDropDownData(selectedField, DropDownData.create(getEligibleFields(newValue, typesForAttributes)));
                        //dropDownFields.setSelectedIndex(0);
                    }
                }, DropDownData.create(sce.getFactTypes()));

        DropDownData dropDownData = DropDownData.create(getEligibleFields(selectedFact, typesForAttributes));
        dropDownFields.setDropDownData("", dropDownData);

        cGrid.setWidget(0, 0, new Label("Name"));
        final TextBox tbName = TextBoxFactory.getTextBox(SuggestionCompletionEngine.TYPE_STRING);
        cGrid.setWidget(0, 1, tbName);
View Full Code Here

        } else {
            //TODO {manstis} This should never happen
            throw new IllegalArgumentException( "That should not have happened!" );
        }

        final DropDownData dropDownData;
        if ( SuggestionCompletionEngine.TYPE_BOOLEAN.equals( valueType ) ) {
            dropDownData = DropDownData.create( new String[]{"true", "false"} ); //NON-NLS
        } else {
            dropDownData = sce.getEnums( this.factType,
                                         this.constraintList,
View Full Code Here

                    //a couple of drop-downs so it's quicker to simply update them all.
                    updateEnumDropDowns();
                }
            };

            DropDownData dropDownData = getDropDownData();
            resultWidget = new EnumDropDown( value,
                                             handler,
                                             dropDownData );

            //Wrap widget within a HorizontalPanel to add a space before and after the Widget
View Full Code Here

            resultWidget.setDropDownData( selectedValue,
                                          getDropDownData() );
        }

        private DropDownData getDropDownData() {
            DropDownData dropDownData = completions.getEnums( factType,
                                                              factField,
                                                              sentence.getEnumFieldValueMap() );
            return dropDownData;
        }
View Full Code Here

        } else {
            Map<String, String> currentValueMap = new HashMap<String, String>();
            for (FieldData otherFieldData : givenFact.getFieldData()) {
                currentValueMap.put(otherFieldData.getName(), otherFieldData.getValue());
            }
            DropDownData dropDownData = sce.getEnums(factType, field.getName(), currentValueMap);
            if ( dropDownData != null ) {
                field.setNature( FieldData.TYPE_ENUM );
                dependentEnumEditors = new ArrayList<FieldDataConstraintEditor>();
                valueEditorWidget = dropDownEditor( dropDownData );
                panel.add( valueEditorWidget );
View Full Code Here

            Map<String, String> currentValueMap = new HashMap<String, String>();
            for ( FieldData otherFieldData : givenFact.getFieldData() ) {
                currentValueMap.put( otherFieldData.getName(),
                                     otherFieldData.getValue() );
            }
            DropDownData dropDownData = sce.getEnums( factType,
                                                      field.getName(),
                                                      currentValueMap );
            dropdown.setDropDownData( field.getValue(),
                                      dropDownData );
        }
View Full Code Here

        } else {
            valueType = sce.getFieldType( pattern.getFactType(),
                                          fieldName );
        }

        final DropDownData dropDownData;
        if ( SuggestionCompletionEngine.TYPE_BOOLEAN.equals( valueType ) ) {
            dropDownData = DropDownData.create( new String[]{"true", "false"} ); //NON-NLS
        } else {
            dropDownData = sce.getEnums( pattern,
                                         fieldName );
View Full Code Here

            if ( type == null ) {
                type = this.getModeller().getModel().getRHSBoundFact( this.model.variable ).factType;
            }
        }

        DropDownData enums = completions.getEnums( type,
                val.field, this.model.fieldValues
        );
        ActionValueEditor actionValueEditor = new ActionValueEditor( val,
                                                                     enums,
                                                                     this.getModeller(),
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.DropDownData

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.