Package org.uberfire.client.common

Examples of org.uberfire.client.common.InfoPopup



        });
        addAttribute(TestScenarioConstants.INSTANCE.Fact(),
                widgets(button,
                        new InfoPopup(TestScenarioConstants.INSTANCE.Fact(),
                                TestScenarioConstants.INSTANCE.Fact())));
    }
View Full Code Here


                fireSelection( FieldData.TYPE_LITERAL);
            }
        });
        addAttribute(TestScenarioConstants.INSTANCE.LiteralValue() + ":",
                widgets(lit,
                        new InfoPopup(TestScenarioConstants.INSTANCE.LiteralValue(),
                                TestScenarioConstants.INSTANCE.LiteralValTip())));
    }
View Full Code Here

                fireSelection(FieldData.TYPE_COLLECTION);
            }
        });
        addAttribute(TestScenarioConstants.INSTANCE.AVariable(),
                widgets(variable,
                        new InfoPopup(TestScenarioConstants.INSTANCE.AGuidedList(),
                                TestScenarioConstants.INSTANCE.AGuidedListTip())));
    }
View Full Code Here

                fireSelection(FieldData.TYPE_VARIABLE);
            }
        });
        addAttribute(Constants.INSTANCE.AVariable(),
                widgets(variable,
                        new InfoPopup(Constants.INSTANCE.ABoundVariable(),
                                Constants.INSTANCE.BoundVariableTip())));
    }
