Class ConditionalFormat

java.lang.Object
io.keikai.axyra.sheets.content.ConditionalFormat

public final class ConditionalFormat extends Object
A conditional-formatting rule (immutable). Covers cellIs (operator + formula), expression, top-N / above-average, duplicate / unique values, blank / error presence, notContainsText, and "date occurring" (timePeriod) rules — each with a differential format (fill, font color, bold / italic / underline / strikethrough, number format, and borders) — plus the visual color-scale / data-bar / icon-set kinds. Apply with Range.addConditionalFormat(...).

The visual kinds carry their full configuration (ECMA-376 §18.3.1.11 cfvo, §18.3.1.16 colorScale, §18.3.1.28 dataBar, §18.3.1.49 iconSet): threshold ConditionalFormat.ValueObjects, showValue(), icon-set reverse(), and the data-bar extension detail (gradient / border / negative-value / axis colors). A rule read from Sheet.conditionalFormats() re-issues losslessly through Range.addConditionalFormat(...).

  • Method Details

    • builder

      public static ConditionalFormat.Builder builder()
    • toBuilder

      public ConditionalFormat.Builder toBuilder()
      A builder pre-loaded with this rule, for read–modify–write round-trips.
    • toJson

      public String toJson()
    • fromJson

      public static ConditionalFormat fromJson(String json)
    • type

      public String type()
    • operator

      public String operator()
    • formula1

      public String formula1()
    • formula2

      public String formula2()
    • text

      public String text()
      The text operand of a notContainsText rule, or null.
    • timePeriod

      public TimePeriod timePeriod()
      The date window of a timePeriod rule, or null.
    • priority

      public int priority()
      Evaluation priority (lower wins; 0 when unset).
    • stopIfTrue

      public boolean stopIfTrue()
      Whether lower-priority rules stop evaluating once this one matches.
    • valueObjects

      public List<ConditionalFormat.ValueObject> valueObjects()
      The threshold value objects of a color-scale / data-bar / icon-set rule, in document order; empty for the non-visual kinds.
    • showValue

      public boolean showValue()
      Whether the cell value is shown beside a data bar / icon set (ECMA-376 default true; meaningful for those kinds only).
    • reverse

      public boolean reverse()
      Whether an icon set draws its icons in reversed order.
    • colorScaleColors

      public List<String> colorScaleColors()
      The color-scale gradient colors in cfvo order (engine color tokens: #RRGGBB hex, raw AARRGGBB hex, theme:N[:tint], indexed:N); empty for other kinds.
    • dataBarColor

      public String dataBarColor()
      The data-bar fill color token, or null for other kinds.
    • iconSetName

      public String iconSetName()
      The icon-set name (e.g. "3Arrows"), or null.
    • gradient

      public Boolean gradient()
      false when a data bar paints a solid fill instead of the default gradient; null when the source did not specify.
    • axisPosition

      public String axisPosition()
      The data-bar axis position (automatic / middle / none), or null.
    • barDirection

      public String barDirection()
      The data-bar direction (context / leftToRight / rightToLeft), or null.
    • barBorderColor

      public String barBorderColor()
      The data-bar border color token, or null when borderless.
    • negativeFillColor

      public String negativeFillColor()
      The negative-value bar fill color token, or null.
    • negativeBorderColor

      public String negativeBorderColor()
      The negative-value bar border color token, or null.
    • axisColor

      public String axisColor()
      The data-bar axis color token, or null.
    • firstRow

      public int firstRow()
      The rectangle this rule applies to (0-based, from a read-back rule).
    • firstColumn

      public int firstColumn()
    • lastRow

      public int lastRow()
    • lastColumn

      public int lastColumn()