public void widgetDisposed(DisposeEvent e) { disposeIcons(); if(null != fClipboard && fClipboard.isDisposed()) { fClipboard.dispose(); } } });
/** * Disposes of the operating system resources associated with the clipboard. * The data will still be available on the system clipboard after the dispose * method is called. * * <p>NOTE: On some platforms the data will not be available once the application * has exited or the display has been disposed.</p> * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ public void dispose () { if (isDisposed()) return; if (display.getThread() != Thread.currentThread()) DND.error(SWT.ERROR_THREAD_INVALID_ACCESS); display = null; }
/** * Disposes of the operating system resources associated with the clipboard. * The data will still be available on the system clipboard after the dispose * method is called. * * <p>NOTE: On some platforms the data will not be available once the application * has exited or the display has been disposed.</p> * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ public void dispose () { if (isDisposed()) return; if (display.getThread() != Thread.currentThread()) DND.error(SWT.ERROR_THREAD_INVALID_ACCESS); display = null; }
/** * Disposes of the operating system resources associated with the clipboard. * The data will still be available on the system clipboard after the dispose * method is called. * * <p>NOTE: On some platforms the data will not be available once the application * has exited or the display has been disposed.</p> * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ public void dispose () { if (isDisposed()) return; if (display.getThread() != Thread.currentThread()) DND.error(SWT.ERROR_THREAD_INVALID_ACCESS); display = null; }
/** * Disposes of the operating system resources associated with the clipboard. * The data will still be available on the system clipboard after the dispose * method is called. * * <p>NOTE: On some platforms the data will not be available once the application * has exited or the display has been disposed.</p> * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ public void dispose () { if (isDisposed()) return; if (display.getThread() != Thread.currentThread()) DND.error(SWT.ERROR_THREAD_INVALID_ACCESS); display = null; }
private void doCopy() { final ISelection s = table.getSelection(); if (s.isEmpty() || !(s instanceof IStructuredSelection)) return; final IStructuredSelection iss = (IStructuredSelection) s; final Iterator<PlotCommit> itr = iss.iterator(); final StringBuilder r = new StringBuilder(); while (itr.hasNext()) { final PlotCommit d = itr.next(); if (r.length() > 0) r.append(LINESEP); r.append(d.getId().name()); } if (clipboard == null || clipboard.isDisposed()) return; clipboard.setContents(new Object[] { r.toString() }, new Transfer[] { TextTransfer.getInstance() }, DND.CLIPBOARD); }
/** * Disposes of the operating system resources associated with the clipboard. * The data will still be available on the system clipboard after the dispose * method is called. * * <p>NOTE: On some platforms the data will not be available once the application * has exited or the display has been disposed.</p> * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ public void dispose () { if (isDisposed()) return; if (display.getThread() != Thread.currentThread()) DND.error(SWT.ERROR_THREAD_INVALID_ACCESS); /* OleIsCurrentClipboard([in] pDataObject) * The argument pDataObject is owned by the caller so reference count does not * need to be incremented. */ if (COM.OleIsCurrentClipboard(this.iDataObject.getAddress()) == COM.S_OK) { COM.OleFlushClipboard(); } this.Release(); display = null; }