use of com.google.gwt.user.client.ui.Image in project drools-wb by kiegroup.
the class MethodParameterValueEditor method choice.
private Widget choice() {
Image clickme = GuidedRuleEditorImages508.INSTANCE.Edit();
clickme.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
showTypeChoice();
}
});
return clickme;
}
use of com.google.gwt.user.client.ui.Image in project drools-wb by kiegroup.
the class RuleAttributeWidget method getRemoveIcon.
private Image getRemoveIcon(final int idx) {
Image remove = new Image(ItemImages.INSTANCE.deleteItemSmall());
remove.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if (Window.confirm(GuidedRuleEditorResources.CONSTANTS.RemoveThisRuleOption())) {
model.removeAttribute(idx);
parent.refreshWidget();
}
}
});
return remove;
}
use of com.google.gwt.user.client.ui.Image in project drools-wb by kiegroup.
the class RuleAttributeWidget method getRemoveMetaIcon.
private Image getRemoveMetaIcon(final int idx) {
Image remove = new Image(ItemImages.INSTANCE.deleteItemSmall());
remove.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if (Window.confirm(GuidedRuleEditorResources.CONSTANTS.RemoveThisRuleOption())) {
model.removeMetadata(idx);
parent.refreshWidget();
}
}
});
return remove;
}
use of com.google.gwt.user.client.ui.Image in project drools-wb by kiegroup.
the class RuleModeller method wrapLHSWidget.
/**
* This adds the widget to the UI, also adding the remove icon.
*/
private Widget wrapLHSWidget(final RuleModel model, int i, RuleModellerWidget w) {
final FlexTable wrapper = new FlexTable();
final Image remove = GuidedRuleEditorImages508.INSTANCE.DeleteItemSmall();
remove.setTitle(GuidedRuleEditorResources.CONSTANTS.RemoveThisENTIREConditionAndAllTheFieldConstraintsThatBelongToIt());
final int idx = i;
remove.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if (Window.confirm(GuidedRuleEditorResources.CONSTANTS.RemoveThisEntireConditionQ())) {
if (model.removeLhsItem(idx)) {
refreshWidget();
// Signal possible change in Template variables
TemplateVariablesChangedEvent tvce = new TemplateVariablesChangedEvent(model);
eventBus.fireEventFromSource(tvce, model);
} else {
ErrorPopup.showMessage(GuidedRuleEditorResources.CONSTANTS.CanTRemoveThatItemAsItIsUsedInTheActionPartOfTheRule());
}
}
}
});
wrapper.getColumnFormatter().setWidth(0, "100%");
w.setWidth("100%");
wrapper.setWidget(0, 0, w);
if (!(this.lockLHS() || w.isReadOnly()) || !w.isFactTypeKnown()) {
wrapper.setWidget(0, 1, remove);
wrapper.getColumnFormatter().setWidth(1, "20px");
}
return wrapper;
}
use of com.google.gwt.user.client.ui.Image in project drools-wb by kiegroup.
the class RuleModeller method addInvalidPatternIcon.
private void addInvalidPatternIcon() {
final Image image = GuidedRuleEditorImages508.INSTANCE.Error();
image.setTitle(GuidedRuleEditorResources.CONSTANTS.InvalidPatternSectionDisabled());
this.addLineIcon(currentLayoutRow, 0, image);
}
Aggregations