private Widget getSetterLabel() { ClickHandler clk = new ClickHandler() { public void onClick(ClickEvent event) { // Widget w = (Widget)event.getSource(); showAddFieldPopup(event); } }; String modifyType = "set"; if (this.model instanceof ActionUpdateField) { modifyType = "modify"; } String type = this.getModeller().getModel().getLHSBindingType(model.getVariable()); String descFact = (type != null) ? type + " <b>[" + model.getVariable() + "]</b>" : model.getVariable(); String sl = Constants.INSTANCE.setterLabel(HumanReadable.getActionDisplayName(modifyType), descFact); return new ClickableLabel( sl, clk, !this .readOnly); // HumanReadable.getActionDisplayName(modifyType) + " value of <b>[" + // model.variable + "]</b>", clk); }
private Widget getSetterLabel() { HorizontalPanel horiz = new HorizontalPanel(); if (mCall.getState() == ActionCallMethod.TYPE_UNDEFINED) { Image edit = TestScenarioAltedImages.INSTANCE.AddFieldToFact(); edit.setTitle(TestScenarioConstants.INSTANCE.AddAnotherFieldToThisSoYouCanSetItsValue()); edit.addClickHandler( new ClickHandler() { public void onClick(ClickEvent event) { Image w = (Image) event.getSource(); showAddFieldPopup(w); } }); horiz.add( new SmallLabel( HumanReadable.getActionDisplayName("call") + " [" + mCall.getVariable() + "]")); // NON-NLS horiz.add(edit); } else { horiz.add( new SmallLabel( HumanReadable.getActionDisplayName("call") + " [" + mCall.getVariable() + "." + mCall.getMethodName() + "]")); // NON-NLS } return horiz; }