/** * Initializes the dvParser */ private void initialize() { if (dvParser == null) { dvParser = new DVParser(data, externalSheet, workbook, workbookSettings); } }
/** * Initializes the dvParser */ private void initialize() { if (dvParser == null) { dvParser = new DVParser(data, externalSheet, workbook, workbookSettings); } }
/** * Copy constructor * * @param the cell to copy */ public BaseCellFeatures(BaseCellFeatures cf) { // The comment stuff comment = cf.comment; commentWidth = cf.commentWidth; commentHeight = cf.commentHeight; // The data validation stuff. dropDown = cf.dropDown; dataValidation = cf.dataValidation; validationSettings = cf.validationSettings; // ? if (cf.dvParser != null) { dvParser = new DVParser(cf.dvParser); } }
/** * Copy constructor * * @param the cell to copy */ public BaseCellFeatures(BaseCellFeatures cf) { // The comment stuff comment = cf.comment; commentWidth = cf.commentWidth; commentHeight = cf.commentHeight; // The data validation stuff. dropDown = cf.dropDown; dataValidation = cf.dataValidation; validationSettings = cf.validationSettings; // ? if (cf.dvParser != null) { dvParser = new DVParser(cf.dvParser); } }
/** * Gets the dv parser */ public DVParser getDVParser() { // straightforward - this was created as a writable cell if (dvParser != null) { return dvParser; } // this was copied from a readable cell, and then copied again if (validationSettings != null) { dvParser = new DVParser(validationSettings.getDVParser()); return dvParser; } return null; // keep the compiler happy }
/** * Gets the dv parser */ public DVParser getDVParser() { // straightforward - this was created as a writable cell if (dvParser != null) { return dvParser; } // this was copied from a readable cell, and then copied again if (validationSettings != null) { dvParser = new DVParser(validationSettings.getDVParser()); return dvParser; } return null; // keep the compiler happy }
/** * Sets the data validation based upon a named range */ public void setDataValidationRange(String namedRange) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(namedRange); dropDown = true; dataValidation = true; }
/** * The list of items to validate for this cell in the form of a cell range. * * @param c the list of valid values */ public void setDataValidationRange(int col1, int r1, int col2, int r2) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(col1, r1, col2, r2); dropDown = true; dataValidation = true; }
/** * Sets the data validation based upon a named range */ public void setDataValidationRange(String namedRange) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(namedRange); dropDown = true; dataValidation = true; }
/** * The list of items to validate for this cell in the form of a cell range. * * @param c the list of valid values */ public void setDataValidationRange(int col1, int r1, int col2, int r2) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(col1, r1, col2, r2); dropDown = true; dataValidation = true; }
/** * The list of items to validate for this cell. For each object in the * collection, the toString() method will be called and the data entered * will be validated against that string * * @param c the list of valid values */ public void setDataValidationList(Collection c) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(c); dropDown = true; dataValidation = true; }
public void setNumberValidation(double val1, double val2, ValidationCondition c) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(val1, val2, c.getCondition()); dropDown = false; dataValidation = true; }
/** * The list of items to validate for this cell. For each object in the * collection, the toString() method will be called and the data entered * will be validated against that string * * @param c the list of valid values */ public void setDataValidationList(Collection c) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(c); dropDown = true; dataValidation = true; }
public void setNumberValidation(double val1, double val2, ValidationCondition c) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(val1, val2, c.getCondition()); dropDown = false; dataValidation = true; }
/** * Sets the data validation based upon a numerical condition */ public void setNumberValidation(double val, ValidationCondition c) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(val, Double.NaN, c.getCondition()); dropDown = false; dataValidation = true; }
/** * Sets the data validation based upon a numerical condition */ public void setNumberValidation(double val, ValidationCondition c) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(val, Double.NaN, c.getCondition()); dropDown = false; dataValidation = true; }