Examples of MetadataCol


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

    p.doMetadata(metadataCols, row, rm);
//    p.doAttribs(0,metadataCols, row, rm);

    assertSame(orig, rm.metadataList);

    MetadataCol col1 = new MetadataCol();
    col1.attr = "foo";
    MetadataCol col2 = new MetadataCol();
    col2.attr = "foo2";
    metadataCols.add(col1);
    metadataCols.add(col2);

    p.doMetadata(metadataCols, row, rm);
View Full Code Here

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

    dt.actionCols.add(new ActionInsertFactCol());
    ActionSetFieldCol set = new ActionSetFieldCol();
    set.factField = "foo";
    dt.actionCols.add(set);

    dt.getMetadataCols().add(new MetadataCol());

    dt.attributeCols.add(new AttributeCol());

    dt.conditionCols.add(new ConditionCol());
View Full Code Here

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

            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new HTML( "    " ) );
            hp.add( removeMeta( atc ) );
            hp.add( new SmallLabel( atc.getMetadata() ) );

            final MetadataCol at = atc;
            final CheckBox hide = new CheckBox();
            hide.setValue( atc.isHideColumn() );
            hide.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent sender) {
                    at.setHideColumn( hide.getValue() );
                    dtable.setColumnVisibility( at,
                                                !at.isHideColumn() );
                }
            } );
            hp.add( new HTML( "  " ) );
            hp.add( hide );
            hp.add( new SmallLabel( constants.HideThisColumn() ) );

            attributeConfigWidget.add( hp );
        }
        if ( guidedDecisionTable.getAttributeCols().size() > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new HTML( "  " ) );
            hp.add( new SmallLabel( constants.Attributes() ) );
            attributeConfigWidget.add( hp );
        }

        for ( AttributeCol atc : guidedDecisionTable.getAttributeCols() ) {
            final AttributeCol at = atc;
            HorizontalPanel hp = new HorizontalPanel();

            hp.add( new HTML( "    " ) );
            hp.add( removeAttr( at ) );
            hp.add( new SmallLabel( at.getAttribute() ) );

            final TextBox defaultValue = new TextBox();
            defaultValue.setText( at.getDefaultValue() );
            defaultValue.addChangeHandler( new ChangeHandler() {
                public void onChange(ChangeEvent event) {
                    at.setDefaultValue( defaultValue.getText() );
                }
            } );

            if ( at.getAttribute().equals( RuleAttributeWidget.SALIENCE_ATTR ) ) {
                hp.add( new HTML( "  " ) );
                final CheckBox useRowNumber = new CheckBox();
                useRowNumber.setValue( at.isUseRowNumber() );

                hp.add( useRowNumber );
                hp.add( new SmallLabel( constants.UseRowNumber() ) );
                hp.add( new SmallLabel( "(" ) );
                final CheckBox reverseOrder = new CheckBox();
                reverseOrder.setValue( at.isReverseOrder() );
                reverseOrder.setEnabled( at.isUseRowNumber() );

                useRowNumber.addClickHandler( new ClickHandler() {
                    public void onClick(ClickEvent sender) {
                        at.setUseRowNumber( useRowNumber.getValue() );
                        reverseOrder.setEnabled( useRowNumber.getValue() );
                        dtable.updateSystemControlledColumnValues();
                        dtable.redrawSystemControlledColumns();
                    }
                } );

                reverseOrder.addClickHandler( new ClickHandler() {
                    public void onClick(ClickEvent sender) {
                        at.setReverseOrder( reverseOrder.getValue() );
                        dtable.updateSystemControlledColumnValues();
                        dtable.redrawSystemControlledColumns();
                    }
                } );
                hp.add( reverseOrder );
                hp.add( new SmallLabel( constants.ReverseOrder() ) );
                hp.add( new SmallLabel( ")" ) );
            }
            hp.add( new HTML( "  " ) );
            hp.add( new SmallLabel( constants.DefaultValue() ) );
            hp.add( defaultValue );

            final CheckBox hide = new CheckBox();
            hide.setValue( at.isHideColumn() );
            hide.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent sender) {
                    at.setHideColumn( hide.getValue() );
                    dtable.setColumnVisibility( at,
                                                !at.isHideColumn() );
                }
            } );
            hp.add( new HTML( "  " ) );
            hp.add( hide );
            hp.add( new SmallLabel( constants.HideThisColumn() ) );
