Package jxl.write
Class WritableCellFeatures
- java.lang.Object
-
- jxl.biff.BaseCellFeatures
-
- jxl.CellFeatures
-
- jxl.write.WritableCellFeatures
-
public class WritableCellFeatures extends CellFeatures
Container for any additional cell features
-
-
Field Summary
Fields Modifier and Type Field Description static jxl.biff.BaseCellFeatures.ValidationConditionBETWEENstatic jxl.biff.BaseCellFeatures.ValidationConditionEQUALstatic jxl.biff.BaseCellFeatures.ValidationConditionGREATER_EQUALstatic jxl.biff.BaseCellFeatures.ValidationConditionGREATER_THANstatic jxl.biff.BaseCellFeatures.ValidationConditionLESS_EQUALstatic jxl.biff.BaseCellFeatures.ValidationConditionLESS_THANstatic jxl.biff.BaseCellFeatures.ValidationConditionNOT_BETWEENstatic jxl.biff.BaseCellFeatures.ValidationConditionNOT_EQUAL
-
Constructor Summary
Constructors Constructor Description WritableCellFeatures()ConstructorWritableCellFeatures(CellFeatures cf)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidremoveComment()Removes the cell comment, if presentvoidremoveDataValidation()Removes any data validation, if presentvoidsetComment(java.lang.String s)Sets the cell commentvoidsetComment(java.lang.String s, double width, double height)Sets the cell comment and sets the size of the text box (in cells) in which the comment is displayedvoidsetDataValidationList(java.util.Collection c)The list of items to validate for this cell.voidsetDataValidationRange(int col1, int row1, int col2, int row2)The list of items to validate for this cell in the form of a cell range.voidsetDataValidationRange(java.lang.String namedRange)Sets the data validation based upon a named range.voidsetNumberValidation(double val1, double val2, jxl.biff.BaseCellFeatures.ValidationCondition c)Sets the numeric range against which to validate the datavoidsetNumberValidation(double val, jxl.biff.BaseCellFeatures.ValidationCondition c)Sets the numeric value against which to validate-
Methods inherited from class jxl.CellFeatures
getComment, getDataValidationList, getSharedDataValidationRange
-
-
-
-
Field Detail
-
BETWEEN
public static final jxl.biff.BaseCellFeatures.ValidationCondition BETWEEN
-
NOT_BETWEEN
public static final jxl.biff.BaseCellFeatures.ValidationCondition NOT_BETWEEN
-
EQUAL
public static final jxl.biff.BaseCellFeatures.ValidationCondition EQUAL
-
NOT_EQUAL
public static final jxl.biff.BaseCellFeatures.ValidationCondition NOT_EQUAL
-
GREATER_THAN
public static final jxl.biff.BaseCellFeatures.ValidationCondition GREATER_THAN
-
LESS_THAN
public static final jxl.biff.BaseCellFeatures.ValidationCondition LESS_THAN
-
GREATER_EQUAL
public static final jxl.biff.BaseCellFeatures.ValidationCondition GREATER_EQUAL
-
LESS_EQUAL
public static final jxl.biff.BaseCellFeatures.ValidationCondition LESS_EQUAL
-
-
Constructor Detail
-
WritableCellFeatures
public WritableCellFeatures()
Constructor
-
WritableCellFeatures
public WritableCellFeatures(CellFeatures cf)
Copy constructor- Parameters:
cf- the cell to copy
-
-
Method Detail
-
setComment
public void setComment(java.lang.String s)
Sets the cell comment- Overrides:
setCommentin classjxl.biff.BaseCellFeatures- Parameters:
s- the comment
-
setComment
public void setComment(java.lang.String s, double width, double height)Sets the cell comment and sets the size of the text box (in cells) in which the comment is displayed- Overrides:
setCommentin classjxl.biff.BaseCellFeatures- Parameters:
s- the commentwidth- the width of the comment box in cellsheight- the height of the comment box in cells
-
removeComment
public void removeComment()
Removes the cell comment, if present- Overrides:
removeCommentin classjxl.biff.BaseCellFeatures
-
removeDataValidation
public void removeDataValidation()
Removes any data validation, if present- Overrides:
removeDataValidationin classjxl.biff.BaseCellFeatures
-
setDataValidationList
public void setDataValidationList(java.util.Collection c)
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- Overrides:
setDataValidationListin classjxl.biff.BaseCellFeatures- Parameters:
c- the list of valid values
-
setDataValidationRange
public void setDataValidationRange(int col1, int row1, int col2, int row2)The list of items to validate for this cell in the form of a cell range.- Overrides:
setDataValidationRangein classjxl.biff.BaseCellFeatures- Parameters:
col1- the first column containing the data to validate againstrow1- the first row containing the data to validate againstcol2- the second column containing the data to validate againstrow2- the second row containing the data to validate against
-
setDataValidationRange
public void setDataValidationRange(java.lang.String namedRange)
Sets the data validation based upon a named range. If the namedRange is an empty string ("") then the cell is effectively made read only- Overrides:
setDataValidationRangein classjxl.biff.BaseCellFeatures- Parameters:
namedRange- the workbook named range defining the validation boundaries
-
setNumberValidation
public void setNumberValidation(double val, jxl.biff.BaseCellFeatures.ValidationCondition c)Sets the numeric value against which to validate- Overrides:
setNumberValidationin classjxl.biff.BaseCellFeatures- Parameters:
val- the numberc- the validation condition
-
setNumberValidation
public void setNumberValidation(double val1, double val2, jxl.biff.BaseCellFeatures.ValidationCondition c)Sets the numeric range against which to validate the data- Overrides:
setNumberValidationin classjxl.biff.BaseCellFeatures- Parameters:
val1- the first numberval2- the second numberc- the validation condition
-
-