org.apache.poi.xssf.usermodel
Class XSSFConditionalFormatting

java.lang.Object
  extended by org.apache.poi.xssf.usermodel.XSSFConditionalFormatting
All Implemented Interfaces:
ConditionalFormatting

public class XSSFConditionalFormatting
extends java.lang.Object
implements ConditionalFormatting

Author:
Yegor Kozlov

Method Summary
 void addRule(ConditionalFormattingRule cfRule)
          Add a Conditional Formatting rule.
 CellRangeAddress[] getFormattingRanges()
           
 int getNumberOfRules()
           
 XSSFConditionalFormattingRule getRule(int idx)
           
 void setRule(int idx, ConditionalFormattingRule cfRule)
          Replaces an existing Conditional Formatting rule at position idx.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFormattingRanges

public CellRangeAddress[] getFormattingRanges()
Specified by:
getFormattingRanges in interface ConditionalFormatting
Returns:
array of CellRangeAddresss. Never null

setRule

public void setRule(int idx,
                    ConditionalFormattingRule cfRule)
Replaces an existing Conditional Formatting rule at position idx. Excel allows to create up to 3 Conditional Formatting rules. This method can be useful to modify existing Conditional Formatting rules.

Specified by:
setRule in interface ConditionalFormatting
Parameters:
idx - position of the rule. Should be between 0 and 2.
cfRule - - Conditional Formatting rule

addRule

public void addRule(ConditionalFormattingRule cfRule)
Add a Conditional Formatting rule. Excel allows to create up to 3 Conditional Formatting rules.

Specified by:
addRule in interface ConditionalFormatting
Parameters:
cfRule - - Conditional Formatting rule

getRule

public XSSFConditionalFormattingRule getRule(int idx)
Specified by:
getRule in interface ConditionalFormatting
Returns:
the Conditional Formatting rule at position idx.

getNumberOfRules

public int getNumberOfRules()
Specified by:
getNumberOfRules in interface ConditionalFormatting
Returns:
number of Conditional Formatting rules.


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.