Package com.grapecity.documents.excel
Interface IFormatCondition
public interface IFormatCondition
Represents a conditional format.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes this conditional format.voidGenerates the conditional format from the json string.Returns theIRangeobject that specifies the cell range to which theformatting rule is applied.Returns an instance ofIBorderswhich represents the borders of thisconditional format.Gets theTimePeriodsDate operator used in the format condition.getFont()Returns an instance ofIFontwhich represents the font of thisconditional format.Returns the first formula of this conditional format.Returns the second formula of this conditional format.Returns an instance ofIInteriorwhich represents the backgroundcolor of this conditional format.Returns the number format applied to a cell if the conditional formatting rule evaluates to True (read or write object).Returns the operator of this conditional format.intReturns the priority value of the conditional formatting rule.booleanReturns a Boolean value that determines if additional formatting rules on the cell should be evaluated if the current rule evaluates to True.getText()Returns a String value specifying the text used by the conditional formatting rule.Returns one of the constants of theContainsOperatorenumeration,specifying the text search performed by the conditional formatting rule.getType()Returns the type of this conditional format.voidsetAppliesTo(IRange value) Sets theIRangeobject that specifies the cell range to which theformatting rule is applied.voidsetDateOperator(TimePeriods value) Sets theTimePeriodsDate operator used in the format condition.voidSets the priority value for this conditional formatting rule to "1" so that it will be evaluated before all other rules on the worksheet.voidsetFormula1(Object value) Sets the first formula of this conditional format.voidsetFormula2(Object value) Sets the second formula of this conditional format.voidSets the evaluation order for this conditional formatting rule so it is evaluated after all other rules on the worksheet.voidsetNumberFormat(String value) Sets the number format applied to a cell if the conditional formatting rule evaluates to True (read or write object).voidSets the operator of this conditional format.voidsetPriority(int value) Sets the priority value of the conditional formatting rule.voidsetStopIfTrue(boolean value) Sets a Boolean value that determines if additional formatting rules on the cell should be evaluated if the current rule evaluates to True.voidSets a String value specifying the text used by the conditional formatting rule.voidsetTextOperator(ContainsOperator value) Sets one of the constants of theContainsOperatorenumeration,specifying the text search performed by the conditional formatting rule.toJson()Generates a json string from the conditional format.
-
Method Details
-
getAppliesTo
IRange getAppliesTo()Returns theIRangeobject that specifies the cell range to which theformatting rule is applied. -
setAppliesTo
Sets theIRangeobject that specifies the cell range to which theformatting rule is applied. -
getBorders
IBorders getBorders()Returns an instance ofIBorderswhich represents the borders of thisconditional format. -
getDateOperator
TimePeriods getDateOperator()Gets theTimePeriodsDate operator used in the format condition. -
setDateOperator
Sets theTimePeriodsDate operator used in the format condition. -
getFont
IFont getFont()Returns an instance ofIFontwhich represents the font of thisconditional format. -
getFormula1
Object getFormula1()Returns the first formula of this conditional format. -
setFormula1
Sets the first formula of this conditional format. -
getFormula2
Object getFormula2()Returns the second formula of this conditional format. -
setFormula2
Sets the second formula of this conditional format. -
getInterior
IInterior getInterior()Returns an instance ofIInteriorwhich represents the backgroundcolor of this conditional format. -
getNumberFormat
String getNumberFormat()Returns the number format applied to a cell if the conditional formatting rule evaluates to True (read or write object). -
setNumberFormat
Sets the number format applied to a cell if the conditional formatting rule evaluates to True (read or write object). -
getOperator
FormatConditionOperator getOperator()Returns the operator of this conditional format. -
setOperator
Sets the operator of this conditional format. -
getPriority
int getPriority()Returns the priority value of the conditional formatting rule. The priority determines the order of evaluation when multiple conditional formatting rules exist in a worksheet. -
setPriority
void setPriority(int value) Sets the priority value of the conditional formatting rule. The priority determines the order of evaluation when multiple conditional formatting rules exist in a worksheet.When setting the priority, the value must be a positive integer between 1 and the total number of conditional formatting rules on the worksheet. The priority must be a unique value for all rules on the worksheet, so changing the priority for the specified conditional formatting rule may cause the priority value of the other rules on the worksheet to be shifted.
-
getStopIfTrue
boolean getStopIfTrue()Returns a Boolean value that determines if additional formatting rules on the cell should be evaluated if the current rule evaluates to True. -
setStopIfTrue
void setStopIfTrue(boolean value) Sets a Boolean value that determines if additional formatting rules on the cell should be evaluated if the current rule evaluates to True. -
getText
String getText()Returns a String value specifying the text used by the conditional formatting rule. -
setText
Sets a String value specifying the text used by the conditional formatting rule.This property is ignored if the Type property is not set to TextString.
-
getTextOperator
ContainsOperator getTextOperator()Returns one of the constants of theContainsOperatorenumeration,specifying the text search performed by the conditional formatting rule. -
setTextOperator
Sets one of the constants of theContainsOperatorenumeration,specifying the text search performed by the conditional formatting rule. -
getType
FormatConditionType getType()Returns the type of this conditional format. -
delete
void delete()Deletes this conditional format. -
setFirstPriority
void setFirstPriority()Sets the priority value for this conditional formatting rule to "1" so that it will be evaluated before all other rules on the worksheet. -
setLastPriority
void setLastPriority()Sets the evaluation order for this conditional formatting rule so it is evaluated after all other rules on the worksheet. -
fromJson
Generates the conditional format from the json string.- Parameters:
json- the json string.
-
toJson
String toJson()Generates a json string from the conditional format.- Returns:
- the conditional format json string
-