本文整理了Java中org.eclipse.swt.dnd.Clipboard.checkWidget()
方法的一些代码示例,展示了Clipboard.checkWidget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Clipboard.checkWidget()
方法的具体详情如下:
包路径:org.eclipse.swt.dnd.Clipboard
类名称:Clipboard
方法名:checkWidget
[英]Throws an SWTException
if the receiver can not be accessed by the caller. This may include both checks on the state of the receiver and more generally on the entire execution context. This method should be called by widget implementors to enforce the standard SWT invariants.
Currently, it is an error to invoke any method (other than isDisposed()
) on a widget that has had its dispose()
method called. It is also an error to call widget methods from any thread that is different from the thread that created the widget.
In future releases of SWT, there may be more or fewer error checks and exceptions may be thrown for different reasons.
[中]如果调用方无法访问接收器,则抛出SWTException
。这可能包括对接收器状态的检查,更一般地,包括对整个执行上下文的检查。这个方法应该由小部件实现者调用,以强制执行标准SWT不变量。
目前,在调用了dispose()
方法的小部件上调用任何方法(而不是isDisposed()
)都是错误的。从与创建小部件的线程不同的任何线程调用小部件方法也是一个错误。
在SWT的未来版本中,可能会有更多或更少的错误检查,并且可能会出于不同的原因引发异常。
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
checkWidget();
ClipboardProxy proxy = ClipboardProxy._getInstance(display);
proxy.clear(this, clipboards);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
checkWidget();
ClipboardProxy proxy = ClipboardProxy._getInstance(display);
proxy.clear(this, clipboards);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
checkWidget();
ClipboardProxy proxy = ClipboardProxy._getInstance(display);
proxy.clear(this, clipboards);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
checkWidget();
if ((clipboards & DND.CLIPBOARD) == 0) return new TransferData[0];
FORMATETC[] types = _getAvailableTypes();
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
checkWidget();
if ((clipboards & DND.CLIPBOARD) == 0) return;
NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
checkWidget();
if ((clipboards & DND.CLIPBOARD) != 0) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
checkWidget();
TransferData[] result = null;
if ((clipboards & DND.CLIPBOARD) != 0) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
checkWidget();
TransferData[] result = null;
if ((clipboards & DND.CLIPBOARD) != 0) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
checkWidget();
TransferData[] result = null;
if ((clipboards & DND.CLIPBOARD) != 0) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
checkWidget();
FORMATETC[] types = _getAvailableTypes();
String[] names = new String[types.length];
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Returns a platform specific list of the data types currently available on the
* system clipboard.
*
* <p>Note: <code>getAvailableTypeNames</code> is a utility for writing a Transfer
* sub-class. It should NOT be used within an application because it provides
* platform specific information.</p>
*
* @return a platform specific list of the data types currently available on the
* system clipboard
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
public String[] getAvailableTypeNames() {
checkWidget();
NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
if (pasteboard == null) return new String[0];
NSArray types = pasteboard.types();
if (types == null) return new String[0];
int count = (int)/*64*/types.count();
String[] result = new String[count];
for (int i = 0; i < count; i++) {
result[i] = new NSString(types.objectAtIndex(i)).getString();
}
return result;
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
checkWidget();
int[] types1 = getAvailableClipboardTypes();
int[] types2 = getAvailablePrimaryTypes();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
checkWidget();
int[] types1 = getAvailableClipboardTypes();
int[] types2 = getAvailablePrimaryTypes();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
checkWidget();
int[] types1 = getAvailableClipboardTypes();
int[] types2 = getAvailablePrimaryTypes();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
checkWidget();
if (data == null || dataTypes == null || data.length != dataTypes.length || data.length == 0) {
DND.error(SWT.ERROR_INVALID_ARGUMENT);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
checkWidget();
if (data == null || dataTypes == null || data.length != dataTypes.length || data.length == 0) {
DND.error(SWT.ERROR_INVALID_ARGUMENT);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
checkWidget();
if (data == null || dataTypes == null || data.length != dataTypes.length || data.length == 0) {
DND.error(SWT.ERROR_INVALID_ARGUMENT);
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
checkWidget();
if ((clipboards & DND.CLIPBOARD) == 0) return new TransferData[0];
NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
checkWidget();
if (transfer == null) DND.error(SWT.ERROR_NULL_ARGUMENT);
long /*int*/ selection_data = 0;
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
checkWidget();
if (transfer == null) DND.error(SWT.ERROR_NULL_ARGUMENT);
int /*long*/ selection_data = 0;
内容来源于网络,如有侵权,请联系作者删除!