• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ConversionException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.vaadin.data.util.converter.Converter.ConversionException的典型用法代码示例。如果您正苦于以下问题:Java ConversionException类的具体用法?Java ConversionException怎么用?Java ConversionException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ConversionException类属于com.vaadin.data.util.converter.Converter包,在下文中一共展示了ConversionException类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: handleUnparsableDateString

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
 * This method is called to handle a non-empty date string from the client
 * if the client could not parse it as a Date. In the current case two
 * different parsing schemas are tried. If parsing is not possible a
 * ConversionException is thrown which marks the DurationField as invalid.
 */
@Override
protected Date handleUnparsableDateString(final String value) throws ConversionException {

    try {
        return durationFormat.parse(value);

    } catch (final ParseException e1) {
        try {

            return additionalFormat.parse("000000".substring(value.length() <= 6 ? value.length() : 6) + value);
        } catch (final ParseException e2) {
            // if Parsing is not possible ConversionException is thrown
        }
    }
    throw new ConversionException("input is not in HH:MM:SS format.");
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:23,代码来源:DurationField.java


示例2: setValueAsString

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
@Override
public void setValueAsString(String value, String parameterName)
		throws ReadOnlyException, ConversionException, ParseException
{
	SimpleDateFormat sdf = new SimpleDateFormat(parameterFormat);
	DateField field;
	if (parameterName.equalsIgnoreCase(startParameterName))
	{
		field = startfield;
	}
	else
	{
		field = endfield;
	}
	field.setValue(sdf.parse(value));

}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:18,代码来源:ReportParameterDateTimeRange.java


示例3: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
 * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
 */
@Override
public void setValue(String newFieldValue) throws ReadOnlyException,
		ConversionException {
	super.setInternalValue(newFieldValue);
	changeFieldValue(newFieldValue);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:10,代码来源:RequiredColorPickerField.java


示例4: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
 * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
 */
@Override
public void setValue(Tag newFieldValue) throws ReadOnlyException,
		ConversionException {
	super.setInternalValue(newFieldValue);
	changeFieldValue(newFieldValue);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:10,代码来源:RequiredTagField.java


示例5: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
 * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
 */
@Override
public void setValue(Boolean newFieldValue) throws ReadOnlyException,
		ConversionException {
	if (newFieldValue==null){
		newFieldValue = false;
	}
	value = newFieldValue;		
	super.setValue(newFieldValue);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:13,代码来源:RequiredCheckBox.java


示例6: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
 * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
 */
@Override
public void setValue(String newFieldValue) throws ReadOnlyException,
		ConversionException {
	if (newFieldValue==null){
		newFieldValue = ConstanteUtils.TYP_BOOLEAN_NO;
	}
	value = newFieldValue;		
	super.setValue(newFieldValue);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:13,代码来源:RequiredStringCheckBox.java


示例7: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
 * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
 */
@Override
public void setValue(LocalDate newFieldValue) throws ReadOnlyException,
		ConversionException {		
	super.setValue(newFieldValue);
	timeValue = newFieldValue;
	setDateValue(newFieldValue);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:11,代码来源:LocalDateField.java


示例8: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
 * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
 */
@Override
public void setValue(String newFieldValue) throws ReadOnlyException,
		ConversionException {
	
	if (newFieldValue!=null){
		field.setValue(new SimpleBeanPresentation(newFieldValue));
	}
	value = newFieldValue;		
	super.setValue(newFieldValue);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:14,代码来源:ComboBoxPresentation.java


示例9: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
 * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
 */
@Override
public void setValue(LocalDateTime newFieldValue) throws ReadOnlyException,
		ConversionException {		
	super.setValue(newFieldValue);
	timeValue = newFieldValue;
	setDateTimeValue(newFieldValue);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:11,代码来源:LocalDateTimeField.java


示例10: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
 * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
 */
@Override
public void setValue(LocalTime newFieldValue) throws ReadOnlyException,
		ConversionException {
	timeValue = newFieldValue;
	setDateTimeValue(newFieldValue);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:10,代码来源:LocalTimeField.java


示例11: ProtoInvalidValueException

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
public ProtoInvalidValueException(final String message, final ConversionException exception)
{
    super(message);

    assert null != exception : "Parameter 'exception' of 'ProtoInvalidValueException''s ctor must not be null";

    this.cnvrsExcep = exception;
    LOGGER.error("Original conversion exception: '{}'", this.cnvrsExcep);
}
 
开发者ID:tonight-halfmoon,项目名称:Vaadin-Prime-Count,代码行数:10,代码来源:ProtoInvalidValueException.java


示例12: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
@Override
protected void setValue(Object newFieldValue, boolean repaintIsNotNeeded)
		throws com.vaadin.data.Property.ReadOnlyException,
		ConversionException, InvalidValueException {
	
	super.setValue(newFieldValue, repaintIsNotNeeded);
}
 
开发者ID:markoradinovic,项目名称:suggestfield,代码行数:8,代码来源:SuggestField.java


示例13: setValueAsString

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
@Override
public void setValueAsString(String value, String parameterName)
		throws ReadOnlyException, ConversionException, ParseException
{
	SimpleDateFormat sdf = new SimpleDateFormat(parameterFormat);
	if (parameterName.equalsIgnoreCase(startParameterName))
	{
		startfield.setValue(sdf.parse(value));
	}
	logger.warn("Trying to set end date for a one day date range, ignoring");
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:12,代码来源:ReportParameterDateTimeOneDay.java


示例14: getOriginalConversionException

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
public ConversionException getOriginalConversionException()
{
    return this.cnvrsExcep;
}
 
开发者ID:tonight-halfmoon,项目名称:Vaadin-Prime-Count,代码行数:5,代码来源:ProtoInvalidValueException.java


示例15: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
@Override
public void setValue(T newFieldValue) throws com.vaadin.data.Property.ReadOnlyException, ConversionException
{
    innerField.setValue(newFieldValue);
    markAsDirty();
}
 
开发者ID:sensiasoft,项目名称:sensorhub,代码行数:7,代码来源:FieldWrapper.java


示例16: setValue

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
@Override
public void setValue(Interval interval) throws com.vaadin.data.Property.ReadOnlyException, ConversionException {
    super.setValue(interval);
    fromField.setValue(interval.getStart().toDate());
    fromField.setValue(interval.getEnd().toDate());
}
 
开发者ID:Dr4K4n,项目名称:joda-time-fields,代码行数:7,代码来源:IntervalField.java


示例17: setValueAsString

import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
abstract public void setValueAsString(String value, String paramterName)
throws ReadOnlyException, ConversionException, ParseException;
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:3,代码来源:ReportParameter.java



注:本文中的com.vaadin.data.util.converter.Converter.ConversionException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ClientNamenodeProtocolTranslatorPB类代码示例发布时间:2022-05-22
下一篇:
Java KeyCrypterException类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap