protected void compositeDisposed() { composite.removeListener(SWT.Selection, this); composite.removeListener(SWT.DefaultSelection, this); composite.removeListener(SWT.Dispose, this); composite = null; }
@Override public void handleEvent(Event event) { /* * NB: we must wait with closing until * listenToDeactivate is set to true, otherwise it may * happen that the popup closes immediately after * showing up (seem to be timing issue with shell * creation). * * E.g. "Display" popup does not need this, but * "Show all Instances" and "Show all References" do. * They all are InspectPopupDialog instances... */ if (event.widget != parent || !listenToDeactivate || parent.isDisposed()) { return; } parent.removeListener(SWT.Activate, this); asyncClose(); } });
@Override public void handleEvent(Event event) { /* * NB: we must wait with closing until * listenToDeactivate is set to true, otherwise it may * happen that the popup closes immediately after * showing up (seem to be timing issue with shell * creation). * * E.g. "Display" popup does not need this, but * "Show all Instances" and "Show all References" do. * They all are InspectPopupDialog instances... */ if (event.widget != parent || !listenToDeactivate || parent.isDisposed()) { return; } parent.removeListener(SWT.Activate, this); asyncClose(); } });
private void removeCompositeListeners(Composite c) { if (!c.isDisposed()) { printRemoveListener(c, "PAINT"); //$NON-NLS-1$ c.removePaintListener(paintListener); printRemoveListener(c, "MOUSETRACK"); //$NON-NLS-1$ c.removeMouseTrackListener(mouseTrackListener); printRemoveListener(c, "SWT.MenuDetect"); //$NON-NLS-1$ c.removeListener(SWT.MenuDetect, compositeListener); printRemoveListener(c, "SWT.MouseDown"); //$NON-NLS-1$ c.removeListener(SWT.MouseDown, compositeListener); printRemoveListener(c, "SWT.MouseDoubleClick"); //$NON-NLS-1$ c.removeListener(SWT.MouseDoubleClick, compositeListener); } }
private void removeCompositeListeners(Composite c) { if (!c.isDisposed()) { printRemoveListener(c, "PAINT"); //$NON-NLS-1$ c.removePaintListener(paintListener); printRemoveListener(c, "MOUSETRACK"); //$NON-NLS-1$ c.removeMouseTrackListener(mouseTrackListener); printRemoveListener(c, "SWT.MenuDetect"); //$NON-NLS-1$ c.removeListener(SWT.MenuDetect, compositeListener); printRemoveListener(c, "SWT.MouseDown"); //$NON-NLS-1$ c.removeListener(SWT.MouseDown, compositeListener); printRemoveListener(c, "SWT.MouseDoubleClick"); //$NON-NLS-1$ c.removeListener(SWT.MouseDoubleClick, compositeListener); } }
private void removeCompositeListeners(Composite c) { if(!c.isDisposed()) { printRemoveListener(c, "PAINT"); //$NON-NLS-1$ c.removePaintListener(paintListener); printRemoveListener(c, "MOUSETRACK"); //$NON-NLS-1$ c.removeMouseTrackListener(mouseTrackListener); printRemoveListener(c, "SWT.MenuDetect"); //$NON-NLS-1$ c.removeListener(SWT.MenuDetect, compositeListener); printRemoveListener(c, "SWT.MouseDown"); //$NON-NLS-1$ c.removeListener(SWT.MouseDown, compositeListener); printRemoveListener(c, "SWT.MouseDoubleClick"); //$NON-NLS-1$ c.removeListener(SWT.MouseDoubleClick, compositeListener); } }
/** * <p> * Removes a {@link Listener} for the defined eventType. * </p> * * @since 0.10 */ public void removeGroupedListener( int eventType, Listener listener ) throws IllegalArgumentException, IllegalStateException { whenNull( listener ).throwIllegalArgument( "Listener must not be null" ); Composite facade = findFacade(); if( facade != null ) { facade.removeListener( eventType, listener ); } }
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. * The composite and the editor Control are <b>not</b> disposed. */ public void dispose() { if( parent != null && !parent.isDisposed() ) { for( int i = 0; i < EVENTS.length; i++ ) { parent.removeListener( EVENTS[ i ], controlListener ); } ScrollBar hBar = parent.getHorizontalBar(); ScrollBar vBar = parent.getVerticalBar(); if( hBar != null ) { hBar.removeListener( SWT.Selection, scrollbarListener ); } if( vBar != null ) { vBar.removeListener( SWT.Selection, scrollbarListener ); } } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; }
getShell().getParent().removeListener(SWT.Deactivate, parentDeactivateListener); parentDeactivateListener = null;
getShell().getParent().removeListener(SWT.Deactivate, parentDeactivateListener); parentDeactivateListener = null;
getShell().getParent().removeListener(SWT.Deactivate, parentDeactivateListener); parentDeactivateListener = null;
mainShell.removeListener(SWT.Deactivate, this); if (tv.getComposite() != null && !tv.getComposite().isDisposed()) tv.getComposite().removeListener(SWT.Deactivate, this);