本文整理了Java中org.eclipse.swt.widgets.Text.setKeyState()
方法的一些代码示例,展示了Text.setKeyState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.setKeyState()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Text
类名称:Text
方法名:setKeyState
暂无
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
String verifyText (String string, int start, int end, NSEvent keyEvent) {
Event event = new Event ();
if (keyEvent != null) setKeyState(event, SWT.MouseDown, keyEvent);
event.text = string;
event.start = start;
event.end = end;
/*
* It is possible (but unlikely), that application
* code could have disposed the widget in the verify
* event. If this happens, answer null to cancel
* the operation.
*/
sendEvent (SWT.Verify, event);
if (!event.doit || isDisposed ()) return null;
return event.text;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
String verifyText (String string, int start, int end) {
if (string != null && string.length () == 0 && start == end) return null;
Event event = new Event ();
event.text = string;
event.start = start;
event.end = end;
int /*long*/ eventPtr = OS.gtk_get_current_event ();
if (eventPtr != 0) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof);
switch (gdkEvent.type) {
case OS.GDK_KEY_PRESS:
setKeyState (event, gdkEvent);
break;
}
OS.gdk_event_free (eventPtr);
}
/*
* It is possible (but unlikely), that application
* code could have disposed the widget in the verify
* event. If this happens, answer null to cancel
* the operation.
*/
sendEvent (SWT.Verify, event);
if (!event.doit || isDisposed ()) return null;
return event.text;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
String verifyText (String string, int start, int end) {
if (string != null && string.length () == 0 && start == end) return null;
Event event = new Event ();
event.text = string;
event.start = start;
event.end = end;
long /*int*/ eventPtr = OS.gtk_get_current_event ();
if (eventPtr != 0) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof);
switch (gdkEvent.type) {
case OS.GDK_KEY_PRESS:
setKeyState (event, gdkEvent);
break;
}
OS.gdk_event_free (eventPtr);
}
/*
* It is possible (but unlikely), that application
* code could have disposed the widget in the verify
* event. If this happens, answer null to cancel
* the operation.
*/
sendEvent (SWT.Verify, event);
if (!event.doit || isDisposed ()) return null;
return event.text;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
String verifyText (String string, int start, int end) {
if (string != null && string.length () == 0 && start == end) return null;
Event event = new Event ();
event.text = string;
event.start = start;
event.end = end;
int /*long*/ eventPtr = OS.gtk_get_current_event ();
if (eventPtr != 0) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof);
switch (gdkEvent.type) {
case OS.GDK_KEY_PRESS:
setKeyState (event, gdkEvent);
break;
}
OS.gdk_event_free (eventPtr);
}
/*
* It is possible (but unlikely), that application
* code could have disposed the widget in the verify
* event. If this happens, answer null to cancel
* the operation.
*/
sendEvent (SWT.Verify, event);
if (!event.doit || isDisposed ()) return null;
return event.text;
}
内容来源于网络,如有侵权,请联系作者删除!