コード例 #1
0
  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;
  }