Package org.drools.guvnor.client.common

Examples of org.drools.guvnor.client.common.InfoPopup


    private Widget howToTurnOn() {
        HorizontalPanel hp = new HorizontalPanel();
        hp.add(new HTML("<small><i>"
                + constants.TipAuthEnable()
                + "</i></small>"));
        InfoPopup pop = new InfoPopup(constants.EnablingAuthorization(),
                constants.EnablingAuthPopupTip());
        hp.add(pop);
        return hp;
    }
View Full Code Here


                final ListBox permTypeBox = new ListBox();
                permTypeBox.addItem( constants.Loading() );

                HorizontalPanel hp = new HorizontalPanel();
                hp.add( permTypeBox );
                hp.add( new InfoPopup( constants.PermissionDetails(),
                                       constants.PermissionDetailsTip() ) );
                pop.addAttribute( constants.PermissionType(),
                                  hp );

                RepositoryServiceFactory.getService().listAvailablePermissionRoleTypes( new GenericCallback<List<String>>() {
View Full Code Here

                final ListBox permTypeBox = new ListBox();
                permTypeBox.addItem( ConstantsCore.INSTANCE.Loading() );

                HorizontalPanel hp = new HorizontalPanel();
                hp.add( permTypeBox );
                hp.add( new InfoPopup( ConstantsCore.INSTANCE.PermissionDetails(),
                                       ConstantsCore.INSTANCE.PermissionDetailsTip() ) );
                pop.addAttribute( ConstantsCore.INSTANCE.PermissionType(),
                                  hp );

                repositoryService.listAvailablePermissionRoleTypes( new GenericCallback<List<String>>() {
View Full Code Here

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

    if (modeller.isTemplate()) {
          String templateKeyLabel = constants.TemplateKey();
          Button templateKeyButton = new Button(templateKeyLabel);
          templateKeyButton.addClickListener(new ClickListener() {
              public void onClick(Widget arg0) {
                  con.constraintValueType = ISingleFieldConstraint.TYPE_TEMPLATE;
                  doTypeChosen(form);
              }
          });
 
          form.addAttribute(templateKeyLabel + ":",
                  widgets(templateKeyButton,
                  new InfoPopup(templateKeyLabel,
                  constants.LiteralValTip())));
        }
       
        form.addRow(new HTML("<hr/>"));
        form.addRow(new SmallLabel(constants.AdvancedOptions()));

        //only want to show variables if we have some !
        if (this.model.getBoundVariablesInScope(this.constraint).size() > 0 || SuggestionCompletionEngine.TYPE_COLLECTION.equals(this.fieldType)) {
            List vars = this.model.getBoundFacts();
            boolean foundABouncVariableThatMatches = false;
            for (int i = 0; i < vars.size(); i++) {
                String var = (String) vars.get(i);
                FactPattern f = model.getBoundFact(var);
                String fieldConstraint = model.getFieldConstraint(var);

                if ((f != null && f.factType.equals(this.fieldType)) || this.fieldType.equals(fieldConstraint)) {
                    foundABouncVariableThatMatches = true;
                    break;
                } else {
                    // for collection, present the list of possible bound variable
                    String factCollectionType = sce.getParametricFieldType(pattern.factType,
                            this.fieldName);
                    if ((f != null && factCollectionType != null && f.factType.equals(factCollectionType)) || (factCollectionType != null && factCollectionType.equals(fieldConstraint))) {
                        foundABouncVariableThatMatches = true;
                        break;
                    }
                }
            }
            if (foundABouncVariableThatMatches == true) {
                Button variable = new Button(constants.BoundVariable());
                variable.addClickListener(new ClickListener() {

                    public void onClick(Widget w) {
                        con.constraintValueType = SingleFieldConstraint.TYPE_VARIABLE;
                        doTypeChosen(form);
                    }
                });
                form.addAttribute(constants.AVariable(),
                        widgets(variable,
                        new InfoPopup(constants.ABoundVariable(),
                        constants.BoundVariableTip())));
            }
        }

        Button formula = new Button(constants.NewFormula());
        formula.addClickListener(new ClickListener() {

            public void onClick(Widget w) {
                con.constraintValueType = SingleFieldConstraint.TYPE_RET_VALUE;
                doTypeChosen(form);
            }
        });

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

        Button expression = new Button(constants.ExpressionEditor());
        expression.addClickListener(new ClickListener() {

            public void onClick(Widget w) {
                con.constraintValueType = SingleFieldConstraint.TYPE_EXPR_BUILDER;
                doTypeChosen(form);
            }
        });

        form.addAttribute(constants.ExpressionEditor() + ":",
                widgets(expression,
                new InfoPopup(constants.ExpressionEditor(),
                constants.ExpressionEditor())));


        form.show();
    }
View Full Code Here

    private Widget h(Widget w,
                     String string) {
        HorizontalPanel hp = new HorizontalPanel();
        hp.add( w );
        hp.add( new InfoPopup( constants.Tip(),
                               string ) );
        return hp;
    }
View Full Code Here

            }
        } );

        HorizontalPanel hp = new HorizontalPanel();
        hp.add( add );
        hp.add( new InfoPopup( constants.CategoryParentRules(),
                               constants.CatRulesInfo() ) );
        return hp;
    }
