Package org.uberfire.client.common

Examples of org.uberfire.client.common.InfoPopup


            hz.add( freezeConditions );
        }
        if ( !lockRHS ) {
            hz.add( freezeActions );
        }
        hz.add( new InfoPopup( Constants.INSTANCE.FrozenAreas(),
                               Constants.INSTANCE.FrozenExplanation() ) );

        if ( hz.getWidgetCount() > 1 ) {
            addAttribute( Constants.INSTANCE.FreezeAreasForEditing(),
                          hz );
View Full Code Here


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

        //Template key selector
        if ( modeller.isTemplate() ) {
            String templateKeyLabel = Constants.INSTANCE.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,
                                                       Constants.INSTANCE.LiteralValTip() ) ) );
        }

        //Divider, if we have any advanced options
        if ( showVariableSelector || showFormulaSelector || showExpressionSelector ) {
            form.addRow( new HTML( "<hr/>" ) );
            form.addRow( new SmallLabel( Constants.INSTANCE.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 ) ) {

                List<String> applicableBindingsInScope = getApplicableBindingsInScope( bindingsInScope );
                if ( applicableBindingsInScope.size() > 0 ) {

                    Button variable = new Button( Constants.INSTANCE.BoundVariable() );
                    variable.addClickHandler( new ClickHandler() {

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

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

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

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

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

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

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

        form.show();
    }
View Full Code Here

            }

        } );
        form.addAttribute( TestScenarioConstants.INSTANCE.LiteralValue() + ":",
                           widgets( lit,
                                    new InfoPopup( TestScenarioConstants.INSTANCE.LiteralValue(),
                                                   TestScenarioConstants.INSTANCE.LiteralValTip() ) ) );

        form.addRow( new HTML( "<hr/>" ) );
        form.addRow( new SmallLabel( TestScenarioConstants.INSTANCE.AdvancedOptions() ) );

        // If we are here, then there must be a bound variable compatible with
        // me

        Button variable = new Button( TestScenarioConstants.INSTANCE.BoundVariable() );
        variable.addClickHandler( new ClickHandler() {

            public void onClick( ClickEvent event ) {
                con.setNature( FieldData.TYPE_VARIABLE );
                doTypeChosen( form );
            }
        } );
        form.addAttribute( TestScenarioConstants.INSTANCE.AVariable(),
                           widgets( variable,
                                    new InfoPopup( TestScenarioConstants.INSTANCE.ABoundVariable(),
                                                   TestScenarioConstants.INSTANCE.BoundVariableTip() ) ) );

        form.show();
    }
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( GuidedRuleEditorResources.CONSTANTS.AVariable(),
                      widgets( variable,
                               new InfoPopup( GuidedRuleEditorResources.CONSTANTS.ABoundVariable(),
                                       GuidedRuleEditorResources.CONSTANTS.BoundVariableTip() ) ) );
    }
View Full Code Here

        //only show the drop down if we are not using fixed position.
        if ( position == null ) {
            HorizontalPanel hp0 = new HorizontalPanel();
            hp0.add( new HTML( GuidedRuleEditorResources.CONSTANTS.PositionColon() ) );
            hp0.add( positionCbo );
            hp0.add( new InfoPopup( GuidedRuleEditorResources.CONSTANTS.PositionColon(),
                                    GuidedRuleEditorResources.CONSTANTS.ConditionPositionExplanation() ) );
            layoutPanel.addRow( hp0 );
        }

        choices = makeChoicesListBox();
View Full Code Here

        //only show the drop down if we are not using fixed position.
        if ( position == null ) {
            HorizontalPanel hp0 = new HorizontalPanel();
            hp0.add( new HTML( GuidedRuleEditorResources.CONSTANTS.PositionColon() ) );
            hp0.add( positionCbo );
            hp0.add( new InfoPopup( GuidedRuleEditorResources.CONSTANTS.PositionColon(),
                                    GuidedRuleEditorResources.CONSTANTS.ActionPositionExplanation() ) );
            layoutPanel.addRow( hp0 );
        }

        choices = makeChoicesListBox();
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.