Package com.independentsoft.office.odf
Class ContentValidation
java.lang.Object
com.independentsoft.office.odf.ContentValidation
Represents a validation rule for table cell content.
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the ContentValidation class. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Gets the address of the base cell for relative addresses in formulas that occur within a condition.Gets the condition that determines whether a cell content is valid in regard to a validation rule or not.Specifies whether a list of values that occurs within a condition is displayed in the UI wile entering a cell value.Gets the message to display if a user tries to enter invalid content into a cell.Gets the message to display if a user selects a cell.getName()Gets the name of a content validation rule.booleanSpecifies whether a cell can be empty.voidsetAllowEmptyCell(boolean allowEmptyCell)Specifies whether a cell can be empty.voidsetBaseCellAddress(String baseCellAddress)Sets the address of the base cell for relative addresses in formulas that occur within a condition.voidsetCondition(String condition)Sets the condition that determines whether a cell content is valid in regard to a validation rule or not.voidsetDisplayListType(DisplayListType displayListType)Specifies whether a list of values that occurs within a condition is displayed in the UI wile entering a cell value.voidsetErrorMessage(ErrorMessage errorMessage)Sets the message to display if a user tries to enter invalid content into a cell.voidsetHelpMessage(HelpMessage helpMessage)Sets the message to display if a user selects a cell.voidSets the name of a content validation rule.toString()Converts the value of the current ContentValidation object to its equivalent string representation.
-
Constructor Details
-
ContentValidation
public ContentValidation()Initializes a new instance of the ContentValidation class.
-
-
Method Details
-
clone
Creates a new object that is a deep copy of the current instance. -
toString
Converts the value of the current ContentValidation object to its equivalent string representation. -
getName
Gets the name of a content validation rule. It is used to reference the validation rule from the cell the rule should applied.- Returns:
- the name
-
setName
Sets the name of a content validation rule. It is used to reference the validation rule from the cell the rule should applied.- Parameters:
name- the new name
-
getCondition
Gets the condition that determines whether a cell content is valid in regard to a validation rule or not.- Returns:
- the condition
-
setCondition
Sets the condition that determines whether a cell content is valid in regard to a validation rule or not.- Parameters:
condition- the new condition
-
getBaseCellAddress
Gets the address of the base cell for relative addresses in formulas that occur within a condition. This attribute is only necessary when the condition contains a formula. The value of this attribute shall be an absolute cell address that contains a table name.- Returns:
- the base cell address
-
setBaseCellAddress
Sets the address of the base cell for relative addresses in formulas that occur within a condition. This attribute is only necessary when the condition contains a formula. The value of this attribute shall be an absolute cell address that contains a table name.- Parameters:
baseCellAddress- the new base cell address
-
isAllowEmptyCell
public boolean isAllowEmptyCell()Specifies whether a cell can be empty. The default value for this attribute is true.- Returns:
- true, if is allow empty cell
-
setAllowEmptyCell
public void setAllowEmptyCell(boolean allowEmptyCell)Specifies whether a cell can be empty. The default value for this attribute is true.- Parameters:
allowEmptyCell- the new allow empty cell
-
getDisplayListType
Specifies whether a list of values that occurs within a condition is displayed in the UI wile entering a cell value.- Returns:
- the display list type
-
setDisplayListType
Specifies whether a list of values that occurs within a condition is displayed in the UI wile entering a cell value.- Parameters:
displayListType- the new display list type
-
getHelpMessage
Gets the message to display if a user selects a cell.- Returns:
- the help message
-
setHelpMessage
Sets the message to display if a user selects a cell.- Parameters:
helpMessage- the new help message
-
getErrorMessage
Gets the message to display if a user tries to enter invalid content into a cell.- Returns:
- the error message
-
setErrorMessage
Sets the message to display if a user tries to enter invalid content into a cell.- Parameters:
errorMessage- the new error message
-