Package org.kie.uberfire.client.common

Examples of org.kie.uberfire.client.common.ClickableLabel


        outer.setStyleName( "modeller-fact-pattern-Widget" ); //NON-NLS
        this.oracle = oracle;
        this.scenario = sc;
        this.executionTrace = executionTrace;
        HorizontalPanel ab = new HorizontalPanel();
        ClickableLabel label = null;

        final ClickHandler handler = new ClickHandler() {
            public void onClick( ClickEvent w ) {

                final ListBox b = new ListBox();
                VerifyFactWidget.this.oracle.getFieldCompletions( type,
                                                                  new Callback<ModelField[]>() {
                                                                      @Override
                                                                      public void callback( final ModelField[] fields ) {
                                                                          for ( int i = 0; i < fields.length; i++ ) {
                                                                              b.addItem( fields[ i ].getName() );
                                                                          }
                                                                      }
                                                                  } );

                final FormStylePopup pop = new FormStylePopup( TestScenarioAltedImages.INSTANCE.RuleAsset(),
                                                               TestScenarioConstants.INSTANCE.ChooseAFieldToAdd() );
                pop.addRow( b );
                pop.add( new ModalFooterOKCancelButtons( new Command() {
                    @Override
                    public void execute() {
                        String f = b.getItemText( b.getSelectedIndex() );
                        vf.getFieldValues().add( new VerifyField( f,
                                                                  "",
                                                                  "==" ) );
                        FlexTable data = render( vf );
                        outer.setWidget( 1,
                                         0,
                                         data );
                        pop.hide();
                    }
                }, new Command() {
                    @Override
                    public void execute() {
                        pop.hide();
                    }
                }
                ) );

                pop.show();

            }
        };

        if ( !vf.anonymous ) {
            type = (String) sc.getVariableTypes().get( vf.getName() );
            label = new ClickableLabel( TestScenarioConstants.INSTANCE.scenarioFactTypeHasValues( type,
                                                                                                  vf.getName() ),
                                        handler );
        } else {
            type = vf.getName();
            label = new ClickableLabel( TestScenarioConstants.INSTANCE.AFactOfType0HasValues( vf.getName() ),
                                        handler );
        }
        ab.add( label );
        this.showResults = showResults;
View Full Code Here


            showBindingPopUp();
        }
    }

    private ClickableLabel createBindingWidgetForExpression( final String text ) {
        ClickableLabel label = new ClickableLabel( text,
                                                   slch,
                                                   !this.readOnly );
        return label;
    }
View Full Code Here

        int r = 0;

        if ( pattern.getFactPattern() == null ) {
            panel.setWidget( r++,
                             0,
                             new ClickableLabel( "<br> <font color='red'>" + GuidedRuleEditorResources.CONSTANTS.clickToAddPatterns() + "</font>",
                                                 leftPatternclick,
                                                 !this.readOnly ) );
        }

        panel.setWidget( r++,
                         0,
                         new HTML( lbl ) );

        if ( this.getFromCollectPattern().getRightPattern() == null ) {
            panel.setWidget( r++,
                             0,
                             new ClickableLabel( "<br> <font color='red'>" + GuidedRuleEditorResources.CONSTANTS.clickToAddPatterns() + "</font>",
                                                 rightPatternclick,
                                                 !this.readOnly ) );
        } else {
            IPattern rPattern = this.getFromCollectPattern().getRightPattern();
View Full Code Here

        int r = 0;

        if ( pattern.getFactPattern() == null ) {
            panel.setWidget( r,
                             0,
                             new ClickableLabel( "<br> <font color='red'>" + GuidedRuleEditorResources.CONSTANTS.clickToAddPatterns() + "</font>",
                                                 click,
                                                 !this.readOnly ) );
            r++;
        }
View Full Code Here

        int r = 0;

        if ( pattern.getFactPattern() == null ) {
            panel.setWidget( r++,
                             0,
                             new ClickableLabel( "<br> <font color='red'>" + GuidedRuleEditorResources.CONSTANTS.clickToAddPattern() + "</font>",
                                                 leftPatternclick,
                                                 !this.readOnly ) );
        }

        panel.setWidget( r++,
                         0,
                         new HTML( lbl ) );

        if ( this.getFromAccumulatePattern().getSourcePattern() == null ) {
            panel.setWidget( r++,
                             0,
                             new ClickableLabel( "<br> <font color='red'>" + GuidedRuleEditorResources.CONSTANTS.clickToAddPattern() + "</font>",
                                                 sourcePatternClick,
                                                 !this.readOnly ) );
        } else {
            IPattern rPattern = this.getFromAccumulatePattern().getSourcePattern();
View Full Code Here

        if ( pattern.getPatterns() == null || pattern.getPatterns().length == 0 ) {
            lbl += " <font color='red'>" + GuidedRuleEditorResources.CONSTANTS.clickToAddPatterns() + "</font>";
        }

        return new ClickableLabel( lbl + ":",
                                   click,
                                   !this.readOnly );
    }
View Full Code Here

        String lbl = ( model.isBound() == false ) ? HumanReadable.getActionDisplayName( assertType ) + " <b>" + this.model.getFactType() + "</b>" : HumanReadable.getActionDisplayName( assertType ) + " <b>" + this.model.getFactType() + "</b>" + " <b>["
                + model.getBoundName() + "]</b>";
        if ( this.model.getFieldValues() != null && model.getFieldValues().length > 0 ) {
            lbl = lbl + ":";
        }
        return new ClickableLabel( lbl,
                                   cl,
                                   !this.readOnly );

    }
