コード例 #1
0
  public void unbind() {
    if (null != dataListener) {
      if (!dataText.getControl().isDisposed()) {
        dataText.removeSelectionChangedListener(dataListener);
      }
      dataListener = null;
    }

    super.unbind();
  }
コード例 #2
0
  public void bind(IBindingMediator manager) {
    super.bind(manager);

    this.dataListener = createDataListener(ModelUtils.getDualDirection(direction));

    dataText.addSelectionChangedListener(dataListener);
    dataText
        .getControl()
        .addDisposeListener(
            new DisposeListener() {
              public void widgetDisposed(DisposeEvent e) {
                unbind();
              }
            });
  }