@Override protected void showFactTypeSelector() { final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.NewFactPattern()); popup.setTitle(GuidedRuleEditorResources.CONSTANTS.NewFactPattern()); final ListBox box = GWT.create(ListBox.class); box.addItem(GuidedRuleEditorResources.CONSTANTS.Choose()); for (Map.Entry<String, String> entry : this.getExtraLeftSidePatternFactTypes().entrySet()) { box.addItem(entry.getKey(), entry.getValue()); } box.setSelectedIndex(0); box.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { pattern.setFactPattern(new FactPattern(box.getValue(box.getSelectedIndex()))); setModified(true); getModeller().refreshWidget(); popup.hide(); } }); popup.addAttribute(GuidedRuleEditorResources.CONSTANTS.chooseFactType(), box); popup.show(); }
@Override protected void showFactTypeSelector() { final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.NewFactPattern()); popup.setTitle(GuidedRuleEditorResources.CONSTANTS.NewFactPattern()); final ListBox box = GWT.create(ListBox.class); box.addItem(GuidedRuleEditorResources.CONSTANTS.Choose()); for (Map.Entry<String, String> entry : this.getExtraLeftSidePatternFactTypes().entrySet()) { box.addItem(entry.getKey(), entry.getValue()); } box.setSelectedIndex(0); box.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { pattern.setFactPattern(new FactPattern(box.getValue(box.getSelectedIndex()))); setModified(true); getModeller().refreshWidget(); popup.hide(); } }); popup.addAttribute(GuidedRuleEditorResources.CONSTANTS.chooseFactType(), box); popup.show(); }
@Override public void onClick( final ClickEvent event ) { final FormStylePopup pop = new FormStylePopup( TestScenarioConstants.INSTANCE.ChooseAFieldToAdd() ); final FactFieldSelector selector = createAddNewField( pop ); pop.addAttribute( TestScenarioConstants.INSTANCE.ChooseAFieldToAdd(), selector ); pop.add( new ModalFooterOKCancelButtons( new Command() { @Override public void execute() { SelectionEvent.fire( selector, selector.getSelectedText() ); } }, new Command() { @Override public void execute() { pop.hide(); } } ) ); pop.show(); }
/** * Pops up the fact selector. */ @Override protected void showFactTypeSelector() { final ListBox box = GWT.create(ListBox.class); AsyncPackageDataModelOracle oracle = this.getModeller().getDataModelOracle(); String[] facts = oracle.getFactTypes(); box.addItem(GuidedRuleEditorResources.CONSTANTS.Choose()); for (int i = 0; i < facts.length; i++) { box.addItem(facts[i]); } box.setSelectedIndex(0); final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.NewFactPattern()); popup.addAttribute(GuidedRuleEditorResources.CONSTANTS.chooseFactType(), box); box.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { pattern.setFactPattern(new FactPattern(box.getItemText(box.getSelectedIndex()))); setModified(true); getModeller().refreshWidget(); popup.hide(); } }); popup.show(); }
/** * Pops up the fact selector. */ @Override protected void showFactTypeSelector() { final ListBox box = GWT.create(ListBox.class); AsyncPackageDataModelOracle oracle = this.getModeller().getDataModelOracle(); String[] facts = oracle.getFactTypes(); box.addItem(GuidedRuleEditorResources.CONSTANTS.Choose()); for (int i = 0; i < facts.length; i++) { box.addItem(facts[i]); } box.setSelectedIndex(0); final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.NewFactPattern()); popup.addAttribute(GuidedRuleEditorResources.CONSTANTS.chooseFactType(), box); box.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { pattern.setFactPattern(new FactPattern(box.getItemText(box.getSelectedIndex()))); setModified(true); getModeller().refreshWidget(); popup.hide(); } }); popup.show(); }
private void showBindingPopUp() { final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.ExpressionEditor()); final TextBox varName = new TextBox(); if (expression.isBound()) { varName.setText(expression.getBinding()); } popup.addAttribute(GuidedRuleEditorResources.CONSTANTS.BindTheExpressionToAVariable(), new InputGroup() {{ add(varName); add(new InputGroupButton() {{ add(new Button(HumanReadableConstants.INSTANCE.Set()) {{ addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { String var = varName.getText(); if (getModeller().isVariableNameUsed(var)) { Window.alert(GuidedRuleEditorResources.CONSTANTS.TheVariableName0IsAlreadyTaken(var)); return; } expression.setBinding(var); getModeller().refreshWidget(); popup.hide(); } }); }}); }}); }}); popup.show(); }
private void showBindingPopUp() { final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.ExpressionEditor()); final TextBox varName = new TextBox(); if (expression.isBound()) { varName.setText(expression.getBinding()); } popup.addAttribute(GuidedRuleEditorResources.CONSTANTS.BindTheExpressionToAVariable(), new InputGroup() {{ add(varName); add(new InputGroupButton() {{ add(new Button(HumanReadableConstants.INSTANCE.Set()) {{ addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { String var = varName.getText(); if (getModeller().isVariableNameUsed(var)) { Window.alert(GuidedRuleEditorResources.CONSTANTS.TheVariableName0IsAlreadyTaken(var)); return; } expression.setBinding(var); getModeller().refreshWidget(); popup.hide(); } }); }}); }}); }}); popup.show(); }
protected void showAddFieldPopup(final Widget w) { final FormStylePopup popup = new FormStylePopup(TestScenarioAltedImages.INSTANCE.Wizard(), TestScenarioConstants.INSTANCE.ChooseAMethodToInvoke()); ListBox box = new ListBox();
/** * Pops up the fact selector. */ protected void showFactTypeSelector() { AsyncPackageDataModelOracle oracle = this.getModeller().getDataModelOracle(); final ListBox box = new ListBox(); String[] facts = oracle.getFactTypes(); box.addItem(GuidedRuleEditorResources.CONSTANTS.Choose()); for (int i = 0; i < facts.length; i++) { box.addItem(facts[i]); } box.setSelectedIndex(0); final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.NewFactPattern()); popup.addAttribute(GuidedRuleEditorResources.CONSTANTS.chooseFactType(), box); box.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { pattern.setFactPattern(new FactPattern(box.getItemText(box.getSelectedIndex()))); setModified(true); getModeller().refreshWidget(); popup.hide(); } }); popup.show(); }
/** * Pops up the fact selector. */ protected void showFactTypeSelector() { AsyncPackageDataModelOracle oracle = this.getModeller().getDataModelOracle(); final ListBox box = new ListBox(); String[] facts = oracle.getFactTypes(); box.addItem(GuidedRuleEditorResources.CONSTANTS.Choose()); for (int i = 0; i < facts.length; i++) { box.addItem(facts[i]); } box.setSelectedIndex(0); final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.NewFactPattern()); popup.addAttribute(GuidedRuleEditorResources.CONSTANTS.chooseFactType(), box); box.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { pattern.setFactPattern(new FactPattern(box.getItemText(box.getSelectedIndex()))); setModified(true); getModeller().refreshWidget(); popup.hide(); } }); popup.show(); }
final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorImages508.INSTANCE.Wizard(), GuidedRuleEditorResources.CONSTANTS.ChooseAMethodToInvoke()); final ListBox box = new ListBox();
final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorImages508.INSTANCE.Wizard(), GuidedRuleEditorResources.CONSTANTS.ChooseAMethodToInvoke()); final ListBox box = new ListBox();
protected void showTypeChoice(final Widget w) { final FormStylePopup form = new FormStylePopup(TestScenarioAltedImages.INSTANCE.Wizard(), TestScenarioConstants.INSTANCE.FieldValue()); Button lit = new Button(TestScenarioConstants.INSTANCE.LiteralValue());
protected void showTypeChoice() { final FormStylePopup form = new FormStylePopup(GuidedRuleEditorImages508.INSTANCE.Wizard(), GuidedRuleEditorResources.CONSTANTS.FieldValue());
protected void showAddFieldPopup(ClickEvent w) { final AsyncPackageDataModelOracle oracle = this.getModeller().getDataModelOracle(); final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorImages508.INSTANCE.Wizard(), GuidedRuleEditorResources.CONSTANTS.AddAField());
protected void showTypeChoice() { final FormStylePopup form = new FormStylePopup(GuidedRuleEditorImages508.INSTANCE.Wizard(), GuidedRuleEditorResources.CONSTANTS.FieldValue());
protected void showAddFieldPopup(ClickEvent w) { final AsyncPackageDataModelOracle oracle = this.getModeller().getDataModelOracle(); final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorImages508.INSTANCE.Wizard(), GuidedRuleEditorResources.CONSTANTS.AddAField());
final ModelField[] fields, final PopupCreator popupCreator) { final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.AddAField());
final ModelField[] fields, final PopupCreator popupCreator) { final FormStylePopup popup = new FormStylePopup(GuidedRuleEditorResources.CONSTANTS.AddAField());
private void showTypeChoice(Widget w, final VerifyField con) { final FormStylePopup form = new FormStylePopup(TestScenarioAltedImages.INSTANCE.Wizard(), TestScenarioConstants.INSTANCE.FieldValue());