View Full Code Here

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

                                                           if ( !isUnique( metadata ) ) {
                                                               Window.alert( constants
                                                                       .ThatColumnNameIsAlreadyInUsePleasePickAnother() );
                                                               return;
                                                           }
                                                           MetadataCol met = new MetadataCol();
                                                           met.setHideColumn( true );
                                                           met.setMetadata( metadata );
                                                           dtable.addColumn( met );
                                                           dtable.scrapeColumns();
                                                           refreshAttributeWidget();
                                                           pop.hide();
                                                       }
View Full Code Here

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

        dt.getActionCols().add( new ActionInsertFactCol() );
        ActionSetFieldCol set = new ActionSetFieldCol();
        set.setFactField( "foo" );
        dt.getActionCols().add( set );

        dt.getMetadataCols().add( new MetadataCol() );

        dt.getAttributeCols().add( new AttributeCol() );

        dt.getConditionCols().add( new ConditionCol() );
View Full Code Here

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

        // add cols for LHS
        RowNumberCol rnc = new RowNumberCol();
        DescriptionCol dc = new DescriptionCol();

        MetadataCol mdc = new MetadataCol();
        mdc.setMetadata( "cheese" );

        AttributeCol ac = new AttributeCol();
        ac.setAttribute( "salience" );

        ActionSetFieldCol asfc = new ActionSetFieldCol();
View Full Code Here

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

    public void testConversion() {

        GuidedDecisionTable dt = new GuidedDecisionTable();
        dt.setTableName( "michael" );

        MetadataCol md = new MetadataCol();
        md.setMetadata( "legacy" );
        md.setDefaultValue( "yes" );
        dt.getMetadataCols().add( md );

        AttributeCol attr = new AttributeCol();
        attr.setAttribute( "salience" );
        attr.setDefaultValue( "66" );
View Full Code Here

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

        // p.doAttribs(allColumns, metadataCols, row, rm);

        assertSame( orig,
                    rm.metadataList );

        MetadataCol col1 = new MetadataCol();
        col1.setMetadata( "foo" );
        MetadataCol col2 = new MetadataCol();
        col2.setMetadata( "foo2" );
        metadataCols.add( col1 );
        metadataCols.add( col2 );
        allColumns.addAll( metadataCols );

        p.doMetadata( allColumns,
View Full Code Here

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

        data[0] = row;

        List<DTColumnConfig> allColumns = new ArrayList<DTColumnConfig>();
        allColumns.add( new RowNumberCol() );
        allColumns.add( new DescriptionCol() );
        allColumns.add( new MetadataCol() );
        List<ConditionCol> cols = new ArrayList<ConditionCol>();

        ConditionCol col = new ConditionCol();
        col.setBoundName( "p1" );
        col.setFactType( "Person" );
View Full Code Here

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

        String[] row = new String[]{"1", "desc", "a", "a condition", "actionsetfield1", "actionsetfield2", "retract", "actioninsertfact1", "actioninsertfact2"};

        List<DTColumnConfig> allColumns = new ArrayList<DTColumnConfig>();
        allColumns.add( new RowNumberCol() );
        allColumns.add( new DescriptionCol() );
        allColumns.add( new MetadataCol() );
        allColumns.add( new ConditionCol() );
        List<ActionCol> cols = new ArrayList<ActionCol>();

        ActionSetFieldCol asf1 = new ActionSetFieldCol();
        asf1.setBoundName( "a" );
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.