本文整理了Java中org.eclipse.swt.widgets.Spinner.hooks()
方法的一些代码示例,展示了Spinner.hooks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spinner.hooks()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Spinner
类名称:Spinner
方法名:hooks
暂无
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
if (hooks (SWT.Verify) || filters (SWT.Verify)) {
int length = OS.GetWindowTextLength (hwndText);
string = verifyText (string, 0, length, null);
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
if (hooks (SWT.Verify) || filters (SWT.Verify)) {
int length = (int)/*64*/cell.title().length();
string = verifyText (string, 0, length, null);
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
OS.memmove(range, affectedCharRange, NSRange.sizeof);
boolean result = callSuperBoolean(id, sel, range, replacementString);
if (hooks (SWT.Verify)) {
String text = new NSString(replacementString).getString();
NSEvent currentEvent = display.application.currentEvent();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int /*long*/ end_pos) {
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
int /*long*/ ptr = OS.gtk_entry_get_text (handle);
if (end_pos == -1) end_pos = OS.g_utf8_strlen (ptr, -1);
int start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start_pos);
int end = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end_pos);
String newText = verifyText ("", start, end);
if (newText == null) {
OS.g_signal_stop_emission_by_name (handle, OS.delete_text);
} else {
if (newText.length () > 0) {
int [] pos = new int [1];
pos [0] = (int)/*64*/end_pos;
byte [] buffer = Converter.wcsToMbcs (null, newText, false);
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
OS.gtk_editable_insert_text (handle, buffer, buffer.length, pos);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.gtk_editable_set_position (handle, pos [0]);
}
}
return 0;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
long /*int*/ gtk_delete_text (long /*int*/ widget, long /*int*/ start_pos, long /*int*/ end_pos) {
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
long /*int*/ ptr = OS.gtk_entry_get_text (handle);
if (end_pos == -1) end_pos = OS.g_utf8_strlen (ptr, -1);
int start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start_pos);
int end = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end_pos);
String newText = verifyText ("", start, end);
if (newText == null) {
OS.g_signal_stop_emission_by_name (handle, OS.delete_text);
} else {
if (newText.length () > 0) {
int [] pos = new int [1];
pos [0] = (int)/*64*/end_pos;
byte [] buffer = Converter.wcsToMbcs (null, newText, false);
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
OS.gtk_editable_insert_text (handle, buffer, buffer.length, pos);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.gtk_editable_set_position (handle, pos [0]);
}
}
return 0;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int /*long*/ end_pos) {
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
int /*long*/ ptr = OS.gtk_entry_get_text (handle);
if (end_pos == -1) end_pos = OS.g_utf8_strlen (ptr, -1);
int start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start_pos);
int end = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end_pos);
String newText = verifyText ("", start, end);
if (newText == null) {
OS.g_signal_stop_emission_by_name (handle, OS.delete_text);
} else {
if (newText.length () > 0) {
int [] pos = new int [1];
pos [0] = (int)/*64*/end_pos;
byte [] buffer = Converter.wcsToMbcs (null, newText, false);
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
OS.gtk_editable_insert_text (handle, buffer, buffer.length, pos);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.gtk_editable_set_position (handle, pos [0]);
}
}
return 0;
}
内容来源于网络,如有侵权,请联系作者删除!