Class DataValidatorFactory.HDFDataValidator

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 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

    Constructors
    Constructor
    Description
    Create the HDF extended Data Validator for the datatype object
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    checkValidValue​(Object newValue)
    Validate the data value.
    protected void
    throwValidationFailedException​(int rowIndex, int colIndex, Object newValue, String reason)
    The validate exception message.
    boolean
    validate​(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

    validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • cellColIdx

      protected int 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

      Create the HDF extended Data Validator for the datatype object
      Parameters:
      dtype - the datatype object
  • Method Details

    • validate

      public boolean validate(int colIndex, int rowIndex, Object newValue)
      The validate method used to validate the data value for the type.
      Specified by:
      validate in interface org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator
      Specified by:
      validate in class org.eclipse.nebula.widgets.nattable.data.validate.DataValidator
      Parameters:
      colIndex - the column
      rowIndex - the row
      newValue - the validated value
      Returns:
      true if this data is valid
    • checkValidValue

      protected void checkValidValue(Object newValue) throws org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedException
      Validate 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.ValidationFailedException
      The validate exception message.
      Parameters:
      rowIndex - the row
      colIndex - the column
      newValue - the invalid value
      reason - the reason the value is invalid
      Throws:
      org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedException