Example usage for org.apache.poi.hssf.usermodel HSSFDataValidation getConstraint

List of usage examples for org.apache.poi.hssf.usermodel HSSFDataValidation getConstraint

Introduction

In this page you can find the example usage for org.apache.poi.hssf.usermodel HSSFDataValidation getConstraint.

Prototype

public DVConstraint getConstraint() 

Source Link

Usage

From source file:uk.ac.manchester.cs.owl.semspreadsheets.model.hssf.impl.SheetHSSFImpl.java

License:BSD License

public Collection<Validation> getValidations() {
    List<Validation> validationList = new ArrayList<Validation>();
    for (HSSFDataValidation validation : getValidationData()) {
        for (CellRangeAddress address : validation.getRegions().getCellRangeAddresses()) {
            validationList.add(//from  w w  w . java2  s  .  co m
                    new ValidationImpl(validation.getConstraint().getFormula1(), this, address.getFirstColumn(),
                            address.getLastColumn(), address.getFirstRow(), address.getLastRow()));
        }

    }
    return validationList;
}