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
Fields Modifier and Type Field Description protected intcellColIdxThis 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
Constructors Constructor Description HDFDataValidator(Datatype dtype)Create the HDF extended Data Validator for the datatype object -
Method Summary
Modifier and Type Method Description protected voidcheckValidValue(Object newValue)Validate the data value.protected voidthrowValidationFailedException(int rowIndex, int colIndex, Object newValue, String reason)The validate exception message.booleanvalidate(int colIndex, int rowIndex, Object newValue)The validate method used to validate the data value for the type.Methods inherited from class org.eclipse.nebula.widgets.nattable.data.validate.DataValidator
validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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:
validatein interfaceorg.eclipse.nebula.widgets.nattable.data.validate.IDataValidator- Specified by:
validatein 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
-