View Full Code Here

            }

        } );
        form.addAttribute( TestScenarioConstants.INSTANCE.LiteralValue() + ":",
                           widgets( lit,
                                    new InfoPopup( TestScenarioConstants.INSTANCE.Literal(),
                                            TestScenarioConstants.INSTANCE.LiteralValTip() ) ) );
        form.addRow( new HTML( "<hr/>" ) );
        form.addRow( new SmallLabel( TestScenarioConstants.INSTANCE.AdvancedSection() ) );

        /*
 
View Full Code Here

            }

        } );
        addAttribute( TestScenarioConstants.INSTANCE.Fact(),
                      widgets( button,
                               new InfoPopup( TestScenarioConstants.INSTANCE.Fact(),
                                              TestScenarioConstants.INSTANCE.Fact() ) ) );
    }
View Full Code Here

                fireSelection( FieldData.TYPE_LITERAL );
            }
        } );
        addAttribute( TestScenarioConstants.INSTANCE.LiteralValue() + ":",
                      widgets( lit,
                               new InfoPopup( TestScenarioConstants.INSTANCE.LiteralValue(),
                                              TestScenarioConstants.INSTANCE.LiteralValTip() ) ) );
    }
View Full Code Here

                fireSelection( FieldData.TYPE_COLLECTION );
            }
        } );
        addAttribute( TestScenarioConstants.INSTANCE.AVariable(),
                      widgets( variable,
                               new InfoPopup( TestScenarioConstants.INSTANCE.AGuidedList(),
                                              TestScenarioConstants.INSTANCE.AGuidedListTip() ) ) );
    }
View Full Code Here

                fireSelection( FieldData.TYPE_VARIABLE );
            }
        } );
        addAttribute( Constants.INSTANCE.AVariable(),
                      widgets( variable,
                               new InfoPopup( Constants.INSTANCE.ABoundVariable(),
                                              Constants.INSTANCE.BoundVariableTip() ) ) );
    }
View Full Code Here

        //Literal value selector
        if ( showLiteralSelector ) {
            form.addAttribute( GuidedRuleEditorResources.CONSTANTS.LiteralValue() + ":",
                               widgets( lit,
                                        new InfoPopup( GuidedRuleEditorResources.CONSTANTS.LiteralValue(),
                                                       GuidedRuleEditorResources.CONSTANTS.LiteralValTip() ) ) );
        }

        //Template key selector
        if ( modeller.isTemplate() ) {
            String templateKeyLabel = GuidedRuleEditorResources.CONSTANTS.TemplateKey();
            Button templateKeyButton = new Button( templateKeyLabel );
            templateKeyButton.addClickHandler( new ClickHandler() {

                public void onClick( ClickEvent event ) {
                    con.setConstraintValueType( BaseSingleFieldConstraint.TYPE_TEMPLATE );
                    doTypeChosen( form );
                }
            } );

            form.addAttribute( templateKeyLabel + ":",
                               widgets( templateKeyButton,
                                        new InfoPopup( templateKeyLabel,
                                                       GuidedRuleEditorResources.CONSTANTS.LiteralValTip() ) ) );
        }

        //Divider, if we have any advanced options
        if ( showVariableSelector || showFormulaSelector || showExpressionSelector ) {
            form.addRow( new HTML( "<hr/>" ) );
            form.addRow( new SmallLabel( GuidedRuleEditorResources.CONSTANTS.AdvancedOptions() ) );
        }

        //Show variables selector, if there are any variables in scope
        if ( showVariableSelector ) {
            List<String> bindingsInScope = this.model.getBoundVariablesInScope( this.constraint );
            if ( bindingsInScope.size() > 0 || DataType.TYPE_COLLECTION.equals( this.fieldType ) ) {

                final Button bindingButton = new Button( GuidedRuleEditorResources.CONSTANTS.BoundVariable() );

                //This Set is used as a 1flag to know whether the button has been added; due to use of callbacks
                final Set<Button> bindingButtonContainer = new HashSet<Button>();

                for ( String var : bindingsInScope ) {
                    helper.isApplicableBindingsInScope( var,
                                                        new Callback<Boolean>() {
                                                            @Override
                                                            public void callback( final Boolean result ) {
                                                                if ( Boolean.TRUE.equals( result ) ) {
                                                                    if ( !bindingButtonContainer.contains( bindingButton ) ) {
                                                                        bindingButtonContainer.add( bindingButton );
                                                                        bindingButton.addClickHandler( new ClickHandler() {

                                                                            public void onClick( ClickEvent event ) {
                                                                                con.setConstraintValueType( SingleFieldConstraint.TYPE_VARIABLE );
                                                                                doTypeChosen( form );
                                                                            }
                                                                        } );
                                                                        form.addAttribute( GuidedRuleEditorResources.CONSTANTS.AVariable(),
                                                                                           widgets( bindingButton,
                                                                                                    new InfoPopup( GuidedRuleEditorResources.CONSTANTS.ABoundVariable(),
                                                                                                                   GuidedRuleEditorResources.CONSTANTS.BoundVariableTip() ) ) );
                                                                    }
                                                                }
                                                            }
                                                        } );

                }
            }
        }

        //Formula selector
        if ( showFormulaSelector ) {
            Button formula = new Button( GuidedRuleEditorResources.CONSTANTS.NewFormula() );
            formula.addClickHandler( new ClickHandler() {

                public void onClick( ClickEvent event ) {
                    con.setConstraintValueType( SingleFieldConstraint.TYPE_RET_VALUE );
                    doTypeChosen( form );
                }
            } );

            form.addAttribute( GuidedRuleEditorResources.CONSTANTS.AFormula() + ":",
                               widgets( formula,
                                        new InfoPopup( GuidedRuleEditorResources.CONSTANTS.AFormula(),
                                                       GuidedRuleEditorResources.CONSTANTS.FormulaExpressionTip() ) ) );
        }

        //Expression selector
        if ( showExpressionSelector ) {
            Button expression = new Button( GuidedRuleEditorResources.CONSTANTS.ExpressionEditor() );
            expression.addClickHandler( new ClickHandler() {

                public void onClick( ClickEvent event ) {
                    con.setConstraintValueType( SingleFieldConstraint.TYPE_EXPR_BUILDER_VALUE );
                    doTypeChosen( form );
                }
            } );

            form.addAttribute( GuidedRuleEditorResources.CONSTANTS.ExpressionEditor() + ":",
                               widgets( expression,
                                        new InfoPopup( GuidedRuleEditorResources.CONSTANTS.ExpressionEditor(),
                                                       GuidedRuleEditorResources.CONSTANTS.ExpressionEditor() ) ) );
        }

        form.show();
    }
View Full Code Here

TOP

Related Classes of org.uberfire.client.common.InfoPopup

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.