Object
org.eclipse.nebula.widgets.nattable.data.validate.DataValidator
hdf.view.TableView.DataValidatorFactory.HDFDataValidator
- All Implemented Interfaces:
org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator
- Enclosing class:
- DataValidatorFactory
public static class DataValidatorFactory.HDFDataValidator
extends org.eclipse.nebula.widgets.nattable.data.validate.DataValidator
The HDF extension of the data valicdation
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
This field is only used for CompoundDataValidator, but when the top-level DataValidator is a "container" type, such as an ArrayDataValidator, we have to set this field and pass it through in case there is a CompoundDataValidator at the bottom of the chain.Fields inherited from interface org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator
ALWAYS_VALID, NEVER_VALID
-
Constructor Summary
ConstructorDescriptionHDFDataValidator(Datatype dtype)
Create the HDF extended Data Validator for the datatype object -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkValidValue(Object newValue)
Validate the data value.protected void
throwValidationFailedException(int rowIndex, int colIndex, Object newValue, String reason)
The validate exception message.boolean
The validate method used to validate the data value for the type.Methods inherited from class org.eclipse.nebula.widgets.nattable.data.validate.DataValidator
validate
-
Field Details
-
cellColIdx
This field is only used for CompoundDataValidator, but when the top-level DataValidator is a "container" type, such as an ArrayDataValidator, we have to set this field and pass it through in case there is a CompoundDataValidator at the bottom of the chain.
-
-
Constructor Details
-
HDFDataValidator
HDFDataValidator(Datatype dtype)Create the HDF extended Data Validator for the datatype object- Parameters:
dtype
- the datatype object
-
-
Method Details
-
validate
The validate method used to validate the data value for the type.- Specified by:
validate
in interfaceorg.eclipse.nebula.widgets.nattable.data.validate.IDataValidator
- Specified by:
validate
in classorg.eclipse.nebula.widgets.nattable.data.validate.DataValidator
- Parameters:
colIndex
- the columnrowIndex
- the rownewValue
- the validated value- Returns:
- true if this data is valid
-
checkValidValue
protected void checkValidValue(Object newValue) throws org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedExceptionValidate the data value.- Parameters:
newValue
- the value to validate- Throws:
org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedException
-
throwValidationFailedException
protected void throwValidationFailedException(int rowIndex, int colIndex, Object newValue, String reason) throws org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedExceptionThe validate exception message.- Parameters:
rowIndex
- the rowcolIndex
- the columnnewValue
- the invalid valuereason
- the reason the value is invalid- Throws:
org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedException
-