Package org.drools.guvnor.client.modeldriven.ui

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


        final FormStylePopup pop = new FormStylePopup();
        pop.setTitle( constants.SetTheOperator() );
        pop.setModal( false );
        String[] ops = this.sce.getOperatorCompletions( editingPattern.getFactType(),
                                                        editingCol.getFactField() );
        final CEPOperatorsDropdown box = new CEPOperatorsDropdown( ops,
                                                                   editingCol );

        if ( BaseSingleFieldConstraint.TYPE_LITERAL == this.editingCol
                .getConstraintValueType() ) {
            box.addItem( HumanReadable.getOperatorDisplayName( "in" ),
                         "in" );
        }

        box.addItem( constants.noOperator(),
                     "" );
        pop.addAttribute( constants.Operator(),
                          box );
        Button b = new Button( constants.OK() );
        pop.addAttribute( "",
                          b );
        b.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                editingCol.setOperator( box.getValue( box.getSelectedIndex() ) );
                doOperatorLabel();
                pop.hide();
            }
        } );
        pop.show();
View Full Code Here


        if ( !isReadOnly ) {
            String factType = this.pattern.getFactType();
            String[] operators = this.getCompletions().getConnectiveOperatorCompletions( factType,
                                                                                         fieldName );
            CEPOperatorsDropdown w = new CEPOperatorsDropdown( operators,
                                                               con );

            w.addValueChangeHandler( new ValueChangeHandler<OperatorSelection>() {

                public void onValueChange(ValueChangeEvent<OperatorSelection> event) {
                    OperatorSelection selection = event.getValue();
                    String selected = selection.getValue();
                    con.setOperator( selected );
View Full Code Here

        final FormStylePopup pop = new FormStylePopup();
        pop.setTitle( constants.SetTheOperator() );
        pop.setModal( false );
        String[] ops = this.sce.getOperatorCompletions( editingPattern.getFactType(),
                                                        editingCol.getFactField() );
        final CEPOperatorsDropdown box = new CEPOperatorsDropdown( ops,
                                                                   editingCol );

        if ( BaseSingleFieldConstraint.TYPE_LITERAL == this.editingCol
                .getConstraintValueType() ) {
            box.addItem( HumanReadable.getOperatorDisplayName( "in" ),
                         "in" );
        }

        box.addItem( constants.noOperator(),
                     "" );
        pop.addAttribute( constants.Operator(),
                          box );
        Button b = new Button( constants.OK() );
        pop.addAttribute( "",
                          b );
        b.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                editingCol.setOperator( box.getValue( box.getSelectedIndex() ) );
                doOperatorLabel();
                pop.hide();
            }
        } );
        pop.show();
View Full Code Here

            String factType = cc.getFactType();
            String fieldName = cc.getFieldName();

            String[] operators = this.getCompletions().getConnectiveOperatorCompletions( factType,
                                                                                         fieldName );
            CEPOperatorsDropdown w = new CEPOperatorsDropdown( operators,
                                                               cc );

            w.addValueChangeHandler( new ValueChangeHandler<OperatorSelection>() {

                public void onValueChange(ValueChangeEvent<OperatorSelection> event) {
                    OperatorSelection selection = event.getValue();
                    String selected = selection.getValue();
                    cc.setOperator( selected );
View Full Code Here

        final FormStylePopup pop = new FormStylePopup();
        pop.setTitle( constants.SetTheOperator() );
        pop.setModal( false );
        String[] ops = this.sce.getOperatorCompletions( editingPattern.getFactType(),
                                                        editingCol.getFactField() );
        final CEPOperatorsDropdown box = new CEPOperatorsDropdown( ops,
                                                                   editingCol );

        if ( BaseSingleFieldConstraint.TYPE_LITERAL == this.editingCol
                .getConstraintValueType() ) {
            box.addItem( HumanReadable.getOperatorDisplayName( "in" ),
                         "in" );
        }

        box.addItem( constants.noOperator(),
                     "" );
        pop.addAttribute( constants.Operator(),
                          box );
        Button b = new Button( constants.OK() );
        pop.addAttribute( "",
                          b );
        b.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                editingCol.setOperator( box.getValue( box.getSelectedIndex() ) );
                doOperatorLabel();
                pop.hide();
            }
        } );
        pop.show();
View Full Code Here

                    txtPredicateExpression.setText( chosenConditionsSelection.getFactField() );
                }

                String[] ops = presenter.getOperatorCompletions( availablePatternsSelection,
                                                                 chosenConditionsSelection );
                CEPOperatorsDropdown ddOperator = new CEPOperatorsDropdown( ops,
                                                                            chosenConditionsSelection );
                ddOperator.addValueChangeHandler( new ValueChangeHandler<OperatorSelection>() {

                    public void onValueChange(ValueChangeEvent<OperatorSelection> event) {
                        chosenConditionsSelection.setOperator( event.getValue().getValue() );
                        presenter.stateChanged();
                        validateConditionOperator();
                    }

                } );

                if ( chosenConditionsSelection.getConstraintValueType() == BaseSingleFieldConstraint.TYPE_LITERAL ) {
                    ddOperator.addItem( HumanReadable.getOperatorDisplayName( "in" ),
                                        "in" );
                }

                ddOperatorContainer.setWidget( ddOperator );
            }