View Full Code Here

        String descFact = ( type != null ) ? type + " <b>[" + model.getVariable() + "]</b>" : model.getVariable();

        String sl = GuidedRuleEditorResources.CONSTANTS.setterLabel( HumanReadable.getActionDisplayName( modifyType ),
                                                                     descFact );
        return new ClickableLabel( sl,
                                   clk,
                                   !this.readOnly );//HumanReadable.getActionDisplayName(modifyType) + " value of <b>[" + model.variable + "]</b>", clk);
    }
View Full Code Here

                                     final String dslCaption ) {
        final VerticalPanel container = new VerticalPanel();
        final HorizontalPanel hpDSLSentencesAndHide = new HorizontalPanel();
        final HorizontalPanel hpShow = new HorizontalPanel();

        hpShow.add( new ClickableLabel( showDSLCaption,
                                        new ClickHandler() {
                                            public void onClick( com.google.gwt.event.dom.client.ClickEvent event ) {
                                                hpShow.setVisible( false );
                                                hpDSLSentencesAndHide.setVisible( true );
                                                tree.setVisible( true );
                                            }
                                        } ) );
        container.add( hpShow );

        hpDSLSentencesAndHide.add( new SmallLabel( dslCaption ) );
        hpDSLSentencesAndHide.add( new ClickableLabel( DRLTextEditorConstants.INSTANCE.hide(),
                                                       new ClickHandler() {
                                                           public void onClick( com.google.gwt.event.dom.client.ClickEvent event ) {
                                                               hpShow.setVisible( true );
                                                               hpDSLSentencesAndHide.setVisible( false );
                                                               tree.setVisible( false );
View Full Code Here

        final VerticalPanel panel = new VerticalPanel();
        final HorizontalPanel hpFactsAndHide = new HorizontalPanel();
        final HorizontalPanel hpShow = new HorizontalPanel();

        hpShow.add( new ClickableLabel( DRLTextEditorConstants.INSTANCE.ShowFactTypes(),
                                        new ClickHandler() {
                                            public void onClick( com.google.gwt.event.dom.client.ClickEvent event ) {
                                                hpShow.setVisible( false );
                                                hpFactsAndHide.setVisible( true );
                                                tree.setVisible( true );
                                            }
                                        } ) );
        panel.add( hpShow );

        hpFactsAndHide.add( new SmallLabel( DRLTextEditorConstants.INSTANCE.FactTypes() ) );
        hpFactsAndHide.add( new ClickableLabel( DRLTextEditorConstants.INSTANCE.hide(),
                                                new ClickHandler() {
                                                    public void onClick( com.google.gwt.event.dom.client.ClickEvent event ) {
                                                        hpShow.setVisible( true );
                                                        hpFactsAndHide.setVisible( false );
                                                        tree.setVisible( false );
View Full Code Here

TOP

Related Classes of org.kie.uberfire.client.common.ClickableLabel

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.