org.apache.poi.xssf.usermodel

## Class XSSFConditionalFormatting

- java.lang.Object
- - org.apache.poi.xssf.usermodel.XSSFConditionalFormatting

- All Implemented Interfaces:
    ConditionalFormatting

      public class XSSFConditionalFormatting
      extends java.lang.Object
      implements ConditionalFormatting

  Author:
    Yegor Kozlov

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRule(ConditionalFormattingRule cfRule)` Add a Conditional Formatting rule.
    `CellRangeAddress[]` | `getFormattingRanges()`
    `int` | `getNumberOfRules()`
    `XSSFConditionalFormattingRule` | `getRule(int idx)`
    `void` | `setFormattingRanges(CellRangeAddress[] ranges)` Sets the cell ranges the rule conditional formatting must be applied to.
    `void` | `setRule(int idx, ConditionalFormattingRule cfRule)` Replaces an existing Conditional Formatting rule at position idx.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getFormattingRanges

          public CellRangeAddress[] getFormattingRanges()

      Specified by:
        `getFormattingRanges` in interface `ConditionalFormatting`
      Returns:
        array of `CellRangeAddress`s. Never `null`

    - #### setFormattingRanges

          public void setFormattingRanges(CellRangeAddress[] ranges)

      Description copied from interface: `ConditionalFormatting`
      Sets the cell ranges the rule conditional formatting must be applied to.
      Specified by:
        `setFormattingRanges` in interface `ConditionalFormatting`
      Parameters:
        `ranges` - non-null array of `CellRangeAddress`s

    - #### 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.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

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