Examples of EnumDropDown


Examples of org.drools.guvnor.client.modeldriven.ui.EnumDropDown

                                                 field.expected );
            box.addKeyboardListener( ActionValueEditor.getNumericFilter( box ) );
            panel.add( box );
        } else if ( flType.equals( SuggestionCompletionEngine.TYPE_BOOLEAN ) ) {
            String[] c = new String[]{"true", "false"};
            panel.add( new EnumDropDown( field.expected,
                                         new DropDownValueChanged() {
                                             public void valueChanged(String newText,
                                                                      String newValue) {
                                                 callback.valueChanged( newValue );
                                             }
                                         },
                                         DropDownData.create( c ) ) );
        } else if (flType != null && flType.equals(SuggestionCompletionEngine.TYPE_DATE)) {          
            final DatePickerTextBox datePicker = new DatePickerTextBox( field.expected );
            String m = Format.format(((Constants) GWT.create(Constants.class)).ValueFor0(),
                field.fieldName);
            datePicker.setTitle(m);
            datePicker.addValueChanged(new ValueChanged() {
                public void valueChanged(String newValue) {
                  field.expected = newValue;
                }
            });

             panel.add(datePicker);
        } else {
            String[] enums = sce.getDataEnumList( key );
            if ( enums != null ) {
                panel.add( new EnumDropDown( field.expected,
                                             new DropDownValueChanged() {
                                                 public void valueChanged(String newText,
                                                                          String newValue) {
                                                     callback.valueChanged( newValue );
                                                 }
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.ui.EnumDropDown

                    field.value);
            box.addKeyboardListener(ActionValueEditor.getNumericFilter(box));
            panel.add(box);
        } else if (flType != null && flType.equals(SuggestionCompletionEngine.TYPE_BOOLEAN)) {
            String[] c = new String[]{"true", "false"};
            panel.add(new EnumDropDown(field.value,
                    new DropDownValueChanged() {
                        public void valueChanged(String newText,
                                                 String newValue) {
                            callback.valueChanged(newValue);
                        }
                    },
                    DropDownData.create(c)));
        } else if (flType != null && flType.equals(SuggestionCompletionEngine.TYPE_DATE)) {          
            final DatePickerTextBox datePicker = new DatePickerTextBox( field.value );
            String m = Format.format(((Constants) GWT.create(Constants.class)).ValueFor0(),
                field.name);
            datePicker.setTitle(m);
            datePicker.addValueChanged(new ValueChanged() {
                public void valueChanged(String newValue) {
                    field.value = newValue;
                }
            });

             panel.add(datePicker);
        } else {
            String[] enums = sce.getDataEnumList(key);
            if (enums != null) {
                panel.add(new EnumDropDown(field.value,
                        new DropDownValueChanged() {
                            public void valueChanged(String newText,
                                                     String newValue) {
                                callback.valueChanged(newValue);
                            }
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.ui.EnumDropDown

    }

    private void refresh() {
        root.clear();
        if ( enums != null && (enums.fixedList != null || enums.queryExpression != null) ) {
            root.add( new EnumDropDown( methodParameter.value,
                                        new DropDownValueChanged() {
                                            public void valueChanged(String newText,
                                                                     String newValue) {
                                                methodParameter.value = newValue;
                                                if ( onValueChangeCommand != null ) {
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.ui.EnumDropDown

        return tb;
    }
   
    private EnumDropDown booleanEditor() {
        return new EnumDropDown( field.getValue(),
                                 new DropDownValueChanged() {
                                     public void valueChanged(String newText,
                                                              String newValue) {
                                         callback.valueChanged( newValue );
                                     }
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.ui.EnumDropDown

                                 },
                                 DropDownData.create( new String[]{"true", "false"} ) );
    }

    private EnumDropDown dropDownEditor(final DropDownData dropDownData) {
        return new EnumDropDown( field.getValue(),
                                 new DropDownValueChanged() {
                                     public void valueChanged(String newText,
                                                              String newValue) {
                                         callback.valueChanged( newValue );
                                         for ( FieldDataConstraintEditor dependentEnumEditor : dependentEnumEditors ) {
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.ui.EnumDropDown

                                    child.field.getName() );
    }
   
    private void refreshDropDownData() {
        if ( this.valueEditorWidget instanceof EnumDropDown ) {
            final EnumDropDown dropdown = (EnumDropDown) this.valueEditorWidget;
            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

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

    private Widget enumEditor() {
        if ( this.readOnly ) {
            return new SmallLabel( assertValue() );
        }

        EnumDropDown enumDropDown = new EnumDropDown( value.getValue(),
                                                      new DropDownValueChanged() {

                                                          public void valueChanged( String newText,
                                                                                    String newValue ) {
                                                              value.setValue( newValue );
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

    }

    private void refresh() {
        root.clear();
        if ( enums != null && ( enums.getFixedList() != null || enums.getQueryExpression() != null ) ) {
            root.add( new EnumDropDown( methodParameter.getValue(),
                                        new DropDownValueChanged() {
                                            public void valueChanged( String newText,
                                                                      String newValue ) {
                                                methodParameter.setValue( newValue );
                                                if ( onValueChangeCommand != null ) {
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

        //Enumeration (these support multi-select for "in" and "not in", so check before comma separated lists)
        if ( this.dropDownData != null ) {
            final String operator = constraint.getOperator();
            final boolean multipleSelect = OperatorsOracle.operatorRequiresList(operator);
            EnumDropDown enumDropDown = new EnumDropDown( constraint.getValue(),
                                                          new DropDownValueChanged() {

                                                              public void valueChanged( String newText,
                                                                                        String newValue ) {
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

        if ( this.constraintWidget instanceof HorizontalPanel ) {
            HorizontalPanel hp = (HorizontalPanel) this.constraintWidget;
            for ( int iChildIndex = 0; iChildIndex < hp.getWidgetCount(); iChildIndex++ ) {
                Widget w = hp.getWidget( iChildIndex );
                if ( w instanceof EnumDropDown ) {
                    EnumDropDown edd = (EnumDropDown) w;
                    edd.setDropDownData( constraint.getValue(),
                                         getDropDownData() );
                }
            }
        }
    }
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.