本文整理了Java中org.eclipse.swt.dnd.Clipboard.isDisposed()
方法的一些代码示例,展示了Clipboard.isDisposed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Clipboard.isDisposed()
方法的具体详情如下:
包路径:org.eclipse.swt.dnd.Clipboard
类名称:Clipboard
方法名:isDisposed
[英]Returns true
if the clipboard has been disposed, and false
otherwise.
This method gets the dispose state for the clipboard. When a clipboard has been disposed, it is an error to invoke any other method using the clipboard.
[中]如果剪贴板已被释放,则返回true
,否则返回false
。
此方法获取剪贴板的dispose状态。处置剪贴板后,使用剪贴板调用任何其他方法都是错误的。
代码示例来源:origin: cbeust/testng-eclipse
public void widgetDisposed(DisposeEvent e) {
disposeIcons();
if(null != fClipboard && fClipboard.isDisposed()) {
fClipboard.dispose();
}
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* 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;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
/**
* 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;
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* 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;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
/**
* 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;
}
代码示例来源:origin: org.eclipse.egit/ui
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);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* 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;
}
内容来源于网络,如有侵权,请联系作者删除!