Package org.drools.ide.common.client.factconstraints

Examples of org.drools.ide.common.client.factconstraints.ConstraintConfiguration


        return constraintId;
    }

    protected void removeConstraint() {
        if ( constraintsCombo.getSelectedIndex() != -1 ) {
            ConstraintConfiguration c = contraintsMap.get( constraintsCombo.getValue( constraintsCombo.getSelectedIndex() ) );
            ((WorkingSetConfigData) workingSet.getContent()).constraints = this.workingSetEditor.getConstraintsConstrainer().removeConstraint( c );
        }
        fillFieldConstrains();
    }
View Full Code Here


            vpConstraintConf.remove(vpConstraintConf.getWidgetCount() - 1);
            vpConstraintConf.add(new SmallLabel());
            return;
        }
        if (constraintsCombo.getSelectedIndex() != -1) {
            ConstraintConfiguration c = contraintsMap.get(constraintsCombo.getValue(constraintsCombo.getSelectedIndex()));
            ConstraintEditor editor = new ConstraintEditor(c);
            vpConstraintConf.remove(vpConstraintConf.getWidgetCount() - 1);
            vpConstraintConf.add(editor);
        }
    }
View Full Code Here

        addbutton.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                String name = consDefsCombo.getItemText(consDefsCombo.getSelectedIndex());
                ConstraintConfiguration config = ConstraintsContainer.getEmptyConfiguration(name);
                if (config != null) {

                    String factName = factsCombo.getItemText( factsCombo.getSelectedIndex() );
                    String fieldName = fieldsCombo.getItemText( fieldsCombo.getSelectedIndex() );
                    config.setFactType( factName );
                    config.setFieldName( fieldName );
                    if ( ((WorkingSetConfigData) workingSet.getContent()).constraints == null ) {
                        ((WorkingSetConfigData) workingSet.getContent()).constraints = new ArrayList<ConstraintConfiguration>();
                    }
                    ((WorkingSetConfigData) workingSet.getContent()).constraints.add( config );
                    constraintsCombo.addItem( config.getConstraintName(),
                                              addContrainsMap( config ) );
                    workingSetEditor.getConstraintsConstrainer().addConstraint( config );

                }
                pop.hide();
View Full Code Here

        return constraintId;
    }

    protected void removeConstraint() {
        if ( constraintsCombo.getSelectedIndex() != -1 ) {
            ConstraintConfiguration c = contraintsMap.get( constraintsCombo.getValue( constraintsCombo.getSelectedIndex() ) );
            ((WorkingSetConfigData) workingSet.getContent()).constraints = this.workingSetEditor.getConstraintsConstrainer().removeConstraint( c );
        }
        fillFieldConstrains();
    }
View Full Code Here

            vpConstraintConf.remove(vpConstraintConf.getWidgetCount() - 1);
            vpConstraintConf.add(new SmallLabel());
            return;
        }
        if (constraintsCombo.getSelectedIndex() != -1) {
            ConstraintConfiguration c = contraintsMap.get(constraintsCombo.getValue(constraintsCombo.getSelectedIndex()));
            ConstraintEditor editor = new ConstraintEditor(c);
            vpConstraintConf.remove(vpConstraintConf.getWidgetCount() - 1);
            vpConstraintConf.add(editor);
        }
    }
View Full Code Here

        addbutton.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                String name = consDefsCombo.getItemText(consDefsCombo.getSelectedIndex());
                ConstraintConfiguration config = ConstraintsContainer.getEmptyConfiguration(name);
                if (config != null) {

                    String factName = factsCombo.getItemText( factsCombo.getSelectedIndex() );
                    String fieldName = fieldsCombo.getItemText( fieldsCombo.getSelectedIndex() );
                    config.setFactType( factName );
                    config.setFieldName( fieldName );
                    if ( ((WorkingSetConfigData) workingSet.getContent()).constraints == null ) {
                        ((WorkingSetConfigData) workingSet.getContent()).constraints = new ArrayList<ConstraintConfiguration>();
                    }
                    ((WorkingSetConfigData) workingSet.getContent()).constraints.add( config );
                    constraintsCombo.addItem( config.getConstraintName(),
                                              addContrainsMap( config ) );
                    workingSetEditor.getConstraintsConstrainer().addConstraint( config );

                }
                pop.hide();
View Full Code Here

        return constraintId;
    }

    protected void removeConstraint() {
        if ( constraintsCombo.getSelectedIndex() != -1 ) {
            ConstraintConfiguration c = contraintsMap.get( constraintsCombo.getValue( constraintsCombo.getSelectedIndex() ) );
            ((WorkingSetConfigData) workingSet.getContent()).constraints = this.workingSetEditor.getConstraintsConstrainer().removeConstraint( c );
        }
        fillFieldConstrains();
    }
View Full Code Here

            vpConstraintConf.remove(vpConstraintConf.getWidgetCount() - 1);
            vpConstraintConf.add(new SmallLabel());
            return;
        }
        if (constraintsCombo.getSelectedIndex() != -1) {
            ConstraintConfiguration c = contraintsMap.get(constraintsCombo.getValue(constraintsCombo.getSelectedIndex()));
            ConstraintEditor editor = new ConstraintEditor(c);
            vpConstraintConf.remove(vpConstraintConf.getWidgetCount() - 1);
            vpConstraintConf.add(editor);
        }
    }
View Full Code Here

        addbutton.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                String name = consDefsCombo.getItemText(consDefsCombo.getSelectedIndex());
                ConstraintConfiguration config = ConstraintsContainer.getEmptyConfiguration(name);
                if (config != null) {

                    String factName = factsCombo.getItemText( factsCombo.getSelectedIndex() );
                    String fieldName = fieldsCombo.getItemText( fieldsCombo.getSelectedIndex() );
                    config.setFactType( factName );
                    config.setFieldName( fieldName );
                    if ( ((WorkingSetConfigData) workingSet.getContent()).constraints == null ) {
                        ((WorkingSetConfigData) workingSet.getContent()).constraints = new ArrayList<ConstraintConfiguration>();
                    }
                    ((WorkingSetConfigData) workingSet.getContent()).constraints.add( config );
                    constraintsCombo.addItem( config.getConstraintName(),
                                              addContrainsMap( config ) );
                    workingSetEditor.getConstraintsConstrainer().addConstraint( config );

                }
                pop.hide();
View Full Code Here

        return constraintId;
    }

    protected void removeConstraint() {
        if ( constraintsCombo.getSelectedIndex() != -1 ) {
            ConstraintConfiguration c = contraintsMap.get( constraintsCombo.getValue( constraintsCombo.getSelectedIndex() ) );
            ((WorkingSetConfigData) workingSet.getContent()).constraints = this.workingSetEditor.getConstraintsConstrainer().removeConstraint( c );
        }
        fillFieldConstrains();
    }
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.factconstraints.ConstraintConfiguration

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.