code: public static ClickHandler makeToggler (final Value<Boolean> value)
      {
          Preconditions.checkNotNull(value, "value");
          return new ClickHandler() {
              public void onClick (ClickEvent event) {
                  value.update(!value.get());
              }
          };
      }
docs: Returns a click handler that toggles the supplied boolean value when clicked.