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

Examples of org.drools.ide.common.client.modeldriven.brl.RuleMetadata


            hp.add(new SmallLabel(constants.Metadata2()));
            //attributeConfigWidget.add(hp);
            layout.addRow(hp);
        }
        for (int i = 0; i < meta.length; i++) {
            RuleMetadata rmd = meta[i];
            layout.addAttribute(rmd.attributeName, getEditorWidget(rmd, i));
        }
        RuleAttribute[] attrs = model.attributes;
        if (attrs.length > 0) {
            HorizontalPanel hp = new HorizontalPanel();
View Full Code Here


            HorizontalPanel hp = new HorizontalPanel();
            hp.add(new SmallLabel(constants.Metadata2()));
            layout.addRow(hp);
        }
        for (int i = 0; i < meta.length; i++) {
            RuleMetadata rmd = meta[i];
            layout.addAttribute(rmd.attributeName, getEditorWidget(rmd, i));
        }
        RuleAttribute[] attrs = model.attributes;
        if (attrs.length > 0) {
            HorizontalPanel hp = new HorizontalPanel();
View Full Code Here

        list.addChangeHandler( new  ChangeHandler() {
            public void onChange(ChangeEvent event) {
                String attr = list.getItemText(list.getSelectedIndex());
                if (attr.equals(RuleAttributeWidget.LOCK_LHS) || attr.equals(RuleAttributeWidget.LOCK_RHS)) {
                    model.addMetadata(new RuleMetadata(attr, "true"));
                } else {
                    model.addAttribute(new RuleAttribute(attr, ""));
                }
                refreshWidget();
                pop.hide();
            }
        });
        box.setVisibleLength(15);

        addbutton.setTitle(constants.AddMetadataToTheRule());

        addbutton.addClickHandler(new ClickHandler() {
     
      public void onClick(ClickEvent event) {

                model.addMetadata(new RuleMetadata(box.getText(), ""));
                refreshWidget();
                pop.hide();
            }
        });
        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
        horiz.add(box);
        horiz.add(addbutton);





        pop.addAttribute(constants.Metadata3(), horiz);
        pop.addAttribute(constants.Attribute1(), list);

        Button freezeConditions = new Button(constants.Conditions());
        freezeConditions.addClickHandler(new ClickHandler() {
     
      public void onClick(ClickEvent event) {
                model.addMetadata(new RuleMetadata(RuleAttributeWidget.LOCK_LHS, "true"));
                refreshWidget();
                pop.hide();
            }
        });
        Button freezeActions = new Button(constants.Actions());
        freezeActions.addClickHandler(new ClickHandler() {
     
      public void onClick(ClickEvent event) {
                model.addMetadata(new RuleMetadata(RuleAttributeWidget.LOCK_RHS, "true"));
                refreshWidget();
                pop.hide();
            }
        });
        HorizontalPanel hz = new HorizontalPanel();
View Full Code Here

        list.addChangeHandler( new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                String attr = list.getItemText( list.getSelectedIndex() );
                if ( attr.equals( RuleAttributeWidget.LOCK_LHS ) || attr.equals( RuleAttributeWidget.LOCK_RHS ) ) {
                    model.addMetadata( new RuleMetadata( attr,
                                                         "true" ) );
                } else {
                    model.addAttribute( new RuleAttribute( attr,
                                                           "" ) );
                }
View Full Code Here

                                final Command refresh) {
        Button freezeConditions = new Button( Constants.INSTANCE.Conditions() );
        freezeConditions.addClickHandler( new ClickHandler() {

            public void onClick(ClickEvent event) {
                model.addMetadata( new RuleMetadata( RuleAttributeWidget.LOCK_LHS,
                                                     "true" ) );
                refresh.execute();
                hide();
            }
        } );
        Button freezeActions = new Button( Constants.INSTANCE.Actions() );
        freezeActions.addClickHandler( new ClickHandler() {

            public void onClick(ClickEvent event) {
                model.addMetadata( new RuleMetadata( RuleAttributeWidget.LOCK_RHS,
                                                     "true" ) );
                refresh.execute();
                hide();
            }
        } );
View Full Code Here

        addbutton.addClickHandler( new ClickHandler() {

            public void onClick(ClickEvent event) {

                model.addMetadata( new RuleMetadata( box.getText(),
                                                     "" ) );
                refresh.execute();
                hide();
            }
        } );
View Full Code Here

            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( Constants.INSTANCE.Metadata2() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < meta.length; i++ ) {
            RuleMetadata rmd = meta[i];
            layout.addAttribute( rmd.attributeName,
                                 getEditorWidget( rmd,
                                                  i ) );
        }
        RuleAttribute[] attrs = model.attributes;
View Full Code Here

            int index = allColumns.indexOf( meta );

            String cell = GuidedDTDRLUtilities.convertDTCellValueToString( row.get( index ) );

            if ( validCell( cell ) ) {
                metadataList.add( new RuleMetadata( meta.getMetadata(),
                                                    cell ) );
            }
        }
        if ( metadataList.size() > 0 ) {
            rm.metadataList = metadataList.toArray( new RuleMetadata[metadataList.size()] );
View Full Code Here

            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( Constants.INSTANCE.Metadata2() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < meta.length; i++ ) {
            RuleMetadata rmd = meta[i];
            layout.addAttribute( rmd.attributeName,
                                 getEditorWidget( rmd,
                                                  i ) );
        }
        RuleAttribute[] attrs = model.attributes;
View Full Code Here

        list.addChangeHandler( new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                String attr = list.getItemText( list.getSelectedIndex() );
                if ( attr.equals( RuleAttributeWidget.LOCK_LHS ) || attr.equals( RuleAttributeWidget.LOCK_RHS ) ) {
                    model.addMetadata( new RuleMetadata( attr,
                                                         "true" ) );
                } else {
                    model.addAttribute( new RuleAttribute( attr,
                                                           "" ) );
                }
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.brl.RuleMetadata

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.