| Method from jxl.biff.BaseCellFeatures Detail: |
protected String getComment() {
return comment;
}
Accessor for the cell comment |
public final Comment getCommentDrawing() {
return commentDrawing;
}
Accessor for the comment drawing |
public double getCommentHeight() {
return commentHeight;
}
Accessor for the comment height |
public double getCommentWidth() {
return commentWidth;
}
Accessor for the comment width |
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
}
|
public String getDataValidationList() {
if (validationSettings == null)
{
return null;
}
return validationSettings.getValidationFormula();
}
Gets the data validation list as a formula. Used only when reading |
public boolean hasDataValidation() {
return dataValidation;
}
Accessor for the data validation |
public boolean hasDropDown() {
return dropDown;
}
Accessor for whether a drop down is required |
public void removeComment() {
// Set the comment string to be empty
comment = null;
// Remove the drawing from the drawing group
if (commentDrawing != null)
{
// do not call DrawingGroup.remove() because comments are not present
// on the Workbook DrawingGroup record
writableCell.removeComment(commentDrawing);
commentDrawing = null;
}
}
Removes the cell comment, if present |
public void removeDataValidation() {
// Remove the validation from the WritableSheet object if present
if (dataValidation)
{
writableCell.removeDataValidation();
}
clearValidationSettings();
}
Removes any data validation, if present |
public void setComboBox(ComboBox cb) {
comboBox = cb;
}
Sets the combo box drawing object for list validations |
public void setComment(String s) {
setComment(s, defaultCommentWidth, defaultCommentHeight);
}
|
public void setComment(String s,
double width,
double height) {
comment = s;
commentWidth = width;
commentHeight = height;
if (commentDrawing != null)
{
commentDrawing.setCommentText(s);
commentDrawing.setWidth(width);
commentDrawing.setWidth(height);
// commentDrawing is set up when trying to modify a copied cell
}
}
|
public final void setCommentDrawing(Comment c) {
commentDrawing = c;
}
Sets the comment drawing object |
public void setDataValidationList(Collection c) {
clearValidationSettings();
dvParser = new DVParser(c);
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 |
public void setDataValidationRange(String namedRange) {
clearValidationSettings();
dvParser = new DVParser(namedRange);
dropDown = true;
dataValidation = true;
}
Sets the data validation based upon a named range |
public void setDataValidationRange(int col1,
int r1,
int col2,
int r2) {
clearValidationSettings();
dvParser = new DVParser(col1, r1, col2, r2);
dropDown = true;
dataValidation = true;
}
The list of items to validate for this cell in the form of a cell range. |
public void setNumberValidation(double val,
BaseCellFeatures.ValidationCondition c) {
clearValidationSettings();
dvParser = new DVParser(val, Double.NaN, c.getCondition());
dropDown = false;
dataValidation = true;
}
|
public void setNumberValidation(double val1,
double val2,
BaseCellFeatures.ValidationCondition c) {
clearValidationSettings();
dvParser = new DVParser(val1, val2, c.getCondition());
dropDown = false;
dataValidation = true;
}
|
public void setReadComment(String s,
double w,
double h) {
comment = s;
commentWidth = w;
commentHeight = h;
}
Internal method to set the cell comment. Used when reading |
public void setValidationSettings(DataValiditySettingsRecord dvsr) {
Assert.verify(dvsr != null);
validationSettings = dvsr;
dataValidation = true;
}
Internal method to set the data validation. Used when reading |
public final void setWritableCell(CellValue wc) {
writableCell = wc;
}
Called by the cell when the features are added |