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

Examples of org.drools.ide.common.client.modeldriven.dt.ConditionCol


        }
    }

    private String getFactType(String boundName) {
        for ( Iterator iterator = dt.conditionCols.iterator(); iterator.hasNext(); ) {
            ConditionCol col = (ConditionCol) iterator.next();
            if ( col.boundName.equals( boundName ) ) {
                return col.factType;
            }
        }
        return "";
View Full Code Here


    }

    private ListBox loadBoundFacts() {
        Set facts = new HashSet();
        for ( int i = 0; i < this.dt.conditionCols.size(); i++ ) {
            ConditionCol c = (ConditionCol) dt.conditionCols.get( i );
            facts.add( c.boundName );
        }

        ListBox box = new ListBox();
        for ( Iterator iterator = facts.iterator(); iterator.hasNext(); ) {
View Full Code Here

                                final boolean isNew) {
        super();
        this.setModal( false );
        this.dt = dt;
        this.sce = sce;
        this.editingCol = new ConditionCol();
        editingCol.boundName = col.boundName;
        editingCol.constraintValueType = col.constraintValueType;
        editingCol.factField = col.factField;
        editingCol.factType = col.factType;
        editingCol.header = col.header;
View Full Code Here

    private ListBox loadPatterns() {
        Set vars = new HashSet();
        ListBox patterns = new ListBox();
        for ( int i = 0; i < dt.conditionCols.size(); i++ ) {
            ConditionCol c = dt.conditionCols.get( i );
            if ( !vars.contains( c.boundName ) ) {
                patterns.addItem( c.factType + " [" + c.boundName + "]",
                                  c.factType + " " + c.boundName );
                vars.add( c.boundName );
            }
View Full Code Here

        at2.setAttribute( "enabled" );

        dt.getAttributeCols().add( at1 );
        dt.getAttributeCols().add( at2 );

        c1 = new ConditionCol();
        c1.setBoundName( "c1" );
        c1.setFactType( "Driver" );
        c1.setFactField( "name" );
        c1.setOperator( "==" );
        c1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        dt.getConditionCols().add( c1 );

        c2 = new ConditionCol();
        c2.setBoundName( "c2" );
        c2.setFactType( "Driver" );
        c2.setFactField( "age" );
        c2.setOperator( "==" );
        c2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        dt.getConditionCols().add( c2 );

        c3 = new ConditionCol();
        c3.setBoundName( "c3" );
        c3.setFactType( "Driver" );
        c3.setFactField( "dateOfBirth" );
        c3.setOperator( "==" );
        c3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        dt.getConditionCols().add( c3 );

        c4 = new ConditionCol();
        c4.setBoundName( "c4" );
        c4.setFactType( "Driver" );
        c4.setFactField( "approved" );
        c4.setOperator( "==" );
        c4.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
View Full Code Here

        }
    }

    private String getFactType(String boundName) {
        for ( Iterator iterator = dt.conditionCols.iterator(); iterator.hasNext(); ) {
            ConditionCol col = (ConditionCol) iterator.next();
            if ( col.boundName.equals( boundName ) ) {
                return col.factType;
            }
        }
        return "";
View Full Code Here

    }

    private ListBox loadBoundFacts() {
        Set facts = new HashSet();
        for ( int i = 0; i < this.dt.conditionCols.size(); i++ ) {
            ConditionCol c = (ConditionCol) dt.conditionCols.get( i );
            facts.add( c.boundName );
        }

        ListBox box = new ListBox();
        for ( Iterator iterator = facts.iterator(); iterator.hasNext(); ) {
View Full Code Here

    }

    private void refreshConditionsWidget() {
        this.conditionsConfigWidget.clear();
        for ( int i = 0; i < dt.conditionCols.size(); i++ ) {
            ConditionCol c = dt.conditionCols.get( i );
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( removeCondition( c ) );
            hp.add( editCondition( c ) );
            hp.add( new SmallLabel( c.header ) );
            conditionsConfigWidget.add( hp );
View Full Code Here

        conditionsConfigWidget.add( newCondition() );

    }

    private Widget newCondition() {
        final ConditionCol newCol = new ConditionCol();
        newCol.constraintValueType = BaseSingleFieldConstraint.TYPE_LITERAL;
        return new ImageButton( "images/new_item.gif",
                                constants.AddANewConditionColumn(),
                                new ClickListener() { //NON-NLS
                                    public void onClick(Widget w) {
View Full Code Here

        }

        //do all the condition cols
        for ( int i = 0; i < dt.conditionCols.size(); i++ ) {
            //here we could also deal with numeric type?
            final ConditionCol c = dt.conditionCols.get( i );
            fds[colCount] = new StringFieldDef( c.header );
            cols[colCount] = new ColumnConfig() {
                {
                    setHeader( c.header );
                    setDataIndex( c.header );
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.dt.ConditionCol

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.