本文整理汇总了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;未经允许,请勿转载。 |
请发表评论