View Full Code Here

                    txtPredicateExpression.setText( chosenConditionsSelection.getFactField() );
                }

                String[] ops = presenter.getOperatorCompletions( availablePatternsSelection,
                                                                 chosenConditionsSelection );
                CEPOperatorsDropdown ddOperator = new CEPOperatorsDropdown( ops,
                                                                            chosenConditionsSelection );
                ddOperator.addValueChangeHandler( new ValueChangeHandler<OperatorSelection>() {

                    public void onValueChange(ValueChangeEvent<OperatorSelection> event) {
                        chosenConditionsSelection.setOperator( event.getValue().getValue() );
                        presenter.stateChanged();
                        validateConditionOperator();
                    }

                } );

                if ( chosenConditionsSelection.getConstraintValueType() == BaseSingleFieldConstraint.TYPE_LITERAL ) {
                    ddOperator.addItem( HumanReadable.getOperatorDisplayName( "in" ),
                                        "in" );
                }

                ddOperatorContainer.setWidget( ddOperator );
            }
View Full Code Here

        final FormStylePopup pop = new FormStylePopup();
        pop.setTitle(constants.SetTheOperator());
        pop.setModal(false);
        String[] ops = this.sce.getOperatorCompletions(editingPattern.getFactType(),
                editingCol.getFactField());
        final CEPOperatorsDropdown box = new CEPOperatorsDropdown(ops,
                editingCol);

        if (BaseSingleFieldConstraint.TYPE_LITERAL == this.editingCol
                .getConstraintValueType()) {
            box.addItem(HumanReadable.getOperatorDisplayName("in"),
                    "in");
        }

        box.addItem(constants.noOperator(),
                "");
        pop.addAttribute(constants.Operator(),
                box);
        Button b = new Button(constants.OK());
        pop.addAttribute("",
                b);
        b.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent w) {
                editingCol.setOperator(box.getValue(box.getSelectedIndex()));
                doOperatorLabel();
                pop.hide();
            }
        });
        pop.show();
View Full Code Here

                                              String fieldName) {

        String factType = this.pattern.getFactType();
        String[] operators = this.getCompletions().getConnectiveOperatorCompletions( factType,
                                                                                     fieldName );
        CEPOperatorsDropdown w = new CEPOperatorsDropdown( operators,
                                                           con );

        w.addValueChangeHandler( new ValueChangeHandler<OperatorSelection>() {

            public void onValueChange(ValueChangeEvent<OperatorSelection> event) {
                OperatorSelection selection = event.getValue();
                String selected = selection.getValue();
                con.setOperator( selected );
View Full Code Here

        final FormStylePopup pop = new FormStylePopup();
        pop.setTitle( constants.SetTheOperator() );
        pop.setModal( false );
        String[] ops = this.sce.getOperatorCompletions( editingPattern.getFactType(),
                                                        editingCol.getFactField() );
        final CEPOperatorsDropdown box = new CEPOperatorsDropdown( ops,
                                                                   editingCol );

        if ( BaseSingleFieldConstraint.TYPE_LITERAL == this.editingCol
                .getConstraintValueType() ) {
            box.addItem( HumanReadable.getOperatorDisplayName( "in" ),
                         "in" );
        }

        box.addItem( constants.noOperator(),
                     "" );
        pop.addAttribute( constants.Operator(),
                          box );
        Button b = new Button( constants.OK() );
        pop.addAttribute( "",
                          b );
        b.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                editingCol.setOperator( box.getValue( box.getSelectedIndex() ) );
                doOperatorLabel();
                pop.hide();
            }
        } );
        pop.show();
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.modeldriven.ui.CEPOperatorsDropdown

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.