Package io.keikai.axyra.sheets.content
Class ConditionalFormat
java.lang.Object
io.keikai.axyra.sheets.content.ConditionalFormat
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(...).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFluent builder.static final recordA threshold value object of a color-scale / data-bar / icon-set rule (ECMA-376 §18.3.1.11 cfvo). -
Method Summary
Modifier and TypeMethodDescriptionThe data-bar axis color token, ornull.The data-bar axis position (automatic/middle/none), ornull.The data-bar border color token, ornullwhen borderless.The data-bar direction (context/leftToRight/rightToLeft), ornull.static ConditionalFormat.Builderbuilder()The color-scale gradient colors in cfvo order (engine color tokens:#RRGGBBhex, rawAARRGGBBhex,theme:N[:tint],indexed:N); empty for other kinds.The data-bar fill color token, ornullfor other kinds.intintfirstRow()The rectangle this rule applies to (0-based, from a read-back rule).formula1()formula2()static ConditionalFormatgradient()falsewhen a data bar paints a solid fill instead of the default gradient;nullwhen the source did not specify.The icon-set name (e.g.intintlastRow()The negative-value bar border color token, ornull.The negative-value bar fill color token, ornull.operator()intpriority()Evaluation priority (lower wins; 0 when unset).booleanreverse()Whether an icon set draws its icons in reversed order.booleanWhether the cell value is shown beside a data bar / icon set (ECMA-376 defaulttrue; meaningful for those kinds only).booleanWhether lower-priority rules stop evaluating once this one matches.text()The text operand of anotContainsTextrule, ornull.The date window of atimePeriodrule, ornull.A builder pre-loaded with this rule, for read–modify–write round-trips.toJson()type()The threshold value objects of a color-scale / data-bar / icon-set rule, in document order; empty for the non-visual kinds.
-
Method Details
-
builder
-
toBuilder
A builder pre-loaded with this rule, for read–modify–write round-trips. -
toJson
-
fromJson
-
type
-
operator
-
formula1
-
formula2
-
text
The text operand of anotContainsTextrule, ornull. -
timePeriod
The date window of atimePeriodrule, ornull. -
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
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 defaulttrue; meaningful for those kinds only). -
reverse
public boolean reverse()Whether an icon set draws its icons in reversed order. -
colorScaleColors
The color-scale gradient colors in cfvo order (engine color tokens:#RRGGBBhex, rawAARRGGBBhex,theme:N[:tint],indexed:N); empty for other kinds. -
dataBarColor
The data-bar fill color token, ornullfor other kinds. -
iconSetName
The icon-set name (e.g."3Arrows"), ornull. -
gradient
falsewhen a data bar paints a solid fill instead of the default gradient;nullwhen the source did not specify. -
axisPosition
The data-bar axis position (automatic/middle/none), ornull. -
barDirection
The data-bar direction (context/leftToRight/rightToLeft), ornull. -
barBorderColor
The data-bar border color token, ornullwhen borderless. -
negativeFillColor
The negative-value bar fill color token, ornull. -
negativeBorderColor
The negative-value bar border color token, ornull. -
axisColor
The data-bar axis color token, ornull. -
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()
-