Exemplo n.º 1
0
 private void onDispose() {
   if (control == null) return;
   this.Release();
   if (controlListener != null) {
     control.removeListener(SWT.Dispose, controlListener);
     control.removeListener(SWT.DragDetect, controlListener);
   }
   controlListener = null;
   control.setData(DND.DRAG_SOURCE_KEY, null);
   control = null;
   transferAgents = null;
 }
Exemplo n.º 2
0
 /**
  * Detach the progress monitor part from the given cancel component.
  *
  * @param cancelComponent the control that was previously used as a cancel component. This
  *     parameter will be ignored and hence can be <code>null</code> if a stop button was requested
  *     upon construction and instead the stop button will be disabled.
  * @see #ProgressMonitorPart(Composite, Layout, boolean)
  */
 public void removeFromCancelComponent(Control cancelComponent) {
   if (fHasStopButton) {
     setCancelEnabled(false);
   } else {
     Assert.isTrue(fCancelComponent == cancelComponent && fCancelComponent != null);
     fCancelComponent.removeListener(SWT.Selection, fCancelListener);
     fCancelComponent = null;
   }
 }
Exemplo n.º 3
0
 private void deactivate() {
   SpellCheckerAgent.removeListener(visitor);
   if (viewer != null) {
     viewer.removeTextListener(this);
     viewer = null;
   }
   if (control != null && !control.isDisposed()) {
     control.removeListener(SWT.Modify, this);
     control.removeListener(SWT.Paint, this);
     control.removeListener(SWT.Dispose, this);
     redraw(control.getDisplay());
     control = null;
   }
   if (job != null) {
     job.dispose();
     job = null;
   }
   ranges.clear();
 }
Exemplo n.º 4
0
 public void dispose() {
   hideMenu();
   if (!control.isDisposed()) control.removeListener(SWT.MenuDetect, listener);
 }
Exemplo n.º 5
0
  /** Deactivate tooltip support for the underlying control */
  private void removeOwnerControlsListener() {

    _ownerControl.removeListener(SWT.Dispose, _ownerControlListener);
    _ownerControl.removeListener(SWT.Resize, _ownerControlListener);
  }