Example #1
0
 /**
  * Use the same data validation logic as the specified cell features
  *
  * @param cf the data validation to reuse
  */
 public void shareDataValidation(BaseCellFeatures source)
 {
     if (dataValidation)
     {
         //logger.warn("Attempting to share a data validation on cell " +
         //            CellReferenceHelper.getCellReference(writableCell) +
         //            " which already has a data validation");
         return;
     }
     clearValidationSettings();
     dvParser           = source.getDVParser();
     validationSettings = null;
     dataValidation     = true;
     dropDown           = source.dropDown;
     comboBox           = source.comboBox;
 }
Example #2
0
        /**
         * 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);
            }
        }
 /**
  * Use the same data validation logic as the specified cell features
  *
  * @param cf the data validation to reuse
  */
 public void shareDataValidation(BaseCellFeatures source)
 {
     if (dataValidation)
         {
         //logger.warn("Attempting to share a data validation on cell " +
         //            CellReferenceHelper.getCellReference(writableCell) +
         //            " which already has a data validation");
         return;
         }
     clearValidationSettings();
     dvParser = source.getDVParser();
     validationSettings = null;
     dataValidation = true;
     dropDown = source.dropDown;
     comboBox = source.comboBox;
 }
        /**
         * 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);
                }
        }