Package org.drools.workbench.screens.guided.rule.client.widget

Examples of org.drools.workbench.screens.guided.rule.client.widget.RuleModellerWidget


            IAction action = model.rhs[ i ];

            //if lockRHS() set the widget RO, otherwise let them decide.
            Boolean readOnly = this.lockRHS() ? true : null;

            RuleModellerWidget w = getWidgetFactory().getWidget( this,
                                                                 eventBus,
                                                                 action,
                                                                 readOnly );
            w.addOnModifiedCommand(this.onWidgetModifiedCommand);

            widget.add( wrapRHSWidget( model,
                                       i,
                                       w ) );
            widget.add( spacerWidget() );

            layout.setWidget( currentLayoutRow,
                              0,
                              new DirtyableHorizontalPane() );
            layout.setWidget( currentLayoutRow,
                              1,
                              new DirtyableHorizontalPane() );

            layout.setWidget( currentLayoutRow,
                              2,
                              this.wrapLineNumber( i + 1,
                                                   false ) );
            layout.getFlexCellFormatter().setHorizontalAlignment( currentLayoutRow,
                                                                  2,
                                                                  HasHorizontalAlignment.ALIGN_CENTER );
            layout.getFlexCellFormatter().setVerticalAlignment( currentLayoutRow,
                                                                2,
                                                                HasVerticalAlignment.ALIGN_MIDDLE );

            layout.setWidget( currentLayoutRow,
                              3,
                              widget );
            layout.getFlexCellFormatter().setHorizontalAlignment( currentLayoutRow,
                                                                  3,
                                                                  HasHorizontalAlignment.ALIGN_LEFT );
            layout.getFlexCellFormatter().setVerticalAlignment( currentLayoutRow,
                                                                3,
                                                                HasVerticalAlignment.ALIGN_TOP );
            layout.getFlexCellFormatter().setWidth( currentLayoutRow,
                                                    3,
                                                    "100%" );

            if ( !w.isFactTypeKnown() ) {
                addInvalidPatternIcon();
                addFactTypeKnownValueChangeHandler(w, currentLayoutRow);
            }

            final int index = i;
            if ( !( this.lockRHS() || w.isReadOnly() ) ) {
                this.addActionsButtonsToLayout( GuidedRuleEditorResources.CONSTANTS.AddAnActionBelow(),
                                                new ClickHandler() {

                                                    public void onClick( ClickEvent event ) {
                                                        showActionSelector( (Widget) event.getSource(),
View Full Code Here


            //if lockLHS() set the widget RO, otherwise let them decide.
            Boolean readOnly = this.lockLHS() ? true : null;

            IPattern pattern = model.lhs[ i ];

            final RuleModellerWidget widget = getWidgetFactory().getWidget( this,
                                                                 eventBus,
                                                                 pattern,
                                                                 readOnly );
            widget.addOnModifiedCommand(this.onWidgetModifiedCommand);

            vert.add(wrapLHSWidget(model,
                    i,
                    widget));
            vert.add(spacerWidget());

            layout.setWidget( currentLayoutRow,
                              0,
                              new DirtyableHorizontalPane() );
            layout.setWidget(currentLayoutRow,
                    1,
                    new DirtyableHorizontalPane());

            layout.setWidget(currentLayoutRow,
                    2,
                    this.wrapLineNumber(i + 1,
                            true));
            layout.getFlexCellFormatter().setHorizontalAlignment(currentLayoutRow,
                    2,
                    HasHorizontalAlignment.ALIGN_CENTER);
            layout.getFlexCellFormatter().setVerticalAlignment(currentLayoutRow,
                    2,
                    HasVerticalAlignment.ALIGN_MIDDLE);

            layout.setWidget(currentLayoutRow,
                    3,
                    vert);
            layout.getFlexCellFormatter().setHorizontalAlignment(currentLayoutRow,
                    3,
                    HasHorizontalAlignment.ALIGN_LEFT);
            layout.getFlexCellFormatter().setVerticalAlignment( currentLayoutRow,
                                                                3,
                                                                HasVerticalAlignment.ALIGN_TOP );
            layout.getFlexCellFormatter().setWidth( currentLayoutRow,
                                                    3,
                                                    "100%" );

            if ( !widget.isFactTypeKnown() ) {
                addInvalidPatternIcon();
                addFactTypeKnownValueChangeHandler(widget, currentLayoutRow);
            }

            final int index = i;
            if ( !( this.lockLHS() || widget.isReadOnly() ) ) {
                this.addActionsButtonsToLayout( GuidedRuleEditorResources.CONSTANTS.AddAConditionBelow(),
                                                new ClickHandler() {

                                                    public void onClick( ClickEvent event ) {
                                                        showConditionSelector( index + 1 );
View Full Code Here

            IAction action = model.rhs[ i ];

            //if lockRHS() set the widget RO, otherwise let them decide.
            Boolean readOnly = this.lockRHS() ? true : null;

            RuleModellerWidget w = getWidgetFactory().getWidget( this,
                                                                 eventBus,
                                                                 action,
                                                                 readOnly );
            w.addOnModifiedCommand(this.onWidgetModifiedCommand);

            widget.add( wrapRHSWidget( model,
                                       i,
                                       w ) );
            widget.add( spacerWidget() );

            layout.setWidget( currentLayoutRow,
                              0,
                              new DirtyableHorizontalPane() );
            layout.setWidget( currentLayoutRow,
                              1,
                              new DirtyableHorizontalPane() );

            layout.setWidget( currentLayoutRow,
                              2,
                              this.wrapLineNumber( i + 1,
                                                   false ) );
            layout.getFlexCellFormatter().setHorizontalAlignment( currentLayoutRow,
                                                                  2,
                                                                  HasHorizontalAlignment.ALIGN_CENTER );
            layout.getFlexCellFormatter().setVerticalAlignment( currentLayoutRow,
                                                                2,
                                                                HasVerticalAlignment.ALIGN_MIDDLE );

            layout.setWidget( currentLayoutRow,
                              3,
                              widget );
            layout.getFlexCellFormatter().setHorizontalAlignment( currentLayoutRow,
                                                                  3,
                                                                  HasHorizontalAlignment.ALIGN_LEFT );
            layout.getFlexCellFormatter().setVerticalAlignment( currentLayoutRow,
                                                                3,
                                                                HasVerticalAlignment.ALIGN_TOP );
            layout.getFlexCellFormatter().setWidth( currentLayoutRow,
                                                    3,
                                                    "100%" );

            if ( !w.isFactTypeKnown() ) {
                addInvalidPatternIcon();
                addFactTypeKnownValueChangeHandler(w, currentLayoutRow);
            }

            final int index = i;
            if ( !( this.lockRHS() || w.isReadOnly() ) ) {
                this.addActionsButtonsToLayout( GuidedRuleEditorResources.CONSTANTS.AddAnActionBelow(),
                                                new ClickHandler() {

                                                    public void onClick( ClickEvent event ) {
                                                        showActionSelector( (Widget) event.getSource(),
View Full Code Here

            //if lockLHS() set the widget RO, otherwise let them decide.
            Boolean readOnly = this.lockLHS() ? true : null;

            IPattern pattern = model.lhs[ i ];

            final RuleModellerWidget widget = getWidgetFactory().getWidget( this,
                                                                 eventBus,
                                                                 pattern,
                                                                 readOnly );
            widget.addOnModifiedCommand(this.onWidgetModifiedCommand);

            vert.add(wrapLHSWidget(model,
                    i,
                    widget));
            vert.add(spacerWidget());

            layout.setWidget( currentLayoutRow,
                              0,
                              new DirtyableHorizontalPane() );
            layout.setWidget(currentLayoutRow,
                    1,
                    new DirtyableHorizontalPane());

            layout.setWidget(currentLayoutRow,
                    2,
                    this.wrapLineNumber(i + 1,
                            true));
            layout.getFlexCellFormatter().setHorizontalAlignment(currentLayoutRow,
                    2,
                    HasHorizontalAlignment.ALIGN_CENTER);
            layout.getFlexCellFormatter().setVerticalAlignment(currentLayoutRow,
                    2,
                    HasVerticalAlignment.ALIGN_MIDDLE);

            layout.setWidget(currentLayoutRow,
                    3,
                    vert);
            layout.getFlexCellFormatter().setHorizontalAlignment(currentLayoutRow,
                    3,
                    HasHorizontalAlignment.ALIGN_LEFT);
            layout.getFlexCellFormatter().setVerticalAlignment( currentLayoutRow,
                                                                3,
                                                                HasVerticalAlignment.ALIGN_TOP );
            layout.getFlexCellFormatter().setWidth( currentLayoutRow,
                                                    3,
                                                    "100%" );

            if ( !widget.isFactTypeKnown() ) {
                addInvalidPatternIcon();
                addFactTypeKnownValueChangeHandler(widget, currentLayoutRow);
            }

            final int index = i;
            if ( !( this.lockLHS() || widget.isReadOnly() ) ) {
                this.addActionsButtonsToLayout( GuidedRuleEditorResources.CONSTANTS.AddAConditionBelow(),
                                                new ClickHandler() {

                                                    public void onClick( ClickEvent event ) {
                                                        showConditionSelector( index + 1 );
View Full Code Here

TOP

Related Classes of org.drools.workbench.screens.guided.rule.client.widget.RuleModellerWidget

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.