@Override public void widgetDisposed(DisposeEvent e) { source.dispose(); } });
public void dispose() { if (dragSource != null) { dragSource.dispose(); dragSource = null; } if (dropTarget != null) { dropTarget.dispose(); dropTarget = null; } } }
@Override public void widgetDisposed(DisposeEvent e) { if (!dragSource.isDisposed()) { dragSource.dispose(); } } });
@Override public void handleEvent(Event event) { if (event.type == SWT.Dispose) { if (!DragSource.this.isDisposed()) { DragSource.this.dispose(); } } if (event.type == SWT.DragDetect) { if (!DragSource.this.isDisposed()) { DragSource.this.drag(event); } } } };
@Override public void handleEvent( Event event ) { if( event.type == SWT.Dispose ) { if( !DragSource.this.isDisposed() ) { DragSource.this.dispose(); } } if( event.type == SWT.DragDetect ) { if( !DragSource.this.isDisposed() ) { // DragSource.this.drag(event); } } } };
private void tableViewDestroyed() { if (dragSource != null && !dragSource.isDisposed()) { dragSource.dispose(); } if (dropTarget != null && !dropTarget.isDisposed()) { dropTarget.dispose(); } } });
@Override public void handleEvent (Event event) { if (event.type == SWT.Dispose) { if (!DragSource.this.isDisposed()) { DragSource.this.dispose(); } } if (event.type == SWT.DragDetect) { if (!DragSource.this.isDisposed()) { DragSource.this.drag(event); } } } };
@Override public void handleEvent (Event event) { if (event.type == SWT.Dispose) { if (!DragSource.this.isDisposed()) { DragSource.this.dispose(); } } if (event.type == SWT.DragDetect) { if (!DragSource.this.isDisposed()) { DragSource.this.drag(event); } } } };
private void tableViewDestroyed() { if (dragSource != null && !dragSource.isDisposed()) { dragSource.dispose(); } if (dropTarget != null && !dropTarget.isDisposed()) { dropTarget.dispose(); } } });
@Override public void handleEvent (Event event) { if (event.type == SWT.Dispose) { if (!DragSource.this.isDisposed()) { DragSource.this.dispose(); } } if (event.type == SWT.DragDetect) { if (!DragSource.this.isDisposed()) { DragSource.this.drag(event); } } } };
public void handleEvent (Event event) { if (event.type == SWT.Dispose) { if (!DragSource.this.isDisposed()) { DragSource.this.dispose(); } } if (event.type == SWT.DragDetect) { if (!DragSource.this.isDisposed()) { if (event.widget instanceof Table || event.widget instanceof Tree) { DragSource.this.dragOutlineViewStart(event); } else { DragSource.this.drag(event); } } } } };
/** * Uninstalls text drag and drop from the given source viewer. * * @param viewer the viewer * @since 3.3 */ protected void uninstallTextDragAndDrop(ISourceViewer viewer) { if (viewer == null || !fIsTextDragAndDropInstalled) return; final IDragAndDropService dndService= getSite().getService(IDragAndDropService.class); if (dndService == null) return; StyledText st= viewer.getTextWidget(); dndService.removeMergedDropTarget(st); DragSource dragSource= (DragSource)st.getData(DND.DRAG_SOURCE_KEY); if (dragSource != null) { dragSource.dispose(); st.setData(DND.DRAG_SOURCE_KEY, null); } fIsTextDragAndDropInstalled= false; }
/** * Uninstalls text drag and drop from the given source viewer. * * @param viewer the viewer * @since 3.3 */ protected void uninstallTextDragAndDrop(ISourceViewer viewer) { if (viewer == null || !fIsTextDragAndDropInstalled) return; final IDragAndDropService dndService= getSite().getService(IDragAndDropService.class); if (dndService == null) return; StyledText st= viewer.getTextWidget(); dndService.removeMergedDropTarget(st); DragSource dragSource= (DragSource)st.getData(DND.DRAG_SOURCE_KEY); if (dragSource != null) { dragSource.dispose(); st.setData(DND.DRAG_SOURCE_KEY, null); } fIsTextDragAndDropInstalled= false; }
private void createDragSource() { if (dragSource != null) dragSource.dispose(); dragSource = new DragSource(dragControl, dragOperation); dragSource.setTransfer(dragTypes);
} else { if (dragSource != null) { dragSource.dispose();
dragSource.dispose();
dragSource.dispose();
dragSource.dispose();