Exemple #1
0
        /**
         * Constructor which Initializes the cell range on which this object will be
         * applied
         * @param constraint
         */
        public HSSFDataValidation(CellRangeAddressList regions, IDataValidationConstraint constraint)
        {
            _regions = regions;

            //FIXME: This cast can be avoided.
            _constraint = (DVConstraint)constraint;
        }
 /*
  * (non-Javadoc)
  *
  * @see
  * Chama.Utils.NPOI.SS.UserModel.DataValidationHelper#CreateNumericConstraint
  * (int, java.lang.String, java.lang.String)
  */
 public IDataValidationConstraint CreateDecimalConstraint(int operatorType, String formula1, String formula2)
 {
     return(DVConstraint.CreateNumericConstraint(ValidationType.DECIMAL, operatorType, formula1, formula2));
 }
 /*
  * (non-Javadoc)
  *
  * @see
  * Chama.Utils.NPOI.SS.UserModel.DataValidationHelper#CreateFormulaListConstraint
  * (java.lang.String)
  */
 public IDataValidationConstraint CreateFormulaListConstraint(String listFormula)
 {
     return(DVConstraint.CreateFormulaListConstraint(listFormula));
 }
 public IDataValidationConstraint CreateintConstraint(int operatorType, String formula1, String formula2)
 {
     return(DVConstraint.CreateNumericConstraint(ValidationType.INTEGER, operatorType, formula1, formula2));
 }
 /*
  * (non-Javadoc)
  *
  * @see
  * Chama.Utils.NPOI.SS.UserModel.DataValidationHelper#CreateExplicitListConstraint
  * (java.lang.String[])
  */
 public IDataValidationConstraint CreateExplicitListConstraint(String[] listOfValues)
 {
     return(DVConstraint.CreateExplicitListConstraint(listOfValues));
 }
 /*
  * (non-Javadoc)
  *
  * @see
  * Chama.Utils.NPOI.SS.UserModel.DataValidationHelper#CreateDateConstraint
  * (int, java.lang.String, java.lang.String, java.lang.String)
  */
 public IDataValidationConstraint CreateDateConstraint(int operatorType, String formula1, String formula2, String dateFormat)
 {
     return(DVConstraint.CreateDateConstraint(operatorType, formula1, formula2, dateFormat));
 }
 public IDataValidationConstraint CreateCustomConstraint(String formula)
 {
     return(DVConstraint.CreateCustomFormulaConstraint(formula));
 }
 /*
  * (non-Javadoc)
  *
  * @see
  * Chama.Utils.NPOI.SS.UserModel.DataValidationHelper#CreateTimeConstraint
  * (int, java.lang.String, java.lang.String, java.lang.String)
  */
 public IDataValidationConstraint CreateTimeConstraint(int operatorType, String formula1, String formula2)
 {
     return(DVConstraint.CreateTimeConstraint(operatorType, formula1, formula2));
 }
 /*
  * (non-Javadoc)
  *
  * @see
  * Chama.Utils.NPOI.SS.UserModel.DataValidationHelper#CreateTextLengthConstraint
  * (int, java.lang.String, java.lang.String)
  */
 public IDataValidationConstraint CreateTextLengthConstraint(int operatorType, String formula1, String formula2)
 {
     return(DVConstraint.CreateNumericConstraint(ValidationType.TEXT_LENGTH, operatorType, formula1, formula2));
 }