![]() |
||
Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate |
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.cells.FormatConditions
public class FormatConditions
Represents conditional formatting. The FormatConditions can contain up to three conditional formats.
Method Summary | |
---|---|
int |
addArea(CellArea cellArea)
Adds a conditional formatted cell range. |
int[] |
addFormatCondition(CellArea cellArea,
int type,
int operator,
java.lang.String formula1,
java.lang.String formula2)
Adds a formatting condition and effected cell rang to the FormatConditions. |
int |
addFormatCondition(int type)
Add a format condition. |
int |
addFormatCondition(int type,
int operator,
java.lang.String formula1,
java.lang.String formula2)
Adds a formatting condition. |
void |
deleteFormatCondition(int index)
Removes the formatting condition by index. |
CellArea |
getCellArea(int index)
Gets the conditional formatted cell range by index. |
FormatCondition |
getFormatCondition(int index)
Gets the formatting conidition by index. |
void |
removeAffectedRange(CellArea cellArea)
Removes given range from all ranges of this ConditionalFormatting if given range exists partly or completely. |
int |
sizeOfCellAreaList()
Gets size of conditionally formatted ranges. |
int |
sizeOfConditionList()
Gets size of formatting conditions. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int[] addFormatCondition(CellArea cellArea, int type, int operator, java.lang.String formula1, java.lang.String formula2)
cellArea
- conditional formatted cell range.type
- type of conditional formatting.It could be one of the members of FormatConditionType.operator
- comparison operator.It could be one of the members of OperatorType.formula1
- the value or expression associated with conditional formatting.formula2
- the value or expression associated with conditional formatting.
CellsException
- if conditional formattings have bean removed from the sheet.
java.lang.IllegalArgumentException
- if operator type is invalid.
java.lang.IllegalArgumentException
- if type of conditional formatting is invalid.
java.lang.IllegalArgumentException
- if number of formatting conditions is greater than 3.FormatCondition.setType(int)
,
OperatorType
public int addFormatCondition(int type)
type
- type of conditional formatting.It could be one of the members of FormatConditionType.
public int addArea(CellArea cellArea)
cellArea
- conditional formatted cell range.
Note: modifying this CellArea object directly to change its range later after this call
maybe gets no effect for the FormatConditions when this CellArea overlaps other existed areas of ConditionalFormattings.
CellsException
- if conditional formattings have bean removed from the sheet.public int addFormatCondition(int type, int operator, java.lang.String formula1, java.lang.String formula2)
type
- type of conditinal formatting.operator
- comparison operator.formula1
- the value or expression associated with conditinal formatting.formula2
- the value or expression associated with conditinal formatting.
CellsException
- if conditional formattings have bean removed from the sheet.
java.lang.IllegalArgumentException
- if number of formatting conditions is greater than 3.addFormatCondition(CellArea, int, int, String, String)
public FormatCondition getFormatCondition(int index)
index
- the index of the formatting conidition to return.
CellsException
- if conditional formattings have bean removed from the sheet.
java.lang.IllegalArgumentException
- if the index is out of range.public CellArea getCellArea(int index)
index
- the index of the conditional formatted cell range to return.
CellsException
- if conditional formattings have bean removed from the sheet.
java.lang.IllegalArgumentException
- if the index is out of range.public void removeAffectedRange(CellArea cellArea)
cellArea
- the range to remove from ranges this ConditionalFormatting affects.public int sizeOfCellAreaList()
public int sizeOfConditionList()
public void deleteFormatCondition(int index)
index
- the index of the formatting condition to removed.
CellsException
- if conditional formattings have bean removed from the sheet.
java.lang.IllegalArgumentException
- if the index is out of range.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |