org.eclipse.swt.widgets.Spinner.verifyText()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中org.eclipse.swt.widgets.Spinner.verifyText()方法的一些代码示例,展示了Spinner.verifyText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spinner.verifyText()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Spinner
类名称:Spinner
方法名:verifyText

Spinner.verifyText介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

string = verifyText (string, 0, length, null);
if (string == null) return;

代码示例来源: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);
  if (string == null) return;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

break;
String newText = verifyText (oldText, start [0], end [0], event);
if (newText == null) return false;
if (newText == oldText) return true;

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

long /*int*/ type = currentEvent.type();
if (type != OS.NSKeyDown && type != OS.NSKeyUp) currentEvent = null;
String newText = verifyText(text, (int)/*64*/range.location, (int)/*64*/(range.location+range.length), currentEvent);
if (newText == null) return false;
if (text != newText) {

代码示例来源: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.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.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.aix.ppc

if (pos [0] == -1) pos [0] = (int)/*64*/OS.g_utf8_strlen (ptr, -1);
int start = (int)/*64*/OS.g_utf16_pointer_to_offset (ptr, pos [0]);
String newText = verifyText (oldText, start, start);
if (newText != oldText) {
  int [] newStart = new int [1], newEnd = new int [1];

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

if (pos [0] == -1) pos [0] = (int)/*64*/OS.g_utf8_strlen (ptr, -1);
int start = (int)/*64*/OS.g_utf16_pointer_to_offset (ptr, pos [0]);
String newText = verifyText (oldText, start, start);
if (newText != oldText) {
  int [] newStart = new int [1], newEnd = new int [1];

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

if (pos [0] == -1) pos [0] = (int)/*64*/OS.g_utf8_strlen (ptr, -1);
int start = (int)/*64*/OS.g_utf16_pointer_to_offset (ptr, pos [0]);
String newText = verifyText (oldText, start, start);
if (newText != oldText) {
  int [] newStart = new int [1], newEnd = new int [1];

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

newText = verifyText (newText, start [0], end [0], null);
if (newText == null) return LRESULT.ZERO;
if (!newText.equals (oldText)) {

相关文章