本文整理了Java中org.eclipse.swt.widgets.DateTime.getText()
方法的一些代码示例,展示了DateTime.getText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateTime.getText()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.DateTime
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!