View Full Code Here

        VerticalPanel verticalPanel = new VerticalPanel();

        HorizontalPanel wholePackageRadioButtonPanel = new HorizontalPanel();
        wholePackageRadioButtonPanel.add( wholePackageRadioButton );
        wholePackageRadioButtonPanel.add( new InfoPopup( constants.BuildWholePackage(),
                                                         constants.BuildWholePackageTip() ) );
        verticalPanel.add( wholePackageRadioButtonPanel );

        HorizontalPanel builtInSelectorRadioButtonPanel = new HorizontalPanel();
        builtInSelectorRadioButtonPanel.add( builtInSelectorRadioButton );
        builtInSelectorRadioButtonPanel.add( new InfoPopup( constants.BuiltInSelector(),
                                                            constants.BuiltInSelectorTip() ) );
        verticalPanel.add( builtInSelectorRadioButtonPanel );

        HorizontalPanel customSelectorRadioButtonPanel = new HorizontalPanel();
        customSelectorRadioButtonPanel.add( customSelectorRadioButton );
        customSelectorRadioButtonPanel.add( new InfoPopup( constants.CustomSelector(),
                                                           constants.SelectorTip() ) );
        verticalPanel.add( customSelectorRadioButtonPanel );

        layout.addAttribute( "",
                             verticalPanel );
View Full Code Here

          }
        }
      }
    });

    InfoPopup info = new InfoPopup(constants.TypesInThePackage(), constants.IfNoTypesTip());
    HorizontalPanel h = new HorizontalPanel();
    h.add(factList);
    h.add(info);
    pop.addAttribute(constants.ChooseClassType(), h);
    final TextBox globalName = new TextBox();
    if (global) {
      pop.addAttribute(constants.GlobalName(), globalName);
    }
    final TextBox className = new TextBox();
    InfoPopup infoClass = new InfoPopup(constants.EnteringATypeClassName(), constants.EnterTypeNameTip());
    h = new HorizontalPanel();
    h.add(className);
    h.add(infoClass);
    pop.addAttribute(constants.advancedClassName(), h);
View Full Code Here

            }

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

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

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

        Button variable = new Button( constants.BoundVariable() );
        variable.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                con.nature = FieldData.TYPE_VARIABLE;
                doTypeChosen( form );
            }
        } );
        form.addAttribute( constants.AVariable(),
                           widgets( variable,
                                    new InfoPopup( constants.ABoundVariable(),
                                                   constants.BoundVariableTip() ) ) );

        form.show();
    }
View Full Code Here

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

        if (hz.getWidgetCount() > 1) {
            pop.addAttribute(constants.FreezeAreasForEditing(), hz);
        }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.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.