本文整理了Java中javax.swing.text.DateFormatter.valueToString()
方法的一些代码示例,展示了DateFormatter.valueToString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateFormatter.valueToString()
方法的具体详情如下:
包路径:javax.swing.text.DateFormatter
类名称:DateFormatter
方法名:valueToString
暂无
代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server
result.put(EXPIRES_AT, dateFormat.valueToString(refreshToken.getExpiration()));
result.put(EXP, refreshToken.getExpiration().getTime() / 1000L);
} catch (ParseException e) {
代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server
result.put(EXPIRES_AT, dateFormat.valueToString(accessToken.getExpiration()));
result.put(EXP, accessToken.getExpiration().getTime() / 1000L);
} catch (ParseException e) {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-team-commons
@Override
public void setDate (Date date) {
try {
setText(formatter.valueToString(date));
} catch (ParseException ex) {
Support.LOG.log(Level.INFO, null, ex);
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-bugtracking
@Override
public String valueToString (Object value) throws ParseException {
if (value instanceof IssueScheduleInfo) {
return super.valueToString(((IssueScheduleInfo) value).getDate());
} else {
return null;
}
}
}
代码示例来源:origin: com.eas.platypus/platypus-js-calendar-widget
@Override
public String valueToString(Object value) throws ParseException {
if (value == null) {
return mf.valueToString(null);
} else if (value instanceof StringContainer) {
return ((StringContainer) value).view;
} else {
return super.valueToString(value);
}
}
代码示例来源:origin: com.jgoodies/validation
/**
* Returns a String representation of the Object <code>value</code>.
* This invokes <code>format</code> on the current <code>Format</code>.<p>
*
* Unlike its superclass, this class converts the empty value
* to the empty string.
*
* @param value the value to convert
* @return a String representation of value
* @throws ParseException if there is an error in the conversion
*/
@Override
public String valueToString(Object value) throws ParseException {
return ValidationUtils.equals(value, emptyValue)
? ""
: super.valueToString(value);
}
代码示例来源:origin: com.eas.platypus/platypus-js-calendar-widget
try {
Object value = super.stringToValue(text);
if (super.valueToString(value).trim().length() != text.trim().length()) {
throw new ParseException(text, text.length() - 1);
String complementedText = text.substring(0, text.length() - DATETIME_FORMAT_TAIL.length()) + "00:00:00";
Object value = super.stringToValue(complementedText);
if (!super.valueToString(value).equals(complementedText)) {
throw new ParseException(complementedText, complementedText.length() - 1);
代码示例来源:origin: org.mitre/openid-connect-server
result.put(EXPIRES_AT, dateFormat.valueToString(refreshToken.getExpiration()));
result.put(EXP, refreshToken.getExpiration().getTime() / 1000L);
} catch (ParseException e) {
代码示例来源:origin: org.mitre/openid-connect-server
result.put(EXPIRES_AT, dateFormat.valueToString(accessToken.getExpiration()));
result.put(EXP, accessToken.getExpiration().getTime() / 1000L);
} catch (ParseException e) {
内容来源于网络,如有侵权,请联系作者删除!