[]
        
(Showing Draft Content)

FormatConditionType

Enum Class FormatConditionType

java.lang.Object
java.lang.Enum<FormatConditionType>
com.grapecity.documents.excel.FormatConditionType
All Implemented Interfaces:
Serializable, Comparable<FormatConditionType>, Constable

public enum FormatConditionType extends Enum<FormatConditionType>
Specifies the type of a conditional formatting rule.

Use this enumeration to indicate how a conditional format is evaluated or displayed, such as a cell-value rule, expression rule, color scale, data bar, top 10 rule, icon set, or other supported conditional formatting type.


 worksheet.getRange("A1:A4").setValue(new Object[][] {
     {10},
     {20},
     {30},
     {40}
 });
 worksheet.getRange("A1:A4").getFormatConditions()
     .add(FormatConditionType.CellValue, FormatConditionOperator.Greater, "25", null);
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Specifies the above average conditional formatting rule.
    Specifies a conditional formatting rule that applies to blank cells.
    Specifies that the conditional format is based on a cell value.
    Specifies a color scale conditional formatting rule.
    Specifies a data bar conditional formatting rule.
    Specifies the condition for conditional formatting rules that apply to cells containing errors.
    Specifies that the conditional format is based on an expression.
    Specifies an icon set conditional formatting rule.
    Specifies the conditional formatting rule that applies formatting to cells that are not blank.
    Specifies the condition for conditional formatting that applies to cells that do not contain errors.
    Specifies the text string condition for conditional formatting.
    Specifies a conditional formatting rule that applies to cells whose date values fall within a specified time period.
    Specifies a top or bottom rank conditional formatting rule, including Top 10, Top 10%, Bottom 10, and Bottom 10% evaluations.
    Specifies the unique values condition for conditional formatting.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CellValue

      public static final FormatConditionType CellValue
      Specifies that the conditional format is based on a cell value.

      Use this value for rules that compare the value of each cell in the applied range against one or two specified values by using a FormatConditionOperator.

    • Expression

      public static final FormatConditionType Expression
      Specifies that the conditional format is based on an expression.

      Use this value for a rule that evaluates a formula expression to determine whether the conditional formatting is applied.

    • ColorScale

      public static final FormatConditionType ColorScale
      Specifies a color scale conditional formatting rule.

      Use this value for conditional formats that apply a gradient of colors to cells to indicate relative differences in their values based on defined thresholds.

    • Databar

      public static final FormatConditionType Databar
      Specifies a data bar conditional formatting rule.

      Use this value for conditional formats that display a bar in each cell to represent the cell's value relative to other values in the applied range.

    • Top10

      public static final FormatConditionType Top10
      Specifies a top or bottom rank conditional formatting rule, including Top 10, Top 10%, Bottom 10, and Bottom 10% evaluations.
    • IconSets

      public static final FormatConditionType IconSets
      Specifies an icon set conditional formatting rule.

      Use this value for conditional formats that display icons based on cell values and threshold criteria.

    • UniqueValues

      public static final FormatConditionType UniqueValues
      Specifies the unique values condition for conditional formatting.
    • TextString

      public static final FormatConditionType TextString
      Specifies the text string condition for conditional formatting.
    • BlanksCondition

      public static final FormatConditionType BlanksCondition
      Specifies a conditional formatting rule that applies to blank cells.
    • TimePeriod

      public static final FormatConditionType TimePeriod
      Specifies a conditional formatting rule that applies to cells whose date values fall within a specified time period.
    • AboveAverageCondition

      public static final FormatConditionType AboveAverageCondition
      Specifies the above average conditional formatting rule.

      Use this value for conditional formats that compare each numeric cell in the applied range with the average of that range and apply formatting to cells whose values are above the average.

    • NoBlanksCondition

      public static final FormatConditionType NoBlanksCondition
      Specifies the conditional formatting rule that applies formatting to cells that are not blank.
    • ErrorsCondition

      public static final FormatConditionType ErrorsCondition
      Specifies the condition for conditional formatting rules that apply to cells containing errors.
    • NoErrorsCondition

      public static final FormatConditionType NoErrorsCondition
      Specifies the condition for conditional formatting that applies to cells that do not contain errors.
  • Method Details

    • values

      public static FormatConditionType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FormatConditionType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null