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

x33g5p2x  于2022-01-18 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(151)

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

DateTime.getText介绍

[英]Returns a string containing a copy of the contents of the receiver's text field, or an empty string if there are no contents.
[中]返回包含接收者文本字段内容副本的字符串,如果没有内容,则返回空字符串。

代码示例

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

@Override
  public void run () {
    if (textEntryHandle != 0) {
      String value = getText (getText (),start, end - 1);
      int s = value.lastIndexOf (' ');
      s = (s == -1) ? start : start + s + 1;
      setSelection (s, end);
    }
  }
});

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

@Override
  public void run () {
    if (textEntryHandle != 0) {
      String value = getText (getText (),start, end - 1);
      int s = value.lastIndexOf (' ');
      s = (s == -1) ? start : start + s + 1;
      setSelection (s, end);
    }
  }
});

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

@Override
  public void run () {
    if (textEntryHandle != 0) {
      String value = getText (getText (),start, end - 1);
      int s = value.lastIndexOf (' ');
      s = (s == -1) ? start : start + s + 1;
      setSelection (s, end);
    }
  }
});

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

void commitCurrentField () {
  if (characterCount > 0) {
    characterCount = 0;
    int fieldName = fieldNames[currentField];
    int start = fieldIndices[currentField].x;
    int end = fieldIndices[currentField].y;
    String value = getText (getText (),start, end - 1);
    int s = value.lastIndexOf (' ');
    if (s != -1) value = value.substring (s + 1);
    int newValue = unformattedIntValue (fieldName, value, characterCount == 0, calendar.getActualMaximum (fieldName));
    if (newValue != -1) setTextField (fieldName, newValue, true, true);
  }
}
/** returns selected text **/

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

String getText (int start, int end) {
  checkWidget ();
  if (!(start <= end && 0 <= end)) return "";
  String str = getText ();
  int length = str.length ();
  end = Math.min (end, length - 1);
  if (start > end) return "";
  start = Math.max (0, start);
  /*
  * NOTE: The current implementation uses substring ()
  * which can reference a potentially large character
  * array.
  */
  return str.substring (start, end + 1);
}

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

void commitCurrentField () {
  if (characterCount > 0) {
    characterCount = 0;
    int fieldName = fieldNames[currentField];
    int start = fieldIndices[currentField].x;
    int end = fieldIndices[currentField].y;
    String value = getText (getText (),start, end - 1);
    int s = value.lastIndexOf (' ');
    if (s != -1) value = value.substring (s + 1);
    int newValue = unformattedIntValue (fieldName, value, characterCount == 0, calendar.getActualMaximum (fieldName));
    if (newValue != -1) setTextField (fieldName, newValue, true, true);
  }
}
/** returns selected text **/

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

void commitCurrentField () {
  if (characterCount > 0) {
    characterCount = 0;
    int fieldName = fieldNames[currentField];
    int start = fieldIndices[currentField].x;
    int end = fieldIndices[currentField].y;
    String value = getText (getText (),start, end - 1);
    int s = value.lastIndexOf (' ');
    if (s != -1) value = value.substring (s + 1);
    int newValue = unformattedIntValue (fieldName, value, characterCount == 0, calendar.getActualMaximum (fieldName));
    if (newValue != -1) setTextField (fieldName, newValue, true, true);
  }
}
/** returns selected text **/

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

String getText (int start, int end) {
  checkWidget ();
  if (!(start <= end && 0 <= end)) return "";
  String str = getText ();
  int length = str.length ();
  end = Math.min (end, length - 1);
  if (start > end) return "";
  start = Math.max (0, start);
  /*
  * NOTE: The current implementation uses substring ()
  * which can reference a potentially large character
  * array.
  */
  return str.substring (start, end + 1);
}

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

String getText (int start, int end) {
  checkWidget ();
  if (!(start <= end && 0 <= end)) return "";
  String str = getText ();
  int length = str.length ();
  end = Math.min (end, length - 1);
  if (start > end) return "";
  start = Math.max (0, start);
  /*
  * NOTE: The current implementation uses substring ()
  * which can reference a potentially large character
  * array.
  */
  return str.substring (start, end + 1);
}

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

return false;
String value = getText (start, end - 1);
int s = value.lastIndexOf (' ');
if (s != -1) value = value.substring (s + 1);

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

return false;
String value = getText (start, end - 1);
int s = value.lastIndexOf (' ');
if (s != -1) value = value.substring (s + 1);

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

return false;
String value = getText (start, end - 1);
int s = value.lastIndexOf (' ');
if (s != -1) value = value.substring (s + 1);

相关文章

DateTime类方法