本文整理了Java中org.eclipse.swt.widgets.Spinner.getText()
方法的一些代码示例,展示了Spinner.getText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spinner.getText()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Spinner
类名称:Spinner
方法名: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: inspectIT/inspectIT
/**
* Returns the specified time range value.
*
* @return Returns the specified time range value.
*/
public long getTimerange() {
return Long.parseLong(timerangeSpinner.getText());
}
代码示例来源:origin: inspectIT/inspectIT
/**
* {@inheritDoc}
*/
@Override
public boolean isPageComplete() {
return !thresholdBox.getText().isEmpty() && !timerangeSpinner.getText().isEmpty() && (checkEmailText() == null);
}
代码示例来源:origin: eclipse/aCute
@Override public void performApply(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(ATTR_PID, pidText.getText());
}
代码示例来源:origin: org.xworker/xworker_swt
public static void yearMonthModify(ActionContext actionContext){
Spinner yearText = (Spinner) actionContext.get("yearText");
ActionContainer actions = (ActionContainer) actionContext.get("actions");
if(actionContext.get("init") != null && (Boolean) actionContext.get("init") == true || "".equals(yearText.getText())){
return;
}
Combo monthCombo = (Combo) actionContext.get("monthCombo");
int year = Integer.parseInt(yearText.getText());
int month = monthCombo.getSelectionIndex();
GregorianCalendar calendar = new GregorianCalendar();
Table dateTable = (Table) actionContext.get("dateTable");
Date date = (Date) dateTable.getData();
calendar.setTime(date);
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.MONTH, month);
actions.doAction("initDateTable", actionContext, UtilMap.toParams(new Object[]{"date", calendar.getTime(), "setTextData", false}));
}
代码示例来源:origin: inspectIT/inspectIT
/**
* Sets the message based on the page contents.
*/
protected void setPageMessage() {
if (thresholdBox.getText().isEmpty()) {
setMessage("Threshold must not be empty!", ERROR);
return;
}
if (timerangeSpinner.getText().isEmpty()) {
setMessage("Check interval must not be empty!", ERROR);
return;
}
Pair<Integer, String> emailsErrorMessage = checkEmailText();
if (null != emailsErrorMessage) {
setMessage("The email address '" + emailsErrorMessage.getSecond() + "' in line " + emailsErrorMessage.getFirst() + " is not valid!", ERROR);
return;
}
setMessage(DEFAULT_MESSAGE);
}
内容来源于网络,如有侵权,请联系作